FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Device-mapper Development

 
 
LinkBack Thread Tools
 
Old 11-03-2011, 02:18 AM
Sanjana
 
Default Cannot mount underlying block device after creating dm device.

Hi,

I am testing a mirror target for dmsetup. After creating the dm device I cannot the underlying block device.
[root@bladelinux01 ~]# dumpe2fs /dev/loop0 | head
dumpe2fs 1.41.12 (17-May-2010)Filesystem volume name:** <none>
Last mounted on:********* <not available>Filesystem UUID:********* 9c0f4d5c-55d9-4332-b0e7-f48a19333174
Filesystem magic number:* 0xEF53Filesystem revision #:*** 1 (dynamic)
Filesystem features:***** has_journal ext_attr resize_inode dir_index filetype sparse_superFilesystem flags:******** signed_directory_hash
Default mount options:*** (none)Filesystem state:******** clean
Errors behavior:********* Continue[root@bladelinux01 ~]# dumpe2fs /dev/loop1 | head
dumpe2fs 1.41.12 (17-May-2010)Filesystem volume name:** <none>
Last mounted on:********* <not available>Filesystem UUID:********* c16fcae4-2271-4701-a91e-6694962935d0
Filesystem magic number:* 0xEF53Filesystem revision #:*** 1 (dynamic)
Filesystem features:***** has_journal ext_attr resize_inode dir_index filetype sparse_superFilesystem flags:******** signed_directory_hash
Default mount options:*** (none)Filesystem state:******** clean
Errors behavior:********* Continue
[root@bladelinux01 ~]# mount /dev/loop0 /mnt/ ; mount | grep loop0/dev/loop0 on /mnt type ext3 (rw)
[root@bladelinux01 ~]# umount /mnt/[root@bladelinux01 ~]# mount /dev/loop1 /mnt/ ; mount | grep loop1
/dev/loop1 on /mnt type ext3 (rw)[root@bladelinux01 ~]# umount /mnt/
[root@bladelinux01 ~]# dmsetup create raid1 --table "0 204800 mirror core 1 128 2 7:0 0 7:1 0"
[root@bladelinux01 ~]# dmsetup table raid10 204800 mirror core 1 128 2 7:0 0 7:1 0
[root@bladelinux01 ~]# dmsetup info raid1Name:************* raid1
State:************ ACTIVERead Ahead:******* 256
Tables present:*** LIVEOpen count:******* 0
Event number:***** 1Major, minor:***** 253, 6
Number of targets: 1[root@bladelinux01 ~]# dmsetup info -c raid1
Name************ Maj Min Stat Open Targ Event* UUIDx*************** 253** 6 L--w*** 0*** 1***** 1
[root@bladelinux01 ~]# dmsetup deps raid12 dependencies* : (7, 1) (7, 0)
[root@bladelinux01 ~]# dmsetup status /dev/mapper/raid10 204800 mirror 2 7:0 7:1 1600/1600 1 AA 1 core
I have mounted the newly created dm device and copied some data to it.
[root@bladelinux01 ~]# mount /dev/mapper/raid1 /mnt/ ; mount | grep raid1/dev/mapper/raid1 on /mnt type ext3 (rw)
[root@bladelinux01 ~]# cp /var/log/messages /mnt/[root@bladelinux01 ~]# ls -l /mnt/
total 51drwx------. 2 root root 12288 Nov* 2 22:32 lost+found
-rw-------. 1 root root 37417 Nov* 2 22:38 messagesI have now unmounted the dm device to test if the daya is written to the underlying block device.
[root@bladelinux01 ~]# umount /mnt/[root@bladelinux01 ~]# dmsetup info raid1
Name:************* raid1State:************ ACTIVE
Read Ahead:******* 256Tables present:*** LIVE
Open count:******* 0Event number:***** 1
Major, minor:***** 253, 6Number of targets: 1
Here the open count is "ZERO", but still I cannot mount the underlying block device.
[root@bladelinux01 ~]# mount /dev/loop0 /mnt/mount: /dev/loop0 already mounted or /mnt/ busy
[root@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@bladelinux01 ~]# dmsetup remove raid1[root@bladelinux01 ~]# mount /dev/loop0 /mnt/
[root@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@bladelinux01 ~]# umount /mnt/[root@bladelinux01 ~]# mount /dev/loop1 /mnt/
[root@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....
*
-- sanjana



--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
 

Thread Tools




All times are GMT. The time now is 09:08 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org