* [linux-lvm] lvm over loop device
@ 2008-09-26 12:04 geert Geurts
2008-09-26 13:36 ` Stuart D. Gathman
2008-09-29 9:08 ` Bryn M. Reeves
0 siblings, 2 replies; 8+ messages in thread
From: geert Geurts @ 2008-09-26 12:04 UTC (permalink / raw)
To: linux-lvm
[-- Attachment #1: Type: text/plain, Size: 1038 bytes --]
Hello,
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
data
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?
Thanks,
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?
[-- Attachment #2: Type: text/html, Size: 1144 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [linux-lvm] lvm over loop device
2008-09-26 12:04 [linux-lvm] lvm over loop device geert Geurts
@ 2008-09-26 13:36 ` Stuart D. Gathman
2008-09-26 14:00 ` Larry Dickson
2008-09-26 17:37 ` geert Geurts
2008-09-29 9:08 ` Bryn M. Reeves
1 sibling, 2 replies; 8+ messages in thread
From: Stuart D. Gathman @ 2008-09-26 13:36 UTC (permalink / raw)
To: LVM general discussion and development
[-- Attachment #1: Type: text/plain, Size: 664 bytes --]
geert Geurts wrote:
> 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?
I think a better solution might be to keep the encrypted fs on a single
normal LV. Take a snapshot and send to remote. Keep the snapshot
around. On next upload, take a 2nd snapshot, and send the diff between
the two snapshots. The diff can be efficiently computed from the COW
tables - accessible as dw-nn devices. After sending the diff, delete
the 1st snapshot and go back to "keep snapshot around".
[-- Attachment #2: stuart.vcf --]
[-- Type: text/x-vcard, Size: 315 bytes --]
begin:vcard
fn:Stuart Gathman
n:Gathman;Stuart
org:Business Management Systems, Inc
adr;dom:;;4001 Williamsburg Court;Fairfax;VA;22032
email;internet:stuart@bmsi.com
tel;work:703 591-0911
tel;fax:703 591-6154
tel;home:703 378-9641
note:AIM: SDGathman
x-mozilla-html:FALSE
url:http://bmsi.com
version:2.1
end:vcard
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [linux-lvm] lvm over loop device
2008-09-26 13:36 ` Stuart D. Gathman
@ 2008-09-26 14:00 ` Larry Dickson
2008-09-26 17:37 ` geert Geurts
1 sibling, 0 replies; 8+ messages in thread
From: Larry Dickson @ 2008-09-26 14:00 UTC (permalink / raw)
To: LVM general discussion and development
[-- Attachment #1: Type: text/plain, Size: 1537 bytes --]
If I may come to Geert's defense, his approach is more transparent: the PVs
are accessible from user space and their content arrangement is clear by
looking up the maps. Using snapshots puts everything into kernel space and
deep into mystery land (unless there is some user space way of
hand-manipulating COWs by sector number). I'm on the dm-devel list and they
literally have dozens of patches a day... like raging ocean currents under
your little, simple ship.
Unfortunately, I can't answer Geert's practical questions. Anyone?
Larry Dickson
Cutting Edge Networked Storage
On 9/26/08, Stuart D. Gathman <stuart@bmsi.com> wrote:
>
> geert Geurts wrote:
> > 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?
> I think a better solution might be to keep the encrypted fs on a single
> normal LV. Take a snapshot and send to remote. Keep the snapshot
> around. On next upload, take a 2nd snapshot, and send the diff between
> the two snapshots. The diff can be efficiently computed from the COW
> tables - accessible as dw-nn devices. After sending the diff, delete
> the 1st snapshot and go back to "keep snapshot around".
>
>
>
> _______________________________________________
> linux-lvm mailing list
> linux-lvm@redhat.com
> https://www.redhat.com/mailman/listinfo/linux-lvm
> read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
>
>
[-- Attachment #2: Type: text/html, Size: 2160 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [linux-lvm] lvm over loop device
2008-09-26 13:36 ` Stuart D. Gathman
2008-09-26 14:00 ` Larry Dickson
@ 2008-09-26 17:37 ` geert Geurts
1 sibling, 0 replies; 8+ messages in thread
From: geert Geurts @ 2008-09-26 17:37 UTC (permalink / raw)
To: LVM general discussion and development
[-- Attachment #1: Type: text/plain, Size: 1042 bytes --]
Ok, I'll try your snapshots idea.
Is it possible to mount such a snapshot like it's an image?
2008/9/26 Stuart D. Gathman <stuart@bmsi.com>
> geert Geurts wrote:
> > 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?
> I think a better solution might be to keep the encrypted fs on a single
> normal LV. Take a snapshot and send to remote. Keep the snapshot
> around. On next upload, take a 2nd snapshot, and send the diff between
> the two snapshots. The diff can be efficiently computed from the COW
> tables - accessible as dw-nn devices. After sending the diff, delete
> the 1st snapshot and go back to "keep snapshot around".
>
>
>
> _______________________________________________
> linux-lvm mailing list
> linux-lvm@redhat.com
> https://www.redhat.com/mailman/listinfo/linux-lvm
> read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
>
[-- Attachment #2: Type: text/html, Size: 1633 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [linux-lvm] lvm over loop device
2008-09-26 12:04 [linux-lvm] lvm over loop device geert Geurts
2008-09-26 13:36 ` Stuart D. Gathman
@ 2008-09-29 9:08 ` Bryn M. Reeves
2008-09-29 9:44 ` Geert Geurts
1 sibling, 1 reply; 8+ messages in thread
From: Bryn M. Reeves @ 2008-09-29 9:08 UTC (permalink / raw)
To: LVM general discussion and development
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
geert Geurts wrote:
> 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?
Hi Geert,
What was the error you were getting at this point? If possible, can you
use a service like pastebin.com to post the complete output of "lvcreate
- -vvv" with the options you're using for the SmallDisk VG. That should
give enough detail to have some idea where it's failing.
I think the idea is reasonable enough although you'll probably need to
do some fiddling around to get the size/number of the gmailfs volumes
right to give good performance.
Snapshots could definitely work here but I think it might be a bit
tricky without some of the patches that are currently outstanding for
device-mapper, esp. Mikulas' snapshot merging patches which you'd need
to "restore" one of the COW areas. See the thread here:
http://kerneltrap.org/Linux/LVM_Snapshot_Merging
Regards,
Bryn.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org
iEYEARECAAYFAkjgmxgACgkQ6YSQoMYUY96LegCcCHPZNLfhTUjIrsLiJcgROTDV
+SwAoLFQDiGpkZl5tpEFW5hjFH+6OuAj
=i+W8
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [linux-lvm] lvm over loop device
2008-09-29 9:08 ` Bryn M. Reeves
@ 2008-09-29 9:44 ` Geert Geurts
2008-09-30 19:32 ` Steve Brueggeman
0 siblings, 1 reply; 8+ messages in thread
From: Geert Geurts @ 2008-09-29 9:44 UTC (permalink / raw)
To: LVM general discussion and development
Hello Bryn,
I haven't had the time yet to try Stuart's suggestion... I've re did my
attempt to create the lv though, and this time with the -vvv option in
the step where I create the lv.
my steps:
dd if=/dev/sdb1 of=./disk0 # copy a existing LVM-partition to a file
losetup -f ./disk0 # link the file to a loop device
pvcreate /dev/loop0 # create a pv using the file
vgcreate SmallDiskGroup /dev/loop0 # create a new volumegroup using the
loop0 device as phisical volume.
vgchange -a y SmallDiskGroup #Activate the volumegroup
nb. vgdisplay SmallDiskGroup gives 'Act PV 1' but 'MAX LV 0'
the output of lvcreate -vvv -L1 -nSmallDiskVolume SmallDiskGroup is
downloadable here: http://pastebin.com/pastebin.php?dl=m2b9dcd7f
I hope you can find anything.
Greetings,
Geert
On Mon, 2008-09-29 at 10:08 +0100, Bryn M. Reeves wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> geert Geurts wrote:
> > 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?
>
> Hi Geert,
>
> What was the error you were getting at this point? If possible, can you
> use a service like pastebin.com to post the complete output of "lvcreate
> - -vvv" with the options you're using for the SmallDisk VG. That should
> give enough detail to have some idea where it's failing.
>
> I think the idea is reasonable enough although you'll probably need to
> do some fiddling around to get the size/number of the gmailfs volumes
> right to give good performance.
>
> Snapshots could definitely work here but I think it might be a bit
> tricky without some of the patches that are currently outstanding for
> device-mapper, esp. Mikulas' snapshot merging patches which you'd need
> to "restore" one of the COW areas. See the thread here:
>
> http://kerneltrap.org/Linux/LVM_Snapshot_Merging
>
> Regards,
> Bryn.
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.9 (GNU/Linux)
> Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org
>
> iEYEARECAAYFAkjgmxgACgkQ6YSQoMYUY96LegCcCHPZNLfhTUjIrsLiJcgROTDV
> +SwAoLFQDiGpkZl5tpEFW5hjFH+6OuAj
> =i+W8
> -----END PGP SIGNATURE-----
>
> _______________________________________________
> linux-lvm mailing list
> linux-lvm@redhat.com
> https://www.redhat.com/mailman/listinfo/linux-lvm
> read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [linux-lvm] lvm over loop device
2008-09-29 9:44 ` Geert Geurts
@ 2008-09-30 19:32 ` Steve Brueggeman
2008-10-04 17:08 ` geert Geurts
0 siblings, 1 reply; 8+ messages in thread
From: Steve Brueggeman @ 2008-09-30 19:32 UTC (permalink / raw)
To: LVM general discussion and development
I didn't see any replies to this, so I thought I'd post what I've found.
You have to specify a smaller extent size when creating the volume group. The
default extent size is 4MB, which is larger than your physical device on
/dev/loop1 (use the -s option)
For example, try this instead, which would give 4 extents on the 1MB physical
device on /dev/loop1 (I think. I am not certain about how much metadata exists
on the physical device for LVM2)
>vgcreate SmallDiskGroup -s256k /dev/loop0 # create a new volumegroup using the
>loop0 device as phisical volume.
Steve.
On Mon, 29 Sep 2008 11:44:40 +0200, you wrote:
>Hello Bryn,
>I haven't had the time yet to try Stuart's suggestion... I've re did my
>attempt to create the lv though, and this time with the -vvv option in
>the step where I create the lv.
>my steps:
>dd if=/dev/sdb1 of=./disk0 # copy a existing LVM-partition to a file
>losetup -f ./disk0 # link the file to a loop device
>pvcreate /dev/loop0 # create a pv using the file
>vgcreate SmallDiskGroup /dev/loop0 # create a new volumegroup using the
>loop0 device as phisical volume.
>vgchange -a y SmallDiskGroup #Activate the volumegroup
>
>nb. vgdisplay SmallDiskGroup gives 'Act PV 1' but 'MAX LV 0'
>
>the output of lvcreate -vvv -L1 -nSmallDiskVolume SmallDiskGroup is
>downloadable here: http://pastebin.com/pastebin.php?dl=m2b9dcd7f
>
>I hope you can find anything.
>
>Greetings,
>Geert
>
>On Mon, 2008-09-29 at 10:08 +0100, Bryn M. Reeves wrote:
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>>
>> geert Geurts wrote:
>> > 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?
>>
>> Hi Geert,
>>
>> What was the error you were getting at this point? If possible, can you
>> use a service like pastebin.com to post the complete output of "lvcreate
>> - -vvv" with the options you're using for the SmallDisk VG. That should
>> give enough detail to have some idea where it's failing.
>>
>> I think the idea is reasonable enough although you'll probably need to
>> do some fiddling around to get the size/number of the gmailfs volumes
>> right to give good performance.
>>
>> Snapshots could definitely work here but I think it might be a bit
>> tricky without some of the patches that are currently outstanding for
>> device-mapper, esp. Mikulas' snapshot merging patches which you'd need
>> to "restore" one of the COW areas. See the thread here:
>>
>> http://kerneltrap.org/Linux/LVM_Snapshot_Merging
>>
>> Regards,
>> Bryn.
>>
>> -----BEGIN PGP SIGNATURE-----
>> Version: GnuPG v1.4.9 (GNU/Linux)
>> Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org
>>
>> iEYEARECAAYFAkjgmxgACgkQ6YSQoMYUY96LegCcCHPZNLfhTUjIrsLiJcgROTDV
>> +SwAoLFQDiGpkZl5tpEFW5hjFH+6OuAj
>> =i+W8
>> -----END PGP SIGNATURE-----
>>
>> _______________________________________________
>> linux-lvm mailing list
>> linux-lvm@redhat.com
>> https://www.redhat.com/mailman/listinfo/linux-lvm
>> read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
>
>_______________________________________________
>linux-lvm mailing list
>linux-lvm@redhat.com
>https://www.redhat.com/mailman/listinfo/linux-lvm
>read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [linux-lvm] lvm over loop device
2008-09-30 19:32 ` Steve Brueggeman
@ 2008-10-04 17:08 ` geert Geurts
0 siblings, 0 replies; 8+ messages in thread
From: geert Geurts @ 2008-10-04 17:08 UTC (permalink / raw)
To: LVM general discussion and development
[-- Attachment #1: Type: text/plain, Size: 4116 bytes --]
hello steve,
Thanks for your reply, It seems logical not to have a extent larger than the
phisical size...
i don't have time right now but I'll look into it next week.
Thanks,
Greetings,
Geert
2008/9/30 Steve Brueggeman <xioborg@yahoo.com>
> I didn't see any replies to this, so I thought I'd post what I've found.
>
> You have to specify a smaller extent size when creating the volume group.
> The
> default extent size is 4MB, which is larger than your physical device on
> /dev/loop1 (use the -s option)
>
> For example, try this instead, which would give 4 extents on the 1MB
> physical
> device on /dev/loop1 (I think. I am not certain about how much metadata
> exists
> on the physical device for LVM2)
>
> >vgcreate SmallDiskGroup -s256k /dev/loop0 # create a new volumegroup using
> the
> >loop0 device as phisical volume.
>
> Steve.
>
>
> On Mon, 29 Sep 2008 11:44:40 +0200, you wrote:
>
> >Hello Bryn,
> >I haven't had the time yet to try Stuart's suggestion... I've re did my
> >attempt to create the lv though, and this time with the -vvv option in
> >the step where I create the lv.
> >my steps:
> >dd if=/dev/sdb1 of=./disk0 # copy a existing LVM-partition to a file
> >losetup -f ./disk0 # link the file to a loop device
> >pvcreate /dev/loop0 # create a pv using the file
> >vgcreate SmallDiskGroup /dev/loop0 # create a new volumegroup using the
> >loop0 device as phisical volume.
> >vgchange -a y SmallDiskGroup #Activate the volumegroup
> >
> >nb. vgdisplay SmallDiskGroup gives 'Act PV 1' but 'MAX LV 0'
> >
> >the output of lvcreate -vvv -L1 -nSmallDiskVolume SmallDiskGroup is
> >downloadable here: http://pastebin.com/pastebin.php?dl=m2b9dcd7f
> >
> >I hope you can find anything.
> >
> >Greetings,
> >Geert
> >
> >On Mon, 2008-09-29 at 10:08 +0100, Bryn M. Reeves wrote:
> >> -----BEGIN PGP SIGNED MESSAGE-----
> >> Hash: SHA1
> >>
> >> geert Geurts wrote:
> >> > 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?
> >>
> >> Hi Geert,
> >>
> >> What was the error you were getting at this point? If possible, can you
> >> use a service like pastebin.com to post the complete output of
> "lvcreate
> >> - -vvv" with the options you're using for the SmallDisk VG. That should
> >> give enough detail to have some idea where it's failing.
> >>
> >> I think the idea is reasonable enough although you'll probably need to
> >> do some fiddling around to get the size/number of the gmailfs volumes
> >> right to give good performance.
> >>
> >> Snapshots could definitely work here but I think it might be a bit
> >> tricky without some of the patches that are currently outstanding for
> >> device-mapper, esp. Mikulas' snapshot merging patches which you'd need
> >> to "restore" one of the COW areas. See the thread here:
> >>
> >> http://kerneltrap.org/Linux/LVM_Snapshot_Merging
> >>
> >> Regards,
> >> Bryn.
> >>
> >> -----BEGIN PGP SIGNATURE-----
> >> Version: GnuPG v1.4.9 (GNU/Linux)
> >> Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org
> >>
> >> iEYEARECAAYFAkjgmxgACgkQ6YSQoMYUY96LegCcCHPZNLfhTUjIrsLiJcgROTDV
> >> +SwAoLFQDiGpkZl5tpEFW5hjFH+6OuAj
> >> =i+W8
> >> -----END PGP SIGNATURE-----
> >>
> >> _______________________________________________
> >> linux-lvm mailing list
> >> linux-lvm@redhat.com
> >> https://www.redhat.com/mailman/listinfo/linux-lvm
> >> read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
> >
> >_______________________________________________
> >linux-lvm mailing list
> >linux-lvm@redhat.com
> >https://www.redhat.com/mailman/listinfo/linux-lvm
> >read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
>
>
> _______________________________________________
> linux-lvm mailing list
> linux-lvm@redhat.com
> https://www.redhat.com/mailman/listinfo/linux-lvm
> read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
>
[-- Attachment #2: Type: text/html, Size: 6041 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2008-10-04 17:09 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-26 12:04 [linux-lvm] lvm over loop device geert Geurts
2008-09-26 13:36 ` Stuart D. Gathman
2008-09-26 14:00 ` Larry Dickson
2008-09-26 17:37 ` geert Geurts
2008-09-29 9:08 ` Bryn M. Reeves
2008-09-29 9:44 ` Geert Geurts
2008-09-30 19:32 ` Steve Brueggeman
2008-10-04 17:08 ` geert Geurts
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.