
UNMOUNT DISK IN LINUX FREE
Feel free to comment in case if you have any questions or feedback. These steps works on almost all Linux operating systems such as CentOS, RHEL, Oracle Linux, Rocky Linux, Ubuntu etc. I have performed these steps in several servers including production system. You can reattach a volume that you detached (without unmounting it), but it might not get the same mount point.

If an EBS volume is the root device of an instance, you must stop the instance before you can detach the volume. The steps I mentioned above does not require a reboot. However, if the instance is running, you must first unmount the volume from the instance. Step 4: Unplug or Remove the disk from the server In the Server management console (In case of Dell servers, this console is called iDRaC), select the disk to be removed and delete any virtual disks that are part of this disk. Step 3: Delete the Virtual disk if any from the Server BIOS With this step we have completed all the steps as part of removing a disk from the operating system. The option w stands for write the changes to disk.Īfter the changes are written to the disk, the partitions gets completely deleted from the disk. The option d stands for delete partition option.Īfter entering the input d, the system will delete the partition.
UNMOUNT DISK IN LINUX SOFTWARE
An example command is given below fdisk /dev/sdbĪfter executing the fdisk command, it will ask for the option to choose. The eject command can also be used to eject the disk through software rather than using the button on the drive, but the eject command needs the device name. The disk name can be /dev/sdb or /dev/xvdc etc. The partition can be deleted by using the fdisk command. It will show how many processes holding/using the filesystem. run below command to find out the processes using by a filesystem: fuser -cu /local/mnt/. That's why it show device is busy or filesystem is in use. The command to unmount the disk is given below.Īfter unmounting the disk, remove the entries if any from the /etc/fstab file. we need to check is any process holding or using the filesystem.


Step 1: Remove the entries from fstabįirst unmount the disk from the system and remove the entry corresponding to disk in the /etc/fstab file. These steps works well on almost all Linux operating systems such as CentOS, RHEL, Ubuntu, Rocky Linux, Oracle Linux etc. In this post, I will explain about the procedure to remove or delete a disk from an existing Linux machine without rebooting or restarting the server. Use the -l (-lazy) option to unmount a busy file system as soon as it is not busy anymore. In my previous post, I have explained about the steps to add a new disk to an existing Linux system.
