LAB 20 ::‐ Detach Block Volume ? - guptasanjeev-52/oci_docs GitHub Wiki

Detaching Block Volume...

 Detaching a Block volume in OCI is the process of safely disconnecting a block storage volume from a compute instance,
    while keeping all the Data intact , so the volume can be attached again later or to another Instance...

Firstly , open the block volume and then the attached instance part....go in the iSCSI command..

Now , open the putty configuration and log in to instance key and run the following command...which has been runned while attaching the block volume,

and also Mounted Block Volumes for Immediate Use...
lsblk
df -h
sudo umount /u01
lsblk
df -h
sudo vi /etc/fstab

comment out the line..

add # before the line

Now we have to run the iSCSI Disconnect command which will show a successful message...

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

Burger menu > Compute > Instances > the instance (bastion-server1) > Storage > Actions > Detach

Block Volume Detached Successfully...

THANKYOU !