1. Home
  2. Cloud Servers
  3. Removing a Disc

Removing a Disc

Before we begin:

  • Please ensure you have backups of any data on the disc you are going to remove. Once a disc has been removed, your data cannot be restored.
  • Please note: Only additional discs can be removed. You can’t remove your root disc (labelled ‘root: disc-1’)

Removing a disc (Linux method)

Let’s look at an example where your server has 3 archive discs which appear in the panel as follows:

and they are configured in the /etc/fstab file on your server as follows:

root@disk:~# cat /etc/fstab
UUID=37ddb290-13dc-41a1-be8e-19dfbea1ffc6     /     ext4     errors=remount-ro,noatime,nodiratime   0     1
UUID=69784f4b-2520-4366-817e-67db97a2223d     /boot ext3   errors=remount-ro   0     1
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
#              
# / was on /dev/vda1 during installation
# swap was on /dev/vda5 during installation

/dev/vdb 	/backup		ext4	defaults	0	0
/dev/vdc	/extra		ext4	defaults	0	0
/dev/vdd	/files		ext4	defaults	0	0

Linux automatically allocates drive letters on boot, with the first disc being labelled /dev/vda, and subsequent discs labelled /dev/vdb/dev/vdc etc. The drive letter can be followed by a number representing a particular partition on the disc.

In our example /etc/fstab file above, the discs are being referenced (referred to) by their name. When we remove a disc, any discs with subsequent drive letters will change, so we need to update these entries, to reduce their drive letter by one. If we didn’t do this, the server may fail to boot, or it may mount the drives in the wrong place!

Please note: If your drives are being referenced by label or UUID then you don’t need to update your /etc/fstab file

Let’s say, you want to remove the disc /dev/vdb, named ‘disc-2’ in the Panel. To do this you would:

  1. Remove each entry in the /etc/fstab file that begins with /dev/vdb  (or comment them out by adding a # to the start of each line).
  2. Change any entries starting with /dev/vdc to /dev/vdb, and /dev/vdd to /dev/vdc.

    If we were removing /dev/vdc, we would only need to rename the entries starting with /dev/vdd (as we only need to update drives with subsequent drive letters).

  3. Shut down the Cloud Server.
  4. Select ‘disc-2’ in the Panel and click the ‘purge disc‘ link (bottom-right), and (if you are sure!), confirm the action.
  5. Start the Cloud Server again. It should now boot without the drive we have just removed, and any remaining drives should be recognised and mounted correctly.

    If your server fails to start, you can use the netboot environment to fix any issues.

Removing a disc (Windows method)

  1. Before removing a disc, shut down your Cloud Server.
  2. Select the disc you want to remove in the Panel and click the ‘purge disc‘ link (bottom-right), and (as long as you are sure!), confirm the action.
  3. Start your server. Windows should automatically detect that the drive has been removed, so no further action should be necessary.
Updated on September 24, 2018

Was this article helpful?

Related Articles