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/
pgpPvqOxsIqKh.pgp
Description: PGP signature
|