/ on LVM - what to do on shutdown?
Hi!
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
fi
[..]
mount -no remount,ro / 2> /dev/null
sync
[..]
halt -d -f
Now what if / is on lvm? Should I really call "/sbin/vgchange -a n" ? 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
Quoted 16 lines · Friedrich Lobenstock
Hi!
I have a problem because I don't know what to do when / is on lvm.
Currently
/sbin/init.d/haltdoes the following (/ is not on lvm):[..]
echo "Unmounting file systems"
umount -avt noproc,nonfs
[..]
umount -anvt procif test -d
/etc/lvmtab.d-a -x/sbin/vgchange; then
/sbin/vgchange-a n
fi
Quoted 8 lines
[..]
mount -no remount,ro / 2>/dev/null
sync
[..]
halt -d -fNow 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.
Quoted 13 lines
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
Signature · 12 lines
Regards,
Heinz -- The LVM guy --
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Heinz Mauelshagen Sistina Software Inc.
Senior Consultant/Developer Bartningstr. 12
64289 Darmstadt
Germany
[email protected] +49 6151 7103 86
FAX 7103 96
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-