[dm-devel] creating two device mapper files for an underline blockdevice

Sanjana sanjana.linux at gmail.com
Wed Nov 2 12:32:30 UTC 2011


Thanks Milan,

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

--sanjana

On Wed, Nov 2, 2011 at 1:27 PM, Milan Broz <mbroz at redhat.com> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/dm-devel/attachments/20111102/e087cb03/attachment.htm>


More information about the dm-devel mailing list