On Tue, 15 Jul 2008, David Mathog wrote: > Is a similar command necessary for lvm? Or will the lvm volume have been > remounted readonly "automagically" by this section of the halt script, > which precedes the above changes by a couple of lines? > > # Remount read only anything that's left mounted. > # echo $"Remounting remaining filesystems readonly" > mount | awk '{ print $3 }' | while read line; do > fstab-decode mount -n -o ro,remount $line > done The above makes all mounted filesystems readonly, including those on logical volumes. There is no "mounting" for LVM itself. Under normal operations, the metadata does not change. If the system is in the middle of a pvmove - well - making the metadata suddenly readonly won't exactly help matters. Ideally, LVM should update metadata in a manner that leaves it consistent should the system crash in the middle. The current LVM strives toward that goal. But there shouldn't be any LVM updating going on during a shutdown. There is no LVM metadata updated in normal operations. Snapshots will update the COW table. Mounting the filesystems read-only should freeze that. And again, COW updates are designed to be interruptable. > It is important that the logical volume is shut down nicely on a power > failure event, since it takes a very long time to fsck it, and that Even if you lose power before the mount readonly, you don't need a full fsck for journalled filesystems. If you are using Xen, then virtual machines may be updating their filesystems. The standard shutdown for Xen will either shutdown each VM or suspend each VM to disk. Suspending to disk is actually the fastest approach. You don't need to worry about swap. -- Stuart D. Gathman <stuart@bmsi.com> Business Management Systems Inc. Phone: 703 591-0911 Fax: 703 591-6154 "Confutatis maledictis, flammis acribus addictis" - background song for a Microsoft sponsored "Where do you want to go from here?" commercial. _______________________________________________ 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/