LWN.net Logo

Advertisement

Advanced thin client solution for Linux, based on Open Source. Mix Windows and Linux applications on the same desktop.

Advertise here

No LVM on loopback

No LVM on loopback

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

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!)


(Log in to post comments)

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.)

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