How to free up block device that is mounted to an inaccessible place?

0

root@vi-notebook:~# cat /proc/mounts | grep raidy
/dev/md0 /root/e/i/wpc2/boot/mnt/raidy reiserfs ro,nosuid,nodev,noexec,noatime 0 0

root@vi-notebook:~# umount -n /root/e/i/wpc2/boot/mnt/raidy
umount: /root/e/i/wpc2/boot/mnt/raidy: Transport endpoint is not connected

root@vi-notebook:~# mount /dev/md/raidy /mnt/raidy/ -t reiserfs -o nodev,nosuid,noexec,acl,noatime
mount: /dev/md0 already mounted or /mnt/raidy/ busy

The only workaround I found is:

root@vi-notebook:~# losetup /dev/loop0 /dev/md/raidy 
root@vi-notebook:~# mount /dev/loop0 /mnt/raidy/ -t reiserfs -o nodev,nosuid,noexec,acl,noatime

Vi.

Posted 2011-01-03T23:00:40.303

Reputation: 13 705

What happens if you umount /dev/md0 ? – Linker3000 – 2011-01-04T00:16:44.797

@Linker3000, The same. If it is not found in /etc/mtab then not mounted; if found - /root/e/i/wpc2/boot/mnt/raidy: Transport endpoint is not connected "man 2 umount" tells that In Linux 2.3.99-pre7 the call umount(device) was removed, leaving only umount(dir). And it really tried to umount that directory (as strace says), failing: oldumount("/root/e/itransition/wpc2/boot/mnt/raidy") = -1 ENOTCONN (Transport endpoint is not connected) – Vi. – 2011-01-04T02:42:55.060

No answers