[dm-devel] creating two device mapper files for an underline blockdevice
Milan Broz
mbroz at redhat.com
Wed Nov 2 07:57:35 UTC 2011
On 11/01/2011 06:10 PM, Sanjana Shari wrote:
> Using the remaining of first half of the same blockdevice /dev/loop0.
> This seems to work. So I ma confused here how the mapping works..
There is no magic for linear mapping.
Imagine you have this mapping table
0 8 linear /dev/sdb 1000
8 8 linear /dev/sdc 500
It means you created 16 sectors device consisting of two segments.
First half (sectors 0-7) is mapped to /dev/sdb starting at sector 10000.
(IOW sectors 0-7 of newly mapped device is mapped to sectors 10000-10007 of /dev/sdb)
Second half (sectors 8-15) is mapped to /dev/sdc starting at sector 500.
See dmsetup man page, where linear mapping is described.
Just do not confuse source and destination device offset.
Milan
More information about the dm-devel
mailing list