Skip to main content
Connect file storage to a cloud server in another pool

Connect file storage to a cloud server in another pool

If you plan to use file storage to store backups, we recommend creating the storage and cloud server in pools from different availability zones or regions to improve fault tolerance. If the file storage and the cloud server are in different pools, you must configure private network connectivity at the L3 level via global router to connect the storage.

  1. Create global router.
  2. Connect the network and subnet to the global router for the cloud server.
  3. Connect the network and subnet to the global router for file storage.
  4. Assign IP address to cloud server.
  5. Write routes on cloud server.
  6. Create file storage.
  7. Mount file storage to cloud server.

See example of connecting file storage to a cloud server in a different pool.

If you need to increase disk space with file storage, we recommend creating storage in the same pool as the cloud server. For more details, see the Connect file storage to cloud server-in-one-pool instructions.

Example of connecting file storage to a cloud server

For example, you need to connect file storage in pool ru-2 to a cloud server in pool ru-8.

  1. Create a global router.
  2. Connect two private networks to the global router — 192.168.0.0.0/29 with a gateway of 192.168.0.1 for the ru-8 pool and 172.16.0.0.0/29 with a gateway of 172.16.0.1 for the ru-2 pool.
  3. Assign an address from the 192.168.0.0.0/29 subnet to the cloud server, such as 192.168.0.2.
  4. Write a route on the cloud server in the ru-8 pool — to the 172.16.0.0.0/29 subnet via the 192.168.0.1 gateway.
  5. Create a file store on the 172.16.0.0.0/29 subnet.
  6. Mount the file storage to the cloud server.

Create a global router

  1. In Control Panel, go to Network ServicesServercore Global Router.
  2. Click Create Router. Each account has a limit of five global routers.
  3. Enter the name of the router.
  4. Press Create.
  5. If the router was created with status ERROR or hung in one of the statuses, create a ticket.

Connect the network and subnet to the router for the cloud server

For your information

If the cloud platform network is connected to a global router, you can only manage it on the global router page.

You need to connect the network and subnet to the global router up to the project and cloud platform pool where the cloud server is created.

You can connect a new network to the router or an existing network if it is not already connected to any of the account's global routers.

  1. In Control Panel, go to Network ServicesServercore Global Router.

  2. Open the router page → Networks tab.

  3. Click Create Network.

  4. Enter a network name, this will only be used in the control panel.

  5. Select the Cloud Platform service.

  6. Select pool.

  7. Select project.

  8. Enter the subnet name — this will only be used in the control panel.

  9. Enter the CIDR — IP address and subnet mask. The subnetwork must meet the conditions:

    • belong to the RFC 1918 private address range of 10.0.0.0.0/8, 172.16.0.0.0/12, or 192.168.0.0.0/16;
    • have a size of at least /29, as three addresses will be occupied by Servercore network equipment;
    • Do not overlap with other subnets added to this router: The IP addresses of each subnet on the router must not overlap with the IP addresses of other subnets on the router;
    • if Managed Kubernetes nodes will be included in the global router network, the subnet must not overlap with the 10.250.0.0.0/16, 10.10.0.0.0/16, and 10.96.0.0.0/12 ranges. These subnets participate in the internal addressing of Managed Kubernetes, their use can cause conflicts in the global router network.
  10. Enter the gateway IP or leave the first address from the subnet assigned by default. Do not assign this address to your devices to avoid disrupting your network.

  11. Enter service IPs or leave the last addresses from the subnet assigned by default. Do not assign these addresses to your devices to avoid disrupting your network.

  12. Click Create Network.

  13. Optional: check the network topology on the global router. In Control Panel, go to Network ServicesServercore Global Router. Open the page of the desired router and click Network Map.

Connect a network and subnet to the router for file storage

For your information

If the cloud platform network is connected to a global router, you can only manage it on the global router page.

You need to connect the network and subnet to the global router up to the project and cloud platform pool where the file storage will be created in the future.

You can connect a new network to the router or an existing network if it is not already connected to any of the account's global routers.

  1. In Control Panel, go to Network ServicesServercore Global Router.

  2. Open the router page → Networks tab.

  3. Click Create Network.

  4. Enter a network name, this will only be used in the control panel.

  5. Select the Cloud Platform service.

  6. Select pool where the file storage will be created.

  7. Select project where the file storage will be created.

  8. Enter the subnet name — this will only be used in the control panel.

  9. Enter the CIDR — IP address and subnet mask. The subnetwork must meet the conditions:

    • belong to the RFC 1918 private address range of 10.0.0.0.0/8, 172.16.0.0.0/12, or 192.168.0.0.0/16;
    • have a size of at least /29, as three addresses will be occupied by Servercore network equipment;
    • Do not overlap with other subnets added to this router: The IP addresses of each subnet on the router must not overlap with the IP addresses of other subnets on the router;
    • if Managed Kubernetes nodes will be included in the global router network, the subnet must not overlap with the 10.250.0.0.0/16, 10.10.0.0.0/16, and 10.96.0.0.0/12 ranges. These subnets participate in the internal addressing of Managed Kubernetes, their use can cause conflicts in the global router network.
  10. Enter the gateway IP or leave the first address from the subnet assigned by default. Do not assign this address to your devices to avoid disrupting your network.

  11. Enter service IPs or leave the last addresses from the subnet assigned by default. Do not assign these addresses to your devices to avoid disrupting your network.

  12. Click Create Network.

  13. Optional: check the network topology on the global router. In Control Panel, go to Network ServicesServercore Global Router. Open the page of the desired router and click Network Map.

Assign an IP address to the cloud server

Configure a local port on the cloud server that is included in the global router network. On the port, assign an IP address from the subnet you created on the global router for the corresponding pool.

  1. Add cloud server to the created subnet of the global router. If you don't already have a cloud server, create one. When creating, select the subnet of the global router as the subnet.

  2. Apply the changes depending on the Apply Changes parameter in the Port Setup block. The value of the parameter can be viewed in Control Panel under Cloud PlatformServers → Cloud Server page:

    • When rebooting the server — programmatically reboot the cloud server or manually make changes to the network configuration file on the server;
    • Manually in the network configuration file on the server — Manually make changes to the network configuration file on the server.

write routes on the cloud server

If you have created a new server and added it to an existing global router network, you do not need to specify routes. In this case, the server will be immediately available to other devices on the network.

If you are adding an existing server to a global router network, it must have static routes to all subnets with which you want connectivity.

  1. Connect to server.

  2. Disable network configuration. To do this, create the 99-disable-network-config.cfg file:

    echo "network: {config: disabled}" >> /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg
  3. Open the configuration file:

    vi /etc/network/interfaces.d/50-cloud-init.cfg
  4. Locate the data block of the corresponding network interface.

  5. At the end of this block, add the desired route:

    up route add -net <ip_address> netmask <mask> gw <gateway>

    Specify:

    • <ip_address> is the subnet to which the route is needed, for example, 192.168.0.0;
    • <mask> is the subnet mask to which the route is needed, for example, 255.255.255.0;
    • <gateway> is the gateway for the current server's subnet, which is specified on the global router.
  6. If you need to write multiple routes, add them sequentially in the same block.

  7. Restart the server.

Create file storage

  1. In Control Panel, go to Cloud PlatformFile Storage.

  2. Click Create Storage.

  3. Enter a new storage name or leave the name that is automatically created.

  4. Select the pool where the storage will be located.

  5. Select the subnet of the Servercore Global Router private network that you connected to the router for file storage.

  6. Select file storage type. Storages differ in read/write speeds and bandwidth values:

    • HDD Basic;

    • SSD Universal;

    • SSD Fast.

      Once created, the storage type cannot be changed.

  7. Specify the storage size: from 50 GB to 50 TB. Once created, you can increase file-storage, but you can't decrease it.

  8. Select a protocol:

    • NFSv4 — for connecting storage to servers running Linux and other Unix systems;

    • CIFS SMBv3 — for connecting the storage to Windows servers.

      Once created, the protocol cannot be changed.

  9. Check out the cost of file storage.

  10. Press Create.

Mount the file storage to the cloud server

The mount process depends on the operating system on the cloud server and the file storage protocol: NFSv4 or CIFS SMBv3.

Mount storage using NFSv4 protocol

  1. Connect to server.

  2. Install the NFS protocol package:

    sudo apt install nfs-common
  3. Create a folder to mount the repository:

    sudo mkdir -p /mnt/nfs
  4. Mount the file storage:

    sudo mount -vt nfs "<filestorage_ip_address>:/shares/share-<mountpoint_uuid>" /mnt/nfs

    Specify:

    • <filestorage_ip_address> — IP address of the file storage. You can look in control panel under Cloud PlatformFile Storage → Storage page → Settings tabIP field;
    • <mountpoint_uuid> — mount point ID. You can look in control panel under Cloud PlatformFile Storage → Storage page → Connectivity block → GNU/Linux tab.

Mount storage using CIFS SMBv3 protocol

  1. Connect to server.

  2. Install the CIFS protocol package:

    sudo apt install cifs-utils
  3. Create a folder to mount the repository:

    sudo mkdir -p /mnt/cifs
  4. Mount the file storage:

    sudo mount.cifs -o guest //<filestorage_ip_address>/share-<mountpoint_uuid> /mnt/cifs

    Specify:

    • <filestorage_ip_address> — IP address of the file storage. You can look in control panel under Cloud PlatformFile Storage → Storage page → Settings tabIP field;
    • <mountpoint_uuid> — mount point ID. You can look in control panel under Cloud PlatformFile Storage → Storage page → Connectivity block → GNU/Linux tab.