VK Cloud logo
Updated at April 15, 2024   08:50 AM

File share

You can create file storages, read and write data to them, connect (mount) to instances and create snapshots.

File storages can be connected to project instances using CIFS or NFS protocols.

Creating a file storage

  1. Go to personal account VK Cloud.

  2. Select the project where you want to create the file storage.

  3. Go to Cloud computingFile share.

  4. Click to the Create storage or Create button.

  5. Set the file storage parameters:

    • Name of file storage: it can consist only of Latin letters, numbers and symbols -, _ and .;
    • Storage size: must be within the quota, not less than 10 GB and not more than 10000 GB;
    • Protocol: to access the storage from Windows, select the CIFS protocol, from Linux — NFS;
    • Network: choose from the suggested ones or create a new one. For the new network, specify also Subnet address;
    • File storage network: choose from the suggested ones or create a new one.
  6. Click to the Next step button.

  7. (Optional) Add storage access rules:

    1. Click to Add new rule.
    2. Enter the IP address or subnet address of the source.
    3. Select the access mode.
    4. Click to the Add rule button.
  8. Click to Add file server.

Connecting file storage

The way to connect the file storage depends on the operating system and the protocol selected when creating the storage.

Windows

NFS

You can connect NFS storage in Windows using the Client for NFS. This is a Windows Server component that can be installed from the Server Manager interface or using PowerShell:

  1. Open Server Manager and choose Add Roles and Features.
  2. Go to the section Installation Type, select the option Add Roles and Features and click Next.
  3. Go to the section Components, select from the list Client fo NFS.
  4. In the same list, expand the options Remote Server Administration Tools → Role Administration Tools → File Services Tools and choose Services for NFS Administration tools. Click Next button.
  5. Make sure that all the necessary components are selected, and click Install.
  6. Wait for the installation to finish and restart the server.

To change the client settings, use the Server Manager:

  1. In the Tools menu, select Services for NFS.
  2. Select Client for NFS and click on the icon Display the properties.
  3. Set the desired settings.

Connect the NFS storage using the command described in its properties.

The command to connect the storage looks like this:

mount <Mount point> <Disk name>:

There is:

  • <Mount point> — the address of the file storage specified in its description;
  • <Disk name> — the uppercase Latin letter not used in the name of other disks.

CIFS

To connect the file storage, run the command specified in its properties.

The command to connect the storage looks like this:

net use <Disk name>: <Mount point>

There is:

  • <Mount point> — the address of the file storage specified in its description;
  • <Disk name> — the uppercase Latin letter not used in the name of other disks.

Linux

NFS

  1. Install the nfs-common package using the command:

    sudo apt-get install nfs-common
  2. Create a folder to mount the storage:

    mkdir <Directory name>
  3. Use the command specified in properties of the created NFS storage:

    mount -t nfs <Mount point> ./<Directory name>

    There is:

    • <Mount point> — the address of the file storage specified in its description;
    • <Directory name> — by default, it matches the name of the file storage.

CIFS

  1. Install cifs-utils using the command:

    sudo apt install -y cifs-utils
  2. Create a folder to mount the storage:

    mkdir <Directory name>
  3. Use the command specified in properties of the repository:

    sudo mount -o user=,password= -t cifs <Mount point> ./<Directory name>

    There is:

    • <Mount point> — the address of the file storage specified in its description;
    • <Directory name> — the name of the folder created earlier.

Viewing a list of file storages

  1. Go to personal account VK Cloud.
  2. Select the project where the desired file storage is located.
  3. Go to Cloud computingFile share. A list of file repositories will be displayed.

Viewing information about file storage

  1. Go to personal account VK Cloud.
  2. Select the project where the desired file storage is located.
  3. Go to Cloud computingFile share.
  4. Click on the name of the desired file storage. Information about it will be displayed.

Increasing the file storage size

  1. Go to personal account VK Cloud.
  2. Select the project where the desired file storage is located.
  3. Go to Cloud computingFile share.
  4. Expand the menu of the desired storage and select Change size.
  5. Enter a value and click Confirm.

Creating a snapshot

  1. Go to personal account VK Cloud.
  2. Select the project where the desired file storage is located.
  3. Go to Cloud computingFile share.
  4. Expand the menu of the desired storage and select Create snapshot.
  5. (Optional) Change the name of the snapshot and add a description.
  6. Enter a value and click Create snapshot.

Viewing snapshots

  1. Go to personal account VK Cloud.
  2. Select the project where the desired file storage is located.
  3. Go to Cloud computingFile share.
  4. Expand the menu of the desired storage and select List of snapshots. Information about the images will be displayed.

Restoring from a snapshot

  1. Go to personal account VK Cloud.
  2. Select the project where the desired file storage is located.
  3. Go to Cloud computingFile share.
  4. Expand the menu of the desired storage and select List of snapshots.
  5. Expand the menu of the desired image and select Restore file storage.
  6. Click the Confirm. The process of creating a new storage from the snapshot will begin.

Adding an access rule

  1. Go to personal account VK Cloud.
  2. Select the project where the desired file storage is located.
  3. Go to Cloud computingFile share.
  4. Click on the name of the desired file storage.
  5. Go to the Access rules tab.
  6. Click to the Add new rule.
  7. Specify the source IP or subnet address and access mode.
  8. Click the Add rule button.

Deleting file storage

To delete a file storage, you must first dismantle it on virtual machines.

  1. Go to personal account VK Cloud.
  2. Select the project where the desired file storage is located.
  3. Go to Cloud computingFile share.
  4. Expand the menu of the desired storage and select Delete.
  5. Click the Confirm button.