How to forcefully unmount a device in EC2 linux Instance

Recently I had a situation on one of my amazon EC2 instance that, I had to unmount a device from a server(amazon ec2 instance) and attach it to another instance. For that, I removed the entry from /etc/fstab file and tried running the following command.

sudo umount /mnt

But I got an error saying that I cannot unmount the device as the device is busy. After searching for a long time I found a solution. I run the following command and it worked.

sudo fuser -km /mnt/share

Post navigation

Alvin Jaison

Myself Alvin Jaison. I'm a DevOps Engineer by Profession; A Mountaineer by Passion. I started this website to share DevOps related posts. Post your suggestions as a comment. You can reach me @ alvinjaison@outlook.com

Leave a Reply

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