[dm-devel] Cannot mount underlying block device after creating dm device.
Phillip Susi
psusi at cfl.rr.com
Thu Nov 3 19:05:19 UTC 2011
On 11/2/2011 11:18 PM, Sanjana wrote:
> [root at bladelinux01 ~]# mount /dev/loop0 /mnt/
> mount: /dev/loop0 already mounted or /mnt/ busy
> [root at bladelinux01 ~]# mount /dev/loop1 /mnt/
> mount: /dev/loop1 already mounted or /mnt/ busy
>
> But if I remove the dm device created and try to mount the underlying
> block-device, I can mount both the device which took part in mirroring and
> I can access the data in both the disk.
> [root at bladelinux01 ~]# dmsetup remove raid1
> [root at bladelinux01 ~]# mount /dev/loop0 /mnt/
> [root at bladelinux01 ~]# ls -l /mnt/
> total 51
> drwx------. 2 root root 12288 Nov 2 22:32 lost+found
> -rw-------. 1 root root 37417 Nov 2 22:38 messages
>
> [root at bladelinux01 ~]# umount /mnt/
> [root at bladelinux01 ~]# mount /dev/loop1 /mnt/
> [root at bladelinux01 ~]# ls -l /mnt/
> total 51
> drwx------. 2 root root 12288 Nov 2 22:32 lost+found
> -rw-------. 1 root root 37417 Nov 2 22:38 messages
>
> Why is this behavior. any explanation, please....
Simple; the loop devices are still open by device-mapper, so mount is
telling you they are busy. Just because the raid device has zero opens
does not mean that it closes the underlying devices.
More information about the dm-devel
mailing list