After further investigation, I discovered the following code in the
/etc/init.d/umountfs script included in the Debian pre-release. Note
that hdparm was not installed on my system, and that /proc/ide existed
(DMA had been enabled in the kernel configuration). As noted earlier,
my system performs power-off on halt, using APM.
I installed hdparm, then shut down and restarted the system twice. No
XFS recovery messages appeared in the kernel log. As yet I am unsure
whether this has fixed my problem - comments are welcome as to whether
this is likely to have been the cause, or whether, in any case, there
is a bug in the Debian script that ought to be reported: should sync
be executed even if hdparm isn't found?
My only other concerns are whether the improper shut-downs have
damaged the hard drive. They don't appear to have permanently
corrupted the file system (I ran xfs_check again on the root file
system, with no errors reported).
Here is the code (from /etc/init.d/umountfs):
#
# Turn off write caching on all IDE devices. Systems that
# do poweroff-on-halt might otherwise still be writing
# stuff to disk when the power is yanked - oops.
# The package 'hdparm' needs to be installed for this to work,
# since unfortunately there's no /proc interface for it yet.
#
if [ -x /sbin/hdparm ] && [ -d /proc/ide ]
then
sync
cd /proc/ide
for i in hd*
do
media="`cat $i/media 2>/dev/null`"
if [ -b "/dev/$i" ] && [ "$media" = disk ]
then
hdparm -W0 "/dev/$i" >/dev/null 2>&1
fi
done
fi
echo -n "Unmounting local filesystems... "
umount $FORCE -a -r
echo "done."
mount -n -o remount,ro /
: exit 0
|