2

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

Ashish Karpe
  • 3,189
  • 4
  • 30
  • 49

1 Answers1

8

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.

Michael - sqlbot
  • 139,456
  • 21
  • 252
  • 328
  • But it was showing "Attachment information i-9dbd0219 (ADM-DEL-CERT-STAGING-HIPHOP-NEW):/dev/xvdz (atached)" in aws-console so I tried force detach – Ashish Karpe Mar 22 '16 at 19:48
  • So I stopped that instance and then it was able to detach so can we detach volume from live instance ? – Ashish Karpe Mar 22 '16 at 19:50