Connect and disconnect the disk from the cloud server
Replace the boot disk
With a cloud server, you can only replace the network boot disk — with another network boot disk.
Control panel
OpenStack CLI
- In the dashboard, on the top menu, click Products and select Cloud Servers.
- Open the server page → Network Disks tab.
- Check which disk is bootable — you'll see the Bootable tag in the line with it.
- If the cloud server does not have a boot disk, mount the right disk first — it will automatically become bootable.
- If the cloud server already has a boot disk, shut down the server and disconnect the boot disk. Connect the desired disk first and it will automatically become the boot disk.
-
In the Control panel, on the top menu, click Products and select Cloud Servers.
-
Open the server page → Network Disks tab.
-
Check which disk is bootable — you'll see the Bootable tag in the line with it.
-
If the cloud server does not have a boot disk, mount the right disk first — it will automatically become bootable:
openstack server add volume <server> <volume>
Specify:
<server>
— Server ID or name. The list can be viewed withopenstack server list
<volume>
— ID or disk name. The list can be viewed withopenstack volume list
-
If the cloud server has a boot disk, shut down the cloud server:
openstack server stop <server>
-
Disconnect the boot disk from the server:
openstack server remove volume <server> <volume>
-
Connect the desired disk first — it will automatically become bootable:
openstack server add volume <server> <volume>
Connect a network drive to the server
Only network disks 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.
Control panel
OpenStack CLI
- Make sure the disk is not connected to other servers and disconnect it if necessary.
- We recommend shutting down the server. You can also connect the disk to a powered on server, but make sure the operating system is fully booted.
- In the Control panel, on the top menu, click Products and select Cloud Servers.
- Go to the Disks section.
- In the row with the disk in the Connected to column, click Connect.
- Select the server to which the disk will connect. The disk and server must be on the same pool segment — move the disk to another pool segment if necessary.
- Click Connect.
- If you have connected the drive as an additional drive, be sure to prepare it for use by formatting and mounting it.
-
Make sure the disk is not connected to other servers and disconnect it if necessary:
openstack server remove volume <server> <volume>
Specify:
<server>
— Server ID or name. The list can be viewed withopenstack server list
<volume>
— ID or disk name. The list can be viewed withopenstack volume list
-
We recommend shutting down the server:
openstack server stop <server>
You can connect the disk to a powered-on server, but make sure the operating system is fully booted.
-
Connect the disk to the server:
openstack server add volume <server> <volume>
-
If you have connected the drive as an additional drive, be sure to prepare it for use by formatting and mounting it.
Prepare the optional disk drive for operation after connection
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.
Linux
Windows
-
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 -
If the attached disk was created from a source (image, snapshot, backup, or other disk), go to step 12.
-
If the disk is empty, run the
parted
utility to create the file system and partitionsof
the additional disk:parted /dev/sdb
Here
sdb
is an additional disk. -
Create a partition table with GPT partitioning:
mklabel gpt
-
Create partitions using the
mkpart
utility, specify the start and end of the partition:mkpart primary 0 1GB
mkpart primary 1GB 3GBThe example creates a 1 GB first partition and a 2 GB second partition (1 GB to 3 GB sector).
-
Check the created partition table:
print
The response will show a list of partitions, start and end sectors, and partition sizes.
-
Exit the
parted
utility:quit
-
If the warning
Information: You may need to update /etc/fstab
appears when exitingparted
, copy the IDs of all partitions
on the additional disk (PARTUUID
parameter ):blkid
In the response,
sdb1
andsdb2
are disk partitions,PARTUUID
is the partition ID:/dev/sdb2: PARTLABEL="primary" PARTUUID="bd032abc-8f4e-4723-8ffd-a39544e97e36"
/dev/sdb1: PARTLABEL="primary" PARTUUID="123e46a1-61a4-3a53-77d7-14a02fbc98bc" -
Open the
/etc/fstab
file:nano /etc/fstab
-
Add the ID of each section to the file:
UUID=<block_id> /mnt ext4 defaults 0 0
UUID=<block_id> /mnt ext4 defaults 0 0Specify
<block_id>
— partition IDs of the additional disk copied in step 9. -
Format each disk partition using the
mkfs
utility (ext4 partitioning format is used):mkfs.ext4 /dev/sdb1
mkfs.ext4 /dev/sdb2Here
sdb1
andsdb2
are partitions of the additional disk. -
Create a directory to mount the additional disk and mount each partition to it:
mkdir -p /mnt
mount /dev/sdb1 /mnt
mount /dev/sdb2 /mntHere
sdb1
andsdb2
are disk partitions. -
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
- Connect to the server.
- If the additional disk is empty, use the Initializing New Disks instructions in the Microsoft documentation.
- If the additional disk was created from a source (another disk, image, snapshot, backup), use the Change Disk Letter instructions in the Microsoft documentation.
Disconnect the network drive from the server
You can only disconnect a network drive — boot or secondary — from the cloud server.
Control panel
OpenStack CLI
- If the disk is bootable, shut down the cloud server.
- 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.
- In the Control panel, on the top menu, click Products and select Cloud Servers.
- Go to the Disks section.
- From the disk's menu, select Disconnect from Server.
-
If the disk is bootable, shut down the cloud server:
openstack server stop <server>
Specify
<server>
— server ID or name, can be viewed usingopenstack server list
-
If the disk is optional, we also recommend shutting down the server. You can disconnect the disk from the powered on server, but make sure the operating system is fully booted.
-
Disconnect the disk from the server:
openstack server remove volume <server> <volume>
Specify
<volume>
— disk ID or name, the list can be viewed withopenstack volume list