Skip to content

LAB 20 (Detach Block Volume)

arunsinghchauhan38-arch edited this page May 9, 2026 · 3 revisions

Detach Block Volume

Step 1 Detach Block Volume

Befor Detaching the block volume, please use the steps below to confirm the block volume data on the new instance.

1.Add a test file in the mounted folder /u01

  1. Display the total size of the current directory in a human- readable format
du -sh /u01
image

Run below commands before unmounting block volume

lsblk
df -h
image image

Now unmount block volume which is currently mounted at the /u01 directory

umount /u01
image

Again run below commands to check volume unmounted or not?

lsblk
df -h
image image

Since the mounted folder is not visible, but the volume is still present, we will execute the iSCSI detach command in PuTTY.

open that particular attached BV in OCI Go to three dots,

select iSCSI commands & information and copy disconnect command.

image image

Run the iSCSI detach command in putty

image

and again run lsblk command to check

lsblk
image

so, now block volume is not showing.

Before detaching the volume in OCI, we'll remove the last line from the fstab file that was added during mounting.

vi  /etc/fstab
image

Save & exit

:wq!

Finally we will detach block volume in OCI

image image image image

Clone this wiki locally