LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This 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


Reply
  Search this Thread
Old 01-22-2011, 03:17 PM   #1
cynosura
LQ Newbie
 
Registered: Jan 2011
Posts: 2

Rep: Reputation: 0
smartd is spinning up some of my drives


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:

hdparm -y /dev/sdb (and sdc, sdd)
hdparm -C /dev/sdb (and sdc, sdd)

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.

Richard
 
Old 01-23-2011, 07:21 PM   #2
cynosura
LQ Newbie
 
Registered: Jan 2011
Posts: 2

Original Poster
Rep: Reputation: 0
More info from original poster

I've narrowed the problem down, perhaps

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.

Richard
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Hard Drives Contantly Spinning Down when on Battery Power rmjohnso Slackware 3 12-27-2010 05:09 PM
Using smartd to check health of hard-drives? felixk Linux - Software 4 09-25-2009 07:18 PM
LXer: Know when your drives are failing, with smartd LXer Syndicated Linux News 0 12-09-2008 06:00 AM
spinning down hard drives cleff Linux - Software 4 06-20-2004 11:09 AM
Hard drives spinning up and down continuously r_jensen11 Linux - Hardware 2 02-26-2004 04:45 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 05:24 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration