[linux-lvm] / on LVM - what to do on shutdown?
Heinz J. Mauelshagen
Heinz.Mauelshagen at t-online.de
Mon Nov 6 23:43:06 UTC 2000
On Mon, Nov 06, 2000 at 12:24:23PM +0100, Friedrich Lobenstock wrote:
> I have a problem because I don't know what to do when / is on lvm.
> Currently /sbin/init.d/halt does the following (/ is not on lvm):
> echo "Unmounting file systems"
> umount -avt noproc,nonfs
> umount -anvt proc
> if test -d /etc/lvmtab.d -a -x /sbin/vgchange ; then
> /sbin/vgchange -a n
> mount -no remount,ro / 2> /dev/null
> halt -d -f
> Now what if / is on lvm? Should I really call "/sbin/vgchange -a n" ?
You can safely do it because it tries to deactivate all active VGs
the LVM driver is aware which fails for VGs with open LVs anyway.
Nothing is written to any device by the LVM during "vgchange -a n".
IOW: no harm happens if you avoid it completely during shutdown.
> What are with the commands afterwards will they fail or might
> the lvm device get mixed up because of not correctly closing it?
> Or should I load a ramdisk to do the work, if at all possible?
> I think the md-Device does a clean shutdown by itself, because
> I use md to create a raid1 with lvm on top?
> PS: You might gess that I'm using SuSE Linux, 7.0 to precise.
> The kernel ist 2.4.0-test10.
> MfG / Regards
> Friedrich Lobenstock
Heinz -- The LVM guy --
Heinz Mauelshagen Sistina Software Inc.
Senior Consultant/Developer Bartningstr. 12
Mauelshagen at Sistina.com +49 6151 7103 86
FAX 7103 96
More information about the linux-lvm