[linux-lvm] lvm over loop device

geert Geurts begeert at gmail.com
Fri Sep 26 12:04:40 UTC 2008

I'm trying to create a lvgroup of a few hundred pvolumes witch are virtual
disks (files of +- 1Mb ) over loopdevices.
what I did is the following:
dd if=/dev/urandom of=/disk0 bs=1024 count=1000 #create a file with random
losetup -f disk0 #link a loopdevice to the file
after this I'm able to for instance mkfs.ext3 /dev/loop0 and mount it but I
don't want a ext3 I want LVM partition. But fdisk is unable to create it
using fdisk /dev/loop0 fails...
So what I did first create a LVM partition of 1MB on a memorystick and then
change the if of dd to point to the LVM partition, I'm now able to pvcreate
/dev/loop0, vgcreate SmallDisk /dev/loop0.
But I'm unable to create a logical volume in the SmallDisk group...
what am I doing wrong here? is it even possible if not why?

Greetings Geert

ps. for people interested, I'm trying to create a disk of allot of small
virtual disks so I can create a encrypted partition on for instance gmailfs
and minimalize up/download time on changes.
Pretty cool if it's possible no?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/linux-lvm/attachments/20080926/2421df51/attachment.htm>

More information about the linux-lvm mailing list