amazon-web-servicesamazon-ec2volumedetachumount

Error detaching volume : Volume is in the 'available' state


I want to detach volume from ec2-instance in aws but getting following error :

Error detaching volume : Volume is in the 'available' state.

I Have unmounted that disk ie fdisk -l doesn't show that volume also I have tried "Force Detach Volume" option. Still getting above error


Solution

  • You appear to be getting an error because the volume is already available -- which means it is not attached to any instance at this point.

    If it were still attached, its state would be in-use... or detaching if it were attached with a detach request still in progress but not yet complete.

    If you're looking at the console and it still shows one of those states, the console may be showing a stale state and need refreshing.