diff options
author | David Zeuthen <davidz@redhat.com> | 2011-03-30 08:11:03 -0400 |
---|---|---|
committer | David Zeuthen <davidz@redhat.com> | 2011-03-30 10:28:24 -0400 |
commit | 42b9482ab2da64b4c2f254c227c0efaf83988a84 (patch) | |
tree | 621d833e991ad7eeaae929a2f5b37dd7e75dafed /README | |
parent | a138cd07145519f30226e06d41b0a11b50864658 (diff) |
Run ata_id on non-removable USB devices
If a USB device is marked as removable, it is often a SATA/PATA disk
in an enclosure (note that flash card readers and usb storage sticks
are always marked as removable). In this case, try running ata_id
(which sends ATA commands wrapped in SCSI ATA PASS THROUGH commands)
to get information about the disk. If this fails, just fall back to
running usb_id since it could be the device isn't an ATA device at
all or the device doesn't have a SAT layer.
This extra information is nice to have as it indicates if it is
suitable to send e.g. SMART commands to the disk, whether the disk
supports power management and so on. Additionally, the VPD and serial
number returned by ata_id is usually more accurate as it stems from
the disk itself instead of the enclosure.
Note that udisks has been doing this for a while
KERNEL=="sd*[!0-9]", ATTR{removable}=="0", ENV{ID_BUS}=="usb", ENV{DEVTYPE}=="disk", IMPORT{program}="udisks-probe-ata-smart $tempnode"
so this change shouldn't be too disruptive (udisks-probe-ata-smart
also sends ATA commands via the ATA PASS THROUGH command).
Signed-off-by: David Zeuthen <davidz@redhat.com>
Diffstat (limited to 'README')
0 files changed, 0 insertions, 0 deletions