disabling SMART for HDD's

Greetings.

I’ve got one nasty problem with smart(d).

I want to leave two of my HHD’s spun down (in sleep mode) until I need them, mainly for reasons of data security and acoustics.

For this I use

hdparm -Y /dev/sdx

where x is b and c.

this works pretty well for the sdb drive, which is a Samsung HDD. Althgough I’ve got smartd running and SMART enabled in BIOS this drive (sdb) refuses to accept it.
Because of this refusal the HDD remains in sleep-mode until needed.

If I do the same for my sdc HDD (Seagate ST3500320AS) after some time the drive will go into active/idle mode again, thus spinning up.
I’ve traced this with btrace to the following: (*)

  8,32   1        0     0.000000000     0  m   N cfq30S / put_queue
  8,32   0        0   164.349468222     0  m   N cfq5861S / put_queue
  8,32   0        1   807.528579173  3648  G   N [smartd]
  8,32   0        2   807.528580490  3648  I   N 0 (85 06 2c 00 da 00 00 00 00 00 4f 00 c2 00 b0 00 ..) [smartd]
  8,32   0        3   807.528581521  3648  D   N 0 (85 06 2c 00 da 00 00 00 00 00 4f 00 c2 00 b0 00 ..) [smartd]

Seeing as this seems a SMART issue I have tried to deactivate SMART by using

smartctl -s off /dev/sdc
smartctl --smart=off --offlineauto=off --saveauto=off /dev/sdc

By smartctl doc this should disable smart, and it does:


LinDevNV:~ # smartctl --all /dev/sdc
smartctl 5.40 2010-10-16 r3189 [x86_64-unknown-linux-gnu] (SUSE RPM)
Copyright (C) 2002-10 by Bruce Allen, http://smartmontools.sourceforge.net

=== START OF INFORMATION SECTION ===
Model Family:     Seagate Barracuda 7200.11 family
Device Model:     ST3500320AS
Serial Number:    9QM28X8L
Firmware Version: SD1A
User Capacity:    500,107,862,016 bytes
Device is:        In smartctl database [for details use: -P show]
ATA Version is:   8
ATA Standard is:  ATA-8-ACS revision 4
Local Time is:    Tue Nov  8 11:28:55 2011 CET
SMART support is: Available - device has SMART capability.
SMART support is: Disabled

SMART Disabled. Use option -s with argument 'on' to enable it.

Alas, it seems this doesn’t do jack - as I still get the results from (*).

Does anybody have any idea how I could prevent this access?

On 2011-11-08 11:36, Aquinox wrote:
> Does anybody have any idea how I could prevent this access?

I don’t think disabling SMART is a good idea. Rather change the current
config of the daemon so that it doesn’t trigger so often for that disk.


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)

I don’t see the need for smartd to trigger the check ever(!) as long as the disk is spun down. Because every time it does the HDD will spin up, and that is something I want to prevent.

On the other hand I have nothing against the daemon checking the HDD when I have manually started it.

Basically this means that I want to be able to disable the scanning and put the HDD to sleep by hand.

Am I mistaken to assume, that using “smartctl -s off /dev/sdc” the smartd should not access the HDD, or is it again the problem of two programs knowing nothing of each other?

On 11/08/2011 11:36 AM, Aquinox wrote:
> how I could prevent this access?

as far as i know SMART is not required, so use YaST to uninstall it…


DD
http://tinyurl.com/DD-Caveat
openSUSE®, the “German Automobiles” of operating systems

On 2011-11-08 13:26, DenverD wrote:
> On 11/08/2011 11:36 AM, Aquinox wrote:
>> how I could prevent this access?
>
> as far as i know SMART is not required, so use YaST to uninstall it…

But that is dangerous. If a failure develops in the disk(s) you will not
get warning. It is certainly not a required package, but…


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)

On 2011-11-08 13:36, Aquinox wrote:
>
> I don’t see the need for smartd to trigger the check ever(!) as long as
> the disk is spun down. Because every time it does the HDD will spin up,
> and that is something I want to prevent.

You can adjust it so that it happens once a day or a week.

>
> On the other hand I have nothing against the daemon checking the HDD
> when I have manually started it.

The daemon will not know that.

> Basically this means that I want to be able to disable the scanning and
> put the HDD to sleep by hand.
>
> Am I mistaken to assume, that using “smartctl -s off /dev/sdc” the
> smartd should not access the HDD, or is it again the problem of two
> programs knowing nothing of each other?

You are using a command by hand that contradicts what the daemon has in its
configuration. You have to configure the daemon.

Hint: /etc/smartd.conf


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)

Why not look for a firmware update for the hard drive?

@robin_listas

well I put the following lines into /etc/smartd.conf

/dev/sdc -s s/../../(1|3|5)/16
/dev/sdc -s L/../../7/12
/dev/sdb -s L/../../7/16

Which, going by smartd manpage, should make smartd access sdc only on Monday, Wednesday, Friday and Sunday.
After restarting smartd I sent the HDD sleeping with hdparm -Y /dev/sdc

Result:

  8,32   0        0     0.000000000     0  m   N cfq5373S / put_queue
  8,32   1        0   783.838466463     0  m   N cfq5488S / alloced
  8,32   1        1   783.838470518  5488  G   N [smartd]
  8,32   1        2   783.838478426  5488  I   N 0 (85 06 2c 00 da 00 00 00 00 00 4f 00 c2 00 b0 00 ..) [smartd]
  8,32   1        3   783.838481772  5488  D   N 0 (85 06 2c 00 da 00 00 00 00 00 4f 00 c2 00 b0 00 ..) [smartd]

and a hdd which is spinning happily idling the time away.

What did I do wrong?

@GofBorg

Unfortunately I currently do not have the capacity to back up 400GB of data to proceed upgrading the firmware of the HDD, especially as I do not think I need a FW upgrade as I do not have any data-accessability issues as described on the Seagate Page. (or are we talking about different kinds of firmware).

>I do not have any data-accessability
> issues as described on the Seagate Page.

I was just going by the statement you made that SMART was spinning down one
drive just fine and the other would spin down and then come back up so I
thought perhaps there might be a firmware available that addressed and issue
with the drive itself.

Here’s a thought though, does the drive that does not stay spun down
have a swap or log file on it that is getting accessed?

SMART could be spinning it back up, but maybe it is getting a request to do
so.

I understood your Idea w.r.t. firmware and therefore I looked it up on the Seagate page.
However, the newest version of firmware for this drive is sth. about unaccessible data after wake-up of the HDD, so I don’t think it is crucial at the moment - if/when I get myself another datagrave I’ll do the upgrade.(thanks for the idea)

Looking in YaST (Partition Manager) all hdd except for sda contain NTFS partitions which are not mounted.
The HDD in question (sdc) contains just a small portion of unused space.

On another note: afaik smartd is a daemon solely for monitoring the HDD health status, so it should not get any request except, maybe, from
some monitoring software or the kind - but I do not remember seeing such a thing on my system.

On 2011-11-08 17:16, Aquinox wrote:
>
> @robin_listas
>
> well I put the following lines into /etc/smartd.conf
>
>
> Code:
> --------------------
> /dev/sdc -s s/…/…/(1|3|5)/16
> /dev/sdc -s L/…/…/7/12
> /dev/sdb -s L/…/…/7/16
>
> --------------------
>
>
> Which, going by smartd manpage, should make smartd access sdc only on
> Monday, Wednesday, Friday and Sunday.
> After restarting smartd I sent the HDD sleeping with hdparm -Y
> /dev/sdc
>
> Result:
>
> Code:
> --------------------
> 8,32 0 0 0.000000000 0 m N cfq5373S / put_queue
> 8,32 1 0 783.838466463 0 m N cfq5488S / alloced
> 8,32 1 1 783.838470518 5488 G N [smartd]
> 8,32 1 2 783.838478426 5488 I N 0 (85 06 2c 00 da 00 00 00 00 00 4f 00 c2 00 b0 00 …) [smartd]
> 8,32 1 3 783.838481772 5488 D N 0 (85 06 2c 00 da 00 00 00 00 00 4f 00 c2 00 b0 00 …) [smartd]
>
> --------------------

I can not interpret those lines, but I imagine smartd is using the disk.

> and a hdd which is spinning happily idling the time away.
>
> What did I do wrong?

Mmm.

I wonder if reading the parameters like temperature and others that smartd
monitors continuously makes the drive spin up :-?
If so, entries are logged in syslog.

Have a look a the “DEVICESCAN” line: the comments on the file say that
further lines are ignored. Thus your line above may not be working.


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)

Have a look a the “DEVICESCAN” line: the comments on the file say that
further lines are ignored. Thus your line above may not be working.

uh-oh.

This may well be the case. I appended the lines given at the end of the file.

Will be testing now.

Well up till now the matter looks resolved!

Have sent /dev/sdc yesterday to sleep and checked back just now. Up until the check the HDD seems to have been in sleep mode.
Which would mean that SMART does not bother it any more.

The trick was to put the commands from the end of the file to it’s beginning (before DEVICESCAN).

Thanks a lot robin! :slight_smile:

On 2011-11-09 16:46, Aquinox wrote:

> The trick was to put the commands from the end of the file to it’s
> beginning (before DEVICESCAN).
>
> Thanks a lot robin! :slight_smile:

Welcome!


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)