Posted On July 5, 2019

AWS-CLI: Detach A Volume

kimconnect 0 comments
blog.KimConnect.com >> Virtualization >> AWS-CLI: Detach A Volume
Check Volume’s Status
PS C:\Windows> aws ec2 describe-volumes --region us-west-1 --volume-ids vol-0a0f16ef5a9d69a29
{
"Volumes": [
{
"Attachments": [
{
"AttachTime": "2019-06-10T04:49:02.000Z",
"Device": "/dev/sda1",
"InstanceId": "i-0c8a54804bdef133a",
"State": "attached",
"VolumeId": "vol-0a0f16ef5a9d69a29",
"DeleteOnTermination": false
}
],
"AvailabilityZone": "us-west-1c",
"CreateTime": "2019-06-10T04:34:51.619Z",
"Encrypted": true,
"Size": 30,
"SnapshotId": "snap-041a3825ebe9c3c33",
"State": "in-use",
"VolumeId": "vol-0a0f16ef5a9d69a29",
"Iops": 100,
"Tags": [
{
"Key": "Name",
"Value": "kimconnect"
}
],
"VolumeType": "gp2"
}
]
}

Since the volume is currently mounted as /dev/sda1 on InstanceID i-0c8a54804bdef133a, it must be unmounted prior to a detachment

Yo detach this...

Now, the force detach command

...

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Post

How to expand volume of a linux virtual machine residing in a ESXi host

1. Power off VM2. Expand volume size3. Power on VM4. Confirm new volume size# fdisk…

PowerShell: Assign Guest Virtual Machine to a Cloud in VMM

# assignVmsToCloud.ps1 # version 0.02 # The following function assigns a guest VM into a…

Domain Name Records Overview: A-record, MX, DKIM, SPF, SRV

A RECORD (A-host): - What: address record (A-record) specifies the IP address(es) of a given…