xfs
[Top] [All Lists]

Re: XFS problem on shutdown

To: linux-xfs@xxxxxxxxxxx
Subject: Re: XFS problem on shutdown
From: Jason White <jasonjgw@xxxxxxxxxxxxxx>
Date: Tue, 18 Dec 2001 19:50:33 +1100
In-reply-to: <15390.31628.189691.98417@gargle.gargle.HOWL>
References: <15390.31628.189691.98417@gargle.gargle.HOWL>
Reply-to: Jason White <jasonjgw@xxxxxxxxxxxxxx>
Sender: owner-linux-xfs@xxxxxxxxxxx
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


<Prev in Thread] Current Thread [Next in Thread>