LWN.net Logo

Advertisement

Fast storage & processing: iSCSI, NFS, SMB/CIFS, clusters for financial, media, HPC, research, virtualization

Advertise here

No LVM on loopback

No LVM on loopback

Posted Apr 23, 2008 12:55 UTC (Wed) by daniel (subscriber, #3181)
In reply to: No LVM on loopback by pr1268
Parent article: Benchmarking Linux filesystems on software RAID 1 (Lone Wolves)

I have set out to rewrite Linux LVM (lvm3 project, a merge of device mapper capabilities with
the generic block layer) and I will certainly ensure that the result works properly on
loopback files.  Anybody have more wishes?

Daniel


(Log in to post comments)

No LVM on loopback

Posted Apr 23, 2008 19:55 UTC (Wed) by nix (subscriber, #2304) [Link]

Useful snapshots: i.e. >32 of them, snapshots where snapshotting the root 
filesystem works... ideally a frontend command like chroot but which 
snapshots everything below some tree, kicks up a shell in it, and zaps all 
the snapshots when the shell exits.

(Why? So I can back my whole system up via snapshots, reliably. I might 
well have >32 filesystems: I obviously want to back up / without running a 
deadlock risk: and the chroot-in-snapshot command is just obviously 
useful.)

So far LVM snapshots have enough limitations that I haven't found a single 
use for them in practice... it would be nice to have snapshots that work. 
(Of course we might all go to btrfs and get them for free!)

No LVM on loopback

Posted Apr 23, 2008 21:01 UTC (Wed) by zlynx (subscriber, #2285) [Link]

I use LVM on a Fedora Core system at work.  I made a little script to snap each of the
filesystems, including the root fs, and then mount each snap in a snapshot directory.  That
script runs just before the nightly backup job which reads off the nightly snapshot.

The script also keeps a weekly snapshot.  The two snapshots are very convenient for grabbing
quick copies of old files.

I also took advantage of the ability to assign new LVs (which a snapshot is) to particular PVs
so as to distribute the write load across several disks.  Because, when a snapshot source is
written to, copies of the old blocks have to be written into the snapshots before the old
block can be overwritten on the source.  That sped things up a lot.

In a couple years of doing this I've never had that system lock up during a backup job, so the
risk of deadlock must be very low.

No LVM on loopback

Posted Apr 24, 2008 20:32 UTC (Thu) by nix (subscriber, #2304) [Link]

It is, but still... the problem is apparently that the lvm tools don't 
lock themselves in memory, and there's a window where I/O to the snapshot 
origin is disabled. If the OS needs to page in the LVM tools at that 
point, deadlock.

(And that's only the known deadlock.)

No LVM on loopback

Posted Apr 24, 2008 5:07 UTC (Thu) by muwlgr (guest, #35359) [Link]

I would wish :
 - raid1/raid5 facilities for separate LVs, unlike current situation
      when you have first to assemble the whole RAID PV 
      in underlying layer by mdadm.
 - online filesystem resizing, like jfs/jfs2 in AIX LVM.
      There was fsadm script in LVM1, but in LVM2 it has gone.

In short, the final wish really looks like ZFS/Btrfs and of course Zumastor :>

Copyright © 2008, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds