Disconnecting From a Volume
For volumes attached with
iSCSI as the volume attachment type you need to disconnect the volume from an instance before you detach the volume. For more information about attachment type options, see Volume Attachment Types. Required
Disconnecting a volume from an instance does not require a specific
IAM policy. Don't confuse this with detaching a volume (see Detaching a Volume).
Disconnecting from a Volume on a Linux Instance
Warning We recommend that you unmount and disconnect the volume from the instance using
iscsiadm before you detach the volume. Failure to do so may lead to loss of data.
Log on to your instance's guest OS and unmount the volume.
Run the following command to disconnect the instance from the volume:
iscsiadm -m node -T
<IQN> -p <iSCSI IP ADDRESS>: <iSCSI PORT> -u Copy
A successful logout response resembles the following:
Logging out of session [sid: 2, target: iqn.2015-12.us.oracle.com:c6acda73-90b4-4bbb-9a75-faux09015418, portal: 169.254.0.2,3260]
Logout of [sid: 2, target: iqn.2015-12.us.oracle.com:c6acda73-90b4-4bbb-9a75-faux09015418, portal: 169.254.0.2,3260] successful. You can now detach the volume without the risk of losing data.
Disconnecting from a Volume on a Windows Instance
Use a Remote Desktop client to log on to your Windows instance, and then open
Disk Management. Right-click the volume you want to disconnect, and then click
iSCSI Initiator, select the target, and then click Disconnect. Confirm the session termination. The status should show as
iSCSI Initiator, click the Favorite Targets tab, select the target you are disconnecting, and then click Remove. Click the
Volumes and Devices tab, select the volume from the Volume List, and then click Remove. You can now detach the volume without the risk of losing data.