Remove a Disk from Linux


After you delete a disk in the dashboard, remove it from the operating system by deleting its entry from /etc/fstab.

Remove the Only Additional Disk
Copy link

  1. Open the file:

nano /etc/fstab
  1. Delete the disk entry or comment it out:

Group 1321314175

  1. Save the changes: press Ctrl+X, then Y, then Enter.

Remove One of Several Additional Disks
Copy link

If you delete a disk that isn't the last one, the remaining disks shift to the previous letters. For example, if your server had additional disks vdc and vdd and you delete vdc, the disk that was vdd is now named vdc.

  1. Open the file:

nano /etc/fstab
  1. Delete the entry of the removed disk or comment it out:

Group 1321314177

  1. Check the disk names with lsblk.

In this example, you'll see the following:

Group 1321314178

The vdc disk is actually your former third disk (vdd), which was mounted to /mnt/disk3.

  1. Mount the disk to the same directory, using its new name (vdc1 in this example):

mount -o barrier=0 /dev/vdc1 /mnt/disk3
  1. Update the disk entries in /etc/fstab:
nano /etc/fstab

Group 1321314179

  1. Reboot the server.