Re: creating two device mapper files for an underline blockdevice

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thanks Milan,

That clears my confusion.. need to read more doc... :)

--sanjana

On Wed, Nov 2, 2011 at 1:27 PM, Milan Broz <mbroz@xxxxxxxxxx> wrote:
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





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

[Index of Archives]     [DM Crypt]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite Discussion]     [KDE Users]     [Fedora Docs]

  Powered by Linux