xfs
[Top] [All Lists]

Re: XFS problem on shutdown

To: linux-xfs@xxxxxxxxxxx
Subject: Re: XFS problem on shutdown
From: Ethan Benson <erbenson@xxxxxxxxxx>
Date: Tue, 18 Dec 2001 03:40:28 -0900
In-reply-to: <15391.857.360168.725214@gargle.gargle.HOWL>; from jasonjgw@pacific.net.au on Tue, Dec 18, 2001 at 07:50:33PM +1100
Mail-copies-to: nobody
Mail-followup-to: linux-xfs@xxxxxxxxxxx
References: <15390.31628.189691.98417@gargle.gargle.HOWL> <15391.857.360168.725214@gargle.gargle.HOWL>
Sender: owner-linux-xfs@xxxxxxxxxxx
User-agent: Mutt/1.2.5i
On Tue, Dec 18, 2001 at 07:50:33PM +1100, Jason White wrote:
> 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?

already done, current sysvinit does not use hdparm to work around
kernel bugs:

sysvinit (2.83-3) unstable; urgency=low

  * Don't disable write caching on IDE disks before unmounting file
    systems, since that flag is kept over reboot. Instead the
    halt program now has an extra -h switch that makes it send all
    IDE drives a "standby" command that as a side effect flushes
    the write-cache. That flag is used in /etc/init.d/halt

 -- Miquel van Smoorenburg <miquels@xxxxxxxxxx>  Wed,  7 Nov 2001 16:11:28 +0100

this does not require hdparm to be installed.

> 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

this is all gone now, your system is old.

-- 
Ethan Benson
http://www.alaska.net/~erbenson/

Attachment: pgpPvqOxsIqKh.pgp
Description: PGP signature

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