POWER MODE and sat,12 again

Alfred Ganz <[email protected]>
Newsgroups gmane.linux.utilities.smartmontools
Message-ID <[email protected]>
Ladies and Gentlemen,

This may not be a smartmontools problem, but I wonder if someone might 
have some advice on how to proceed to identify my problem. It looks to 
me like the world is going backwards, see the trials about some very
similar issues in 2009 (and the same disk no less!) that resulted in 
kernel changes as well as other modifications at:
http://sourceforge.net/p/smartmontools/mailman/smartmontools-support/thread/[email protected]/

Since then I have been running the available packaged version of smartd 
on various versions of CentOS. The disk in question is a Maxtor-OneTouch 
USB disk (0d49:7310). Since it is mainly used for backups it is run with 
the spindown timer set. The smartd.conf entry for it is:
  /dev/sdb -d sat,12 -n standby,q -s (L/../09/./01|S/../.././03) -a -m root
which has worked just as expected until now, when the disk is up there 
are smart reports, if it is spun down smartd leaves it alone.

However, after I just upgraded CentOS from 6.6. to 6.7 (which did not
change smartmontools, 5.43-1.el6 before and after the upgrade) I now 
get an error message indicating that the standby parameter was ignored 
(and the disk is always spun up):
  smartd[12177]: Device: /dev/sdb [SAT], no ATA CHECK POWER STATUS support,
	ignoring -n Directive

Note that tests with smartctl show that the proper device type for the
disk still has to be sat,12 and except for the -n parameter everything
seems to work as expected. Here is the output for smartctl with -r and 
-n however:
  # smartctl -r ioctl,2 -n standby -d sat,12 /dev/sdb
  smartctl 5.43 2012-06-30 r3573 [i686-linux-2.6.32-573.1.1.el6.i686] (local build)
  Copyright (C) 2002-12 by Bruce Allen, http://smartmontools.sourceforge.net
  
  
  REPORT-IOCTL: Device=/dev/sdb Command=CHECK POWER MODE
   Input:   FR=...., SC=...., LL=...., LM=...., LH=...., DEV=...., CMD=0xe5
   [ata pass-through(12): a1 06 2c 00 00 00 00 00 00 e5 00 00 ]
    scsi_status=0x0, host_status=0x7, driver_status=0x8
    info=0x1  duration=1 milliseconds  resid=0
    >>> Sense buffer, len=22:
   00     72 04 00 00 00 00 00 0e  09 0c 00 00 50 ff 00 00                        
   10     00 00 00 00 00 50                                                       
    status=2: [desc] sense_key=4 asc=0 ascq=0
  sat_device::ata_pass_through: scsi error: medium or hardware error (serious)
  Values from ATA Return Descriptor are:
   00     09 0c 00 00 50 ff 00 00  00 00 00 00 00 50                              
   [Duration: 0.001s]
  REPORT-IOCTL: Device=/dev/sdb Command=CHECK POWER MODE returned -1 errno=5 [scsi error medium or hardware error (serious)]
  Sector Count Register (BASE-16): 00

Note that this result is the same independent of the actual POWER MODE
of the device.

Here are some additional observations:
 * the output from lsusb is the same as in 2009.
 * the output for "hdparm -I --prefer-ata12 /dev/sdb" is the same
   as in 2009.
 * the output for "hdparm -I --verbose /dev/sdb" is rather rudimentary, 
   the incoming SG_IO data is empty.
 * however, "hdparm -S 180 --prefer-ata12 --verbose /dev/sdb" no longer 
   works on the new system, it fails with:
     setting standby to 180 (15 minutes)
    outgoing cdb:  a1 06 20 00 b4 00 00 00 40 e3 00 00 00 00 00 00
    SG_IO: ATA_12 status=0x0, host_status=0x7, driver_status=0x8
    SG_IO: bad host status: 0x7
    Trying legacy HDIO_DRIVE_CMD
     HDIO_DRIVE_CMD(setidle) failed: Invalid argument
 * the only way I was able to set the spindown timer on the new
   system is without --prefer-ata12, but hdparm hasn't changed 
   (9.43-4.el6 before and after the upgrade):
     setting standby to 180 (15 minutes)
    outgoing cdb:  85 06 20 00 00 00 b4 00 00 00 00 00 00 40 e3 00
    SG_IO: ATA_16 status=0x0, host_status=0x0, driver_status=0x0
    SG_IO: sb[]:  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    SG_IO: desc[]:  00 00
          ATA_16 stat=00 err=00 nsect=00 lbal=00 lbam=00 lbah=00 dev=00

I also did the above on a CentOS 7.1 system (x86_64) where smartmontools
is version 6.2-4.el7 and hdparm version is still 9.43-5.el7. The results 
are very similar to CentOS 6.7.

So it looks like access to POWER MODE has changed with the new system
as well as with Centos 7.1 while the rest hasn't changed. I don't know if 
this is a change that must be addressed in smartmontools or if the disk 
interface has somehow been munged. I don't know the differences between
the ATA-12 passthrough interface and the interface to the POWER MODE, so
I really don't know what is going on here.

Since this is a production type system I'd rather not build my own 
version of smartmontools unless this is a known problem which has been 
fixed in a 6.? version. If anybody has any suggestions on how to further 
explore this problem I would much appreciate any advice. 

Thanks for any help and thanks for all the work on smartmontools, AG

-- 
 ----------------------------------------------------------------------
   Alfred Ganz					alfred-ganz:at:agci.com
   AG Consulting				(203) 624-9667
   440 Prospect Street # 11
   New Haven, CT 06511
 ----------------------------------------------------------------------

------------------------------------------------------------------------------
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.