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

Sample: AWS & Satellite Subnets

    Web Tier App Tier Data Tier Zone A 172.31.0.0/20 172.31.64.0/24 172.31.128.0/24 Zone B…

How To Configure Alternative Storage for a Kubernetes (K8s) Worker Node

The below illustration is assuming that one has a local RAID mount being added to…

Virtual Machine Manager Error ID 23351 FirstBootDevice Invalid

When moving, importing, exporting Generation 2 template in VMM, the following error occurs when trying…