How to unmount a Block Storage volume
Unmounting a volume means detaching it from the operating system so it is no longer accessible. You can do this if you want to stop using it, prevent data corruption, or plan to detach it from your Instance and attach it to another. This page shows you how to unmount a volume from the operating system using the umount command.
Before you start
To complete the actions presented below, you must have:
- A Scaleway account logged into the console
- Owner status or IAM permissions allowing you to perform actions in the intended Organization
- Created an SSH key
- Created an Instance with a Block Storage volume attached and mounted to it
-
Open a terminal and use the following command to connect to your Instance. Make sure that you replace
<your_instance_ip>with your Instance's IP. You can also find the SSH command in your Instance's Overview tab in the Scaleway console.ssh root@<your_instance_ip> -
Run the
lsblkcommand to check where your volume is mounted. An output similar to the following displays:root@scw-heuristic-shtern:~# lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS sdb 8:0 0 18.6G 0 disk /mnt/block-volume -
Run the command below to unmount the volume to remove it from your current setup. Replace
/mnt/block-volumewith your mount point.umount /mnt/block-volume -
Check that the volume is no longer mounted in the system with
lsblk. Thesdbvolume is no longer mounted at/mnt/block-volume.root@scw-festive-agnesi:~# lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT sdb 8:0 0 18.6G 0 disk -
If you used Persistent Mounting, edit the
/etc/fstabfile and delete the line corresponding to your block volume.
Your Block Storage volume is now unmounted from your Instance.