From: Milan Broz <mbroz@redhat.com>
To: device-mapper development <dm-devel@redhat.com>
Cc: Sanjana Shari <sanjana.linux@gmail.com>
Subject: Re: creating two device mapper files for an underline blockdevice
Date: Wed, 02 Nov 2011 08:57:35 +0100 [thread overview]
Message-ID: <4EB0F7EF.603@redhat.com> (raw)
In-Reply-To: <CABMcfaM6BuB=5r1Exq-PxuCLDifX7Qfuuq9ZXpF9QNXRbxvupA@mail.gmail.com>
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 prev parent reply other threads:[~2011-11-02 7:57 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-01 6:08 creating two device mapper files for an underline blockdevice Sanjana Shari
2011-11-01 6:10 ` Sanjana Shari
2011-11-01 8:31 ` Milan Broz
2011-11-01 16:52 ` Sanjana Shari
2011-11-01 17:10 ` Sanjana Shari
2011-11-02 7:57 ` Milan Broz [this message]
2011-11-02 12:32 ` Sanjana
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4EB0F7EF.603@redhat.com \
--to=mbroz@redhat.com \
--cc=dm-devel@redhat.com \
--cc=sanjana.linux@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.