Repository navigation
Lab 15 ‐ Detach Block Volume
Md Mahbub Alam edited this page Oct 25, 2026
·
1 revision
- Make sure no applications are using the volume.
- Unmount the filesystem using the umount command.
- Open the /etc/fstab file using vi in PuTTY and comment out or remove the entry for that volume.
- Run the iSCSI detach commands (now called Disconnect)
- Finally, detach the block volume from the instance using the OCI Console.
- First, make sure no applications are using the volume. Before unmounting it, run lsblk and df -h to record the current state for comparison later.
- Now we will either comment out the line or delete the line which refernces this volume in /etc/fstab file
sudo vi /etc/fstab
- Now we run iSCSI Disconnect command which will show a successful message
sudo iscsiadm -m node -T iqn.2015-12.com.oracleiaas:9171b6dd-e18f-4854-ad42-0c9fbde4053a -p 169.254.2.2:3260 -u sudo iscsiadm -m node -o delete -T iqn.2015-12.com.oracleiaas:9171b6dd-e18f-4854-ad42-0c9fbde4053a -p 169.254.2.2:3260
- Now we will verify if the volume is detached lsblk
- In OCI console navigate to storage details page of the instance and click the actions menu in the Attached block volumes section and click Detach volume
Navigation menu > Compute > Instances > the instance (bastion-server1) > Storage > Actions > Detach