From Bugzilla Helper: User-Agent: Mozilla/5.0 Galeon/1.0.3 (X11; Linux i686; U;) Gecko/20020205 Description of problem: /etc/init.d/halt unmounts and re-mounts read-only the filesystems without making absolutely sure the disk caches are flushed before. In an ideal world, this shouldn't be a bad thing, because remount ro is supposed to do that, but sometimes, due to weird bugs in different filesystems and/or utilities, it doesn't. It is therefore far more safe to perform a /bin/sync after killing all processes but before remounting filesystems. Some other distributions do that (i think Slackware is an example), and i think they have a good reason for it. Version-Release number of selected component (if applicable): How reproducible: Sometimes Steps to Reproduce: 1. Install Red Hat 7.2 SGI version (using XFS as a filesystem) 2. Use ntsysv to manage services 3. Reboot Actual Results: The system should come up cleanly Expected Results: A lot of files in /etc/xinetd.d get corrupted. Additional info: This problem has been discussed on linux-xfs.com The thread is here: http://oss.sgi.com/projects/xfs/mail_archive/0203/msg00331.html Quite a few sysadmins made a point from performing a "sync" before rebooting/halting a system, as a good precaucion; i think the OS should learn from their experience. ;-) Please don't dismiss this bug report as being "XFS related" or anything like that. I believe sync-ing the filesystems before remounting them increases the reliability of the OS; Red Hat should do that (some other distributions already do that). Here is my patch for /etc/init.d/halt: [root@stantz root]# diff -u halt.orig halt --- halt.orig Tue Mar 26 12:32:46 2002 +++ halt Tue Mar 26 12:49:15 2002 @@ -125,6 +125,10 @@ [ -x /sbin/quotaoff ] && runcmd $"Turning off quotas: " /sbin/quotaoff -aug +# Sync all filesystems, just in case +[ -x /bin/sync ] && runcmd $"Syncing all filesystems: " /bin/sync +sleep 5 + # Unmount file systems, killing processes if we have to. # Unmount loopback stuff first remaining=`awk '!/^#/ && $1 ~ /^\/dev\/loop/ && $2 != "/" {print $1}' /proc/mounts` [root@stantz root]# Maybe the sleep parameter should be tuned in /etc/sysconfig/... ? I'm not sure which is the best value for it.
You mention "but sometimes, due to weird bugs in different filesystems and/or utilities, it doesn't." - then those bugs should be fixed.