Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Amazon EC2: Unable to unmount and remove EBS drive file system

I have create an EBS drive, attached it to the Instance and created file system using mkfs.ext3. Now i want to unmount and delete the drive, i've tried many things but nothing seems to work. Although i am able to detach the drive from instance and delete using EC-2 Console, but when i am checking partition using df -hk it is still showing the drive.

[ec2-user@XXXXXXXXXXXXXX ~]$ df -hk
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/xvda1             8256952   1075740   7097356  14% /
tmpfs                   304368         0    304368   0% /dev/shm
/dev/xvdf             30963708    176196  29214648   1% /media/newdrive

And more over when i try to use any other command like "fdisk -l" or and all or trying to browse the drive's folders, the putty session hangs. I am new to EC2 cloud and also to Linux.

like image 752
Prabal Nandi Avatar asked Jan 31 '26 19:01

Prabal Nandi


2 Answers

How about this?
You need to run as:
sudo umount /dev/xvdf

like image 149
rposky Avatar answered Feb 03 '26 08:02

rposky


umount -dRf /media/newdrive

umount needs mountpoint not a devicetype like /dev/xvdf

like image 34
Shadja Chaudhari Avatar answered Feb 03 '26 09:02

Shadja Chaudhari



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!