Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I am running OpenSUSE 11.2 (but I do not suspect that this is distribution-specific).
uname -a gives:
Linux bach 2.6.31.8-0.1-desktop #1 SMP PREEMPT 2009-12-15 23:55:40 +0100 i686 i686 i386 GNU/Linux
I am running in runlevel 3 while trying to sort this out.
When smartd runs, it spins up my Western Digital drives from standby, but not my Samsung drive. My drives are all SATA:
/dev/sda WDC_WD3200AAKS (contains the whole file system, except /data/mythtv)
/dev/sdb WDC_WD5000AAKS (nothing mounted from this drive)
/dev/sdc SAMSUNG_HD204UI (sdc1 is mounted at /data/mythtv)
/dev/sdd WDC_WD1600JS (contains windows, nothing mounted )
The version of smartd I'm running is:
smartd 5.39 2009-08-08 r2872~ [i686-pc-linux-gnu] (openSUSE RPM)
My /etc/smartd.conf file contains these lines:
/dev/sda -d sat -n standby
/dev/sdb -d sat -n standby
/dev/sdc -d sat -n standby
/dev/sdd -d sat -n standby
I'm not concerned about the sda drive right now... I don't expect that to stay in standby since I'm often using it. But since sdb and sdd are not even mounted, I'd like to be able to spin those down.
I spin down the drives manually and check them (repeatedly) using:
When smartd runs, /var/log/message has lines like this for sdb, sdc,sdd:
Jan 22 13:48:09 bach smartd[8558]: Device: /dev/sdd [SAT], is in STANDBY mode, suspending checks
But drives sdb and sdd spin up, while sdc remains in standby.
I have replaced libatasmart with the most recent one I could find (libatasmart4-0.17-4.2.i586.rpm) (and ran ldconfig and rebooted).
I then tested, and it appears that libatasmart works as expected:
/usr/lib/DeviceKit-disks/devkit-disks-helper-ata-smart-collect /dev/sdd 1
leaves sdd in standby, and gives this response:
Disk /dev/sdd is asleep and nowakeup option was passed
while
/usr/lib/DeviceKit-disks/devkit-disks-helper-ata-smart-collect /dev/sdd 0
spins up sdd and spits out a blob of binary data.
I turned on logging for disk I/O using
echo 1 > /proc/sys/vm/block_dump
and I then get this in /var/log/messages:
Jan 22 13:48:09 bach smartd[8558]: Device: /dev/sdd [SAT], is in STANDBY mode, suspending checks
Jan 22 13:48:09 bach kernel: [12090.439458] udevd(419): dirtied inode 32987 (127) on tmpfs
Jan 22 13:48:09 bach kernel: [12090.439596] udevd(419): dirtied inode 32988 (\x2 fdevices\x2fpci0000:00\x2f0000:00:1f.5\x2fhost5\x2ftarget5:0:0\x2f5:0:0:0\x2fblo ck\x2fsdd) on tmpfs
Jan 22 13:48:09 bach kernel: [12090.446308] blkid(8743): READ block 0 on sdd
Jan 22 13:48:09 bach kernel: [12090.446331] blkid(8743): READ block 8 on sdd
.
.
Jan 22 13:48:09 bach kernel: [12090.446539] blkid(8743): READ block 248 on sdd
and then many lines like this:
Jan 22 13:48:13 bach kernel: [12094.772674] blkid(8743): READ block 312581632 on sdd
then a few lines like this:
Jan 22 13:48:13 bach kernel: [12094.776677] edd_id(8754): READ block 0 on sdd
then these lines:
Jan 22 13:48:13 bach kernel: [12094.780115] devkit-disks-pa(8755): READ block 0 on sdd
Jan 22 13:48:13 bach kernel: [12094.780165] devkit-disks-pa(8755): READ block 8 on sdd
Jan 22 13:48:13 bach kernel: [12094.780174] devkit-disks-pa(8755): READ block 16 on sdd
Jan 22 13:48:13 bach kernel: [12094.780182] devkit-disks-pa(8755): READ block 24 on sdd
Jan 22 13:48:13 bach kernel: [12094.780504] devkit-disks-pa(8755): READ block 144585000 on sdd
Anyone know why blkid, edd_id and devkit-disks-pa are reading my standby drives? And are these reads sufficient to make drives spin up? I'm not sure what to look at next.
If I run
devkit-disks --monitor-detail
then when smartd checks the drives (every 30 min, for example),
drive information is printed out, as if I had run
devkit-disks --show-info /dev/sdd
But when I do run devkit-disks --show-info /dev/sdx, drive sdx does not spin up.
And running this command does not spin up sdd, either:
devkit-disks --ata-smart-refresh /dev/sdd
However, running these commands does spin up sdd (WD) but not sdc (Samsung):
/lib/udev/devkit-disks-part-id /dev/sdc
/lib/udev/devkit-disks-part-id /dev/sdd
Since DeviceKit-Disks is now UDisks, and I'm not up-to-date with that package,
I'm going to give up at this point, and hope it is fixed in current versions.
After I upgrade to openSUSE 11.3 some day (or 11.4?), I'll see if smartd will work for me.
(No point in reporting bugs to the developers, if I'm not using the most recent version
of UDisks.)
For now, I'm just going to turn off smartd, and let my drives spin down.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.