Skip to main content
Connect and disconnect the disk
Last update:

Connect and disconnect the disk

Replace boot disk

With a cloud server, you can only replace the network boot disk — with another network boot disk.

  1. In Control Panel, go to Cloud PlatformServers.
  2. Open the server page → network volumes tab.
  3. Check which disk is bootable — you'll see the Bootable tag in the line with it.
  4. If the cloud server does not have a bootable disk, first mount the right disk — it will automatically become bootable.
  5. If the cloud server already has a boot disk, turn off the server and disconnect the boot disk. First mount the desired disk — it will automatically become bootable.

Connect the network drive to the server

Only network volumes can be connected to the cloud server (up to 255 disks per server).

If the cloud server does not have a boot disk, the first disk connected will automatically become the boot disk.

The attached disk and the cloud server must be on the same pool segment.

  1. Make sure the disk is not connected to other servers, and disconnect it if necessary.
  2. We recommend turn off server. You can also connect the disk to a powered-on server, but make sure the operating system is fully booted.
  3. In Control Panel, go to Cloud PlatformDisks.
  4. In the row with the disk in the Connected to column, click Connect.
  5. Select the server to which the disk will connect. The disk and server must be in the same pool segment — if necessary transfer the disk to another pool segment.
  6. Press Connect.
  7. If you have attached the disk as an additional disk, be sure to prepare it for use — format and mount it.

Prepare the optional disk drive for operation after connecting

If you have connected an additional disk to the cloud server, it must be formatted and mounted — the order of configuration depends on the operating system.

  1. Connect to server.

  2. Look up the name of the additional disk connected to the server:

    lsblk

    In the answer, sdb is an additional disk:

    NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
    sda 8:0 0 8G 0 disk
    ├─sda1 8:1 0 8G 0 part /
    └─sda14 8:14 0 8M 0 part
    sdb 8:16 0 5G 0 disk
  3. If the attached disk was created from a source (image, snapshot, backup, or other disk), go to step 12.

  4. If the disk is empty, run the parted utility to create the file system and partitions of the additional disk:

    parted /dev/sdb

    Here sdb is an additional disk.

  5. Create a partition table with GPT partitioning:

    mklabel gpt
  6. Create partitions using the mkpart utility, specify the start and end of the partition:

    mkpart primary 0 1GB
    mkpart primary 1GB 3GB

    The example creates a 1 GB first partition and a 2 GB second partition (1 GB to 3 GB sector).

  7. Check the created partition table:

    print

    The response will show a list of partitions, start and end sectors, and partition sizes.

  8. Exit the parted utility:

    quit
  9. If the Information: You may need to update /etc/fstab warning appears when exiting parted, copy the IDs of all partitions on the additional disk (PARTUUID parameter):

    blkid

    In the response, sdb1 and sdb2 are disk partitions, PARTUUID is the partition IDs:

    /dev/sdb2: PARTLABEL="primary" PARTUUID="bd032abc-8f4e-4723-8ffd-a39544e97e36"
    /dev/sdb1: PARTLABEL="primary" PARTUUID="123e46a1-61a4-3a53-77d7-14a02fbc98bc"
  10. Open the /etc/fstab file:

    nano /etc/fstab
  11. Add the ID of each section to the file:

    UUID=<block_id> /mnt ext4 defaults 0 0
    UUID=<block_id> /mnt ext4 defaults 0 0

    Specify <block_id> — the partition IDs of the additional disk copied in step 9.

  12. Format each disk partition using the mkfs utility (ext4 partitioning format is used):

    mkfs.ext4 /dev/sdb1
    mkfs.ext4 /dev/sdb2

    Here sdb1 and sdb2 are partitions of the additional disk.

  13. Create a directory to mount the additional disk and mount each partition to it:

    mkdir -p /mnt
    mount /dev/sdb1 /mnt
    mount /dev/sdb2 /mnt

    Here sdb1 and sdb2 are disk partitions.

  14. Check the result:

    lsblk

    The partitions of the additional disk will appear in the response:

    NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
    sda 8:0 0 8G 0 disk
    ├─sda1 8:1 0 8G 0 part /
    └─sda14 8:14 0 8M 0 part
    sdb 8:16 0 5G 0 disk
    ├─sdb1 8:17 0 953.7M 0 part /mnt
    └─sdb2 8:18 0 1.9G 0 part /mnt

Disconnect the network drive from the server

You can only disconnect a network volume — boot or secondary — from the cloud server.

  1. If the disk is bootable, turn off the cloud server.
  2. If the disk is optional, we also recommend shutting down the server. You can disconnect the disk from the powered-on server as well, but make sure the operating system is fully booted.
  3. In Control Panel, go to Cloud PlatformDisks.
  4. From the menu ( ) of the drive, select Disconnect from server.