I tried to snapshot LVM2 the root partition and (probably not to the surprise of most of you) hung my system. In thinking about this problem, I think there is a solution. I do not know precisely what causes the problem, but it can only be one of two things. First, it could be updates to /etc/lvm while the filesystem is suspended. This shouldn't be done at all. First, a journal of what the planned change is should be written to /etc/lvm, the filesystem suspended, the change made, the filesystem unsuspended, then a marker indicating that the change succeeded to /etc/lvm. Second, it could be the fact that the LVM executable is demand paged. It could be that a page of the executable is read in while the filesystem is suspended. This is trickier to solve, and having the problem is much more excusable than the first. The second problem can be solved by creating a temporary ramdisk, mounting it off of /tmp, copying lvm.static there, then forking and execing that lvm.static to do what the person asked. When it finishes, the original wakes back up to the new snapshotted reality (it was sitting in a 'waitpid' call the whole time) and removes the ramdisk. I may implement this (perhaps using a wrapper perl script), as I would like to be able to snapshot my root filesystem. If anybody knows that I'm wrong about something, please tell me before I start. Thanks, -- "It does me no injury for my neighbor to say there are twenty gods or no God. It neither picks my pocket nor breaks my leg." --- Thomas Jefferson "Go to Heaven for the climate, Hell for the company." -- Mark Twain -- Eric Hopper (hopper@omnifarious.org http://www.omnifarious.org/~hopper) --
Attachment:
pgpqnBCKaijtq.pgp
Description: 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/