[aklug] Re: loop devices with partitions...?

From: Shane Spencer <shane@bogomip.com>
Date: Thu Sep 09 2010 - 19:11:48 AKDT

Before I started using kpartx I would use ATAoE or iSCSI to do this.
Nowhere near as simple but it worked.

On Wed, Sep 8, 2010 at 9:34 PM, Arthur Corliss
<acorliss@nevaeh-linux.org> wrote:
> On Wed, 8 Sep 2010, Christopher Howard wrote:
>
>> Hey, I recently learned you could represent an image file with a loop
>> device, which is pretty cool. So, you can create, say, /dev/loop0, and
>> then turn it into a file system with mkfs.xfs /dev/loop0 (or whatever
>> happens to be your poison).
>>
>> I noticed I can, instead of turning it into just a file system, run
>> fdisk on it to turn it into a disk image with several partitions.
>> However, what I'm not sure about yet is, if /dev/loop0 represents the
>> disk.img file with several partitions on it, how do "bring out" each of
>> those partitions to be its own loop file? (Like, /dev/loop0-part1 or
>> something...?)
>
> =A0 kpartx -v -a /dev/loop0
>
> This will create some new devices (like /dev/mapper/loop0p1) for you to
> perform regular operations on.
>
> =A0 =A0 =A0 =A0--Arthur Corliss
> =A0 =A0 =A0 =A0 =A0Live Free or Die
> ---------
> To unsubscribe, send email to <aklug-request@aklug.org>
> with 'unsubscribe' in the message body.
>
>
---------
To unsubscribe, send email to <aklug-request@aklug.org>
with 'unsubscribe' in the message body.
Received on Thu Sep 9 19:11:56 2010

This archive was generated by hypermail 2.1.8 : Thu Sep 09 2010 - 19:11:56 AKDT