The /etc/rc.d/init.d/halt fails to stop any md? devices, because of unmounting /proc too early. Furthermore only ext2 partitions are remounted ro during the last phase of the shutdown, leaving any other filesystems mounted rw. Patch follows: --- /etc/rc.d/init.d/halt Wed Dec 8 15:49:54 1999 +++ /etc/rc.d/init.d/halt.raid Wed Dec 8 15:50:39 1999 @@ -83,7 +83,7 @@ retry=$(($retry-1)) sig=-9 done -runcmd "Unmounting proc file system" umount /proc + mount -n -o remount,ro / # turn off raid @@ -101,9 +101,11 @@ #runcmd "Turning off RAID" /sbin/raidstop -a fi +runcmd "Unmounting proc file system" umount /proc + # Remount read only anything that's left mounted. #echo "Remounting remaining filesystems (if any) readonly" -mount | awk '/ext2/ { print $3 }' | while read line; do +mount -t noproc,devpts,nfs | awk '{ print $3 }' | while read line; do mount -n -o ro,remount $line done
Um, anthying else should already have been unmounted earlier. The /proc unmounted has moved in CVS; will be fixed in initscripts-4.72 when it is released.
Sure, but if we are trying to remount the remaining fs' ro, we'd try this for all the fs and not only ext2. And if it happens, that a fs cannot be unmounted (in use), it might be possible to remount it ro, so we can get around a (possibly lengthy) fsck run on reboot...
*** Bug 7719 has been marked as a duplicate of this bug. ***