Yahya
Yahya

Reputation: 540

mount already mounted or busy

I have an Amazon EC2 instance (Ubuntu 12.04) to which I have attached two 250 GB volumes. Inadvertently, the volumes got unmounted. When I tried mounting them again, with the following command,

sudo mount /dev/xvdg /data

this is the error I get :

mount: /dev/xvdg already mounted or /data busy

Then, I tried un-mounting it as follows : umount /dev/xvdg but it tells me that the volume is not mounted.

umount: /dev/xvdg is not mounted (according to mtab)

I tried lsof to check for any locks but there weren't any.

The lsblk output is as below :

enter image description here

Any help will be appreciated. What do I need to do to mount the volumes back without losing the data on them?

Upvotes: 7

Views: 78645

Answers (2)

Yahya
Yahya

Reputation: 540

Ok, figured it out. Thanks @Petesh and @mootmoot for pushing me in the right direction. I was trying to mount single volumes instead of a RAID 0 array. The /dev/md127 device was running so I stopped it first with the following command :

sudo mdadm --stop /dev/md127

Then I assembled the RAID 0 array :

sudo mdadm --assemble --uuid <RAID array UUID here> /dev/md0

Once the /dev/md0 array became active, I mounted it on /data.

Upvotes: 2

el3ien
el3ien

Reputation: 5415

Try umount /dev/xvdg* and umount /data and then
mount /dev/xvdg1 /data

Upvotes: 0

Related Questions