Attaching and detaching file storage
Mounting and unmounting file storage, as well as writing and reading data, are available only on virtual machines VK Cloud.
The method of mounting file storage depends on the virtual machine operating system, Windows or Linux, and the protocol selected when creating the storage.
You can mount file storage via the NFS protocol in Windows using the Windows Server component — Client for NFS.
-
Connect to the VK Cloud virtual machine.
-
Install the Client for NFS from the Server Manager interface or using PowerShell:
Server ManagerPowerShell- Open Server Manager and in the Manage menu, select Add Roles and Features.
- Go to the Installation Type section, select the Role-based or feature-based installation option, and click Next.
- Go to the Features section and select Client for NFS from the list.
- In the same list, expand the options Remote Server Administration Tools → Role Administration Tools → File Services Tools and select Services for NFS Management Tools. Click Next.
- Verify that all necessary components are selected and click Install.
- Wait for the installation to complete and restart the server.
-
Change the client settings using Server Manager:
- In the Tools menu, select Services for NFS.
- Select Client for NFS and click the Display properties window icon.
- Set the required settings.
-
Mount the file storage:
mount <МОНТ POINT> <DRIVE_LETTER>:Here:
<MOUNT POINT>— the file storage address. To find it out, view the file storage information.<DRIVE_LETTER>— an uppercase Latin letter that is not used by other drives.
-
Connect to the VK Cloud virtual machine.
-
Install the package for working with the NFS protocol:
aptdnfsudo apt-get install nfs-common -
Create a directory for mounting the storage:
mkdir <DIRECTORY_NAME> -
Mount the file storage:
mount -t nfs <MOUNT POINT> ./<DIRECTORY_NAME>Here:
<MOUNT POINT>— the file storage address. To find it out, view the file storage information.<DIRECTORY_NAME>— the name of the previously created directory.
The method of unmounting file storage depends on the virtual machine operating system and the protocol selected when creating the storage.
-
Connect to the VK Cloud virtual machine.
-
Unmount the file storage by running the command:
NFS protocolCIFS protocolumount <DRIVE_LETTER>: