Greetings. I have what seems to me to be a rather serious complaint/bug.
I recently installed Mandrake 6.0. Shortly thereafter I started noticing
hard disk problems that I couldn't explain, including filesystem corruption
and I/O errors. I've had no problems with my disks before this. I
eventually tracked down the problem to this code in /etc/rc.d/rc.sysinit:
# Optimisation of Hard drive.
if [ -x /sbin/hdparm ];then
LIST_HD=$(grep '^hd.*' /var/log/dmesg|\
grep -ivE '(CD.*ROM|FLOPPY|TAPE|STATUS)'|cut -d: -f1|sort|uniq)
for i in $LIST_HD;do
action "Starting Hard Drive optimisations for $i" \
hdparm -q -c1 -q -A1 -q -m16 -q -d1 /dev/$i
done
fi
I moved hdparm from /sbin so this wouldn't run. The errors stopped and
I've had no HD problems since. I don't know which setting was causing
problems but the hdparm man page says this for the m switch:
Some drives claim to support multiple mode, but lose data at some
settings. Under rare circumstances, such failures can result in
massive filesystem corruption.
Given this warning, these settings seems like strange and bad defaults. At
least I should be able to turn off these optimizations without having to
move the hdparm executable, and I'd argue that rc.sysinit shouldn't be
trying to optimize my hard disk at all since it doesn't know what it's
dealing with. If I were a Linux newbie I'd probably never have figured out
what was going on.
Comments?
Regards,
-Tom
PS. The latest initscripts rpm (4.23-1) in mandrake-devel still has these.