[svlug] smartctl : strange behavior

Lister lister90 at bluehatsoft.com
Sat Oct 17 13:01:51 PDT 2015


On 10/17/2015 12:41 PM, Karen Shaeffer wrote:
> On Sat, Oct 17, 2015 at 11:53:12AM -0700, Lister wrote:
>>
>> On 10/17/2015 09:03 AM, kevin dankwardt wrote:
>>> Perhaps this will help. Of course it may not be /dev/sdb.
>>>
>>> |sudo smartctl -d sat --all /dev/sdb
>>> sudo smartctl -d sat,12 --all /dev/sdb|
>> Tried that. No difference
>>
>> [1998]$ lsusb | grep -i seagate
>> Bus 002 Device 006: ID 0bc2:3312 Seagate RSS LLC
>>
>> [1999]$ ls /dev/disk/by-id/usb-Seagate_Expansion_Desk_2HC015KJ-0\:0 -l
>> 0 lrwxrwxrwx 1 root root 9 Oct 17 10:54
>> /dev/disk/by-id/usb-Seagate_Expansion_Desk_2HC015KJ-0:0 -> ../../sdc
>>
>> [2001]$ sudo smartctl -d sat -i !1999:1
>> sudo smartctl -d sat -i
>> /dev/disk/by-id/usb-Seagate_Expansion_Desk_2HC015KJ-0\:0
>> smartctl 6.4 2014-10-07 r4002 [x86_64-linux-3.19.0-30-generic] (local build)
>> Copyright (C) 2002-14, Bruce Allen, Christian Franke, www.smartmontools.org
>>
>> Read Device Identity failed: scsi error unsupported field in scsi command
>>
>> A mandatory SMART command failed: exiting. To continue, add one or more
>> '-T permissive' options.
>>
>> Same for -d sat,12 and -d sat,16
>>
>> What puzzles me is that it works well with debian 8.1. I did a little
>> more experiment -- I booted debian 8.1, mounted the ubuntu 15.04 root
>> file system and chrooted (after mound binding /proc, sys and /dev). That
>> is, I tried running ubuntu binaries with a debian kernel. To my
>> surprise, it was successful in getting the smart data.
>>
>> I think the problem lies with ubuntu kernel or system init sequence. I
>> don't know how to run a debian kernel on ubuntu (the dependencies fail
>> ...etc.)
>>
>> Any suggestions on how to run a debian kernel on ubuntu distro (or
>> ubuntu kernel on debian?)
>>
>> Thanks
>> Om.
>>
> 
> Hi Om,
> Good diagnosis. This is highly likely to be related to the different kernel
> versions and or patches and possibly even the configuration. Ubuntu ought to
> surely consider this a bug. And they ought to be willing to help you. Have
> you filed a bug? It might even be related to systemd.
> 
> Good luck. Out of time, but it is an interesting problem.
That thought (of filing a bug against ubuntu) never occurred to me. I
will try installing the beta version of ubuntu 15.10 on a different
(experimental) box and try before I file a bug. But, as you mentioned, I
am also out of time :-), it is cheaper to buy an enclosure that works :-D

But, upon looking back, I think what you mentioned (about kernel patches
..etc) are correct. The reason for my thought is,
in ubuntu, the drive is (by-id)
/dev/disk/by-id/usb-Seagate_Expansion_Desk_2HC015KJ-0\:0

In debian the drive is,
/dev/disk/by-id/ata-HITACHI_<XXXXXXXXXXXXX>_0516F5JSSC_KRFS06RAH5JSSC

What I make out from these two lines are,
1. Ubuntu does not show the drive as an ATA device, but as a USB mass
storage device. Subsequently ATA commands/scsi commands fail because
they are not passed through.
2. Debian DOES NOT treat the device as a usb MSD, instead it goes beyond
the usb-bridge and fetches the type of the device before creating a
symlink. Being an ATA device, smartctl commands pass through.

This is the most logical explanation I can find at the moment.

After all, this could be a systemd/udev/kernel issue.
For want of time, I decide to revisit this issue in (possibly immediate)
future :-)

Thanks
Om.




More information about the svlug mailing list