You are not logged in.

#1 2006-02-04 02:55:35

From: USA
Registered: 2003-10-03
Posts: 39

Determining why a hard drive won't spin down

I'm trying to determine why a hard drive won't stay spun down... I can do 'hdparm -y /dev/hda', but the drive spins back up immediately.  /dev/hdb doesn't behave this way.  The only mounted partitions are on my SATA drive, /dev/sda*, so nothing should be trying to access /dev/hda*


#2 2006-02-04 03:19:52

Forum Fellow
From: Melbourne, Australia
Registered: 2004-10-09
Posts: 4,927

Re: Determining why a hard drive won't spin down

Just been working over this one with hollywoodb in IRC.

we've determined that it isnt cron, hal, acpid, X, X clients (any X app).

The drive isnt referenced in fstab, there are no unusual messages in dmesg.

The drive is not mounted.

lsof reports nothing accessing the drive

stock kernel, with slightly modified initrd to prevent a scsi lockup

hdparm -Y, which is the lowest sleep state, normally takes a reboot/reset to get out of, doesnt work either.



#3 2006-02-04 03:29:19

From: USA
Registered: 2003-10-03
Posts: 39

Re: Determining why a hard drive won't spin down

I'm finally pretty sure this had something to do with initial ramdisk on boot...

from dmesg:

ReiserFS: hda6: found reiserfs format "3.6" with standard journal
ReiserFS: hda6: using ordered data mode
ReiserFS: hda6: journal params: device hda6, size 8192, journal first block 18, max trans len 1024, max batch 900, max commit age 30, max trans age 30
ReiserFS: hda6: checking transaction log (hda6)
ReiserFS: hda6: Using r5 hash to sort names

(/dev/hda is the drive I'm trying to spin down)

on actual boot this is the text displayed before the line that confirms the initial ramdisk has been created/initialized/whathaveyou....

I don't know how to handle this, looks kernel level?


#4 2006-02-04 11:39:54

From: USA
Registered: 2003-10-03
Posts: 39

Re: Determining why a hard drive won't spin down

alright, as in the previous post it detects reiserfs on /dev/hda6 and then says Initial RAMDISK loading completed, or something along that line during boot.

I've tried recreating initrd twice, with and without AUTODETECT flag set. There's no reason to use /dev/hda at all, everything I can think of is set to /dev/sda2 instead of /dev/hda6. I originally installed Arch on hda6, however now /dev/hda* is not even mentioned in fstab.

Output of 'mount':

/dev/sda2 on / type reiserfs (rw)
none on /proc type proc (rw)
none on /sys type sysfs (rw)
none on /dev/pts type devpts (rw)
none on /dev/shm type tmpfs (rw)
/dev/sda4 on /home type ext2 (rw)
none on /proc/bus/usb type usbfs (rw)

Output of 'cat /proc/mounts':

rootfs / rootfs rw 0 0
/dev/root / reiserfs rw 0 0
none /dev ramfs rw 0 0
none /proc proc rw,nodiratime 0 0
none /sys sysfs rw 0 0
none /dev/pts devpts rw 0 0
none /dev/shm tmpfs rw 0 0
/dev/sda4 /home ext2 rw,nogrpid 0 0
none /proc/bus/usb usbfs rw 0 0


#5 2006-02-04 11:54:41

From: USA
Registered: 2003-10-03
Posts: 39

Re: Determining why a hard drive won't spin down

I've decided this is GRUB related....

HD configuration:
(hd0) : /dev/hda
(hd1) : /dev/hdb
(hd2) : /dev/sda

also present are /dev/hdc and /dev/hdd, CDRW and DVDRW respectively, as well as floppy, but those are insignificant

grub> root (hd2,1)
 Filesystem type is reiserfs, partition type 0x83

grub> find /boot/grub/stage1


now why won't grub find (hd2,1) as having the necessary files?
it currently won't let me install grub to /dev/sda boot sector either.  I'll look into grub and SATA tomorrow when I'm back from fishing smile

root@hollywoodb:/home/hollywoodb# mount | grep sda
/dev/sda2 on / type reiserfs (rw)
/dev/sda4 on /home type ext2 (rw)

root@hollywoodb:/home/hollywoodb# ls -l / | grep boot
drwxr-xr-x   3 root root  360 2005-12-19 19:04 boot

root@hollywoodb:/home/hollywoodb# ls -l /boot
total 11538
-rw-r--r--  1 root root  833433 2005-11-22 21:43
-rw-r--r--  1 root root  721335 2006-01-03 04:35 System.map26
drwxr-xr-x  2 root root     480 2006-02-04 05:51 grub
-rw-r--r--  1 root root 3593917 2006-01-09 12:54 initrd26-full.img
-rw-r--r--  1 root root 1449236 2006-02-04 05:34 initrd26.2006-02-03.img
-rw-r--r--  1 root root 1145288 2006-02-04 05:35 initrd26.img
-rw-r--r--  1 root root   37344 2005-11-22 21:43 kconfig
-rw-r--r--  1 root root   56657 2006-01-09 12:54 kconfig26
-rw-r--r--  1 root root 2136104 2005-11-22 21:43 vmlinuz
-rw-r--r--  1 root root 1812690 2006-01-03 04:35 vmlinuz26

root@hollywoodb:/home/hollywoodb# ls -l /boot/grub/
total 208
-rw-r--r--  1 root root   7744 2006-02-04 05:51 e2fs_stage1_5
-rw-r--r--  1 root root   7472 2006-02-04 05:51 fat_stage1_5
-rw-r--r--  1 root root   6752 2006-02-04 05:51 ffs_stage1_5
-rw-r--r--  1 root root   6784 2006-02-04 05:51 iso9660_stage1_5
-rw-r--r--  1 root root   8256 2006-02-04 05:51 jfs_stage1_5
-rw-r--r--  1 root root   1252 2006-02-04 05:45 menu.lst
-rw-r--r--  1 root root   1228 2005-12-19 19:04 menu.lst.pacnew
-rw-r--r--  1 root root   6944 2006-02-04 05:51 minix_stage1_5
-rw-r--r--  1 root root   9152 2006-02-04 05:51 reiserfs_stage1_5
-rw-r--r--  1 root root    512 2006-02-04 05:51 stage1
-rw-r--r--  1 root root 104082 2006-02-04 05:51 stage2
-rw-r--r--  1 root root   7092 2006-02-04 05:51 ufs2_stage1_5
-rw-r--r--  1 root root   6400 2006-02-04 05:51 vstafs_stage1_5
-rw-r--r--  1 root root   9192 2006-02-04 05:51 xfs_stage1_5

I had just remembered/realized that I had originally installed GRUB to the boot sector on /dev/hda... while i don't see how this matters in the grand scheme of things once I'm booted its the last link to /dev/hda I can find on this system. I even explicitly defined drive assignments for kernel and initrd in grub.conf/menu.lst:


# (0) Arch Linux
title  Arch Linux  [/boot/vmlinuz]
root   (hd2,1)
kernel (hd2,1)/boot/vmlinuz26 root=/dev/sda2 ro
initrd (hd2,1)/boot/initrd26.img


Board footer

Powered by FluxBB