gsmartcontrol, hdparm, and ZFS all refuse to talk to an apparently working Seagate Backup+ Hub drive after upgrade to 18.04

Bug #1774569 reported by Adam Novak
22
This bug affects 3 people
Affects Status Importance Assigned to Milestone
gsmartcontrol (Ubuntu)
Confirmed
Undecided
Unassigned
hdparm (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

I recently upgraded from 17.10 to 18.04. After the upgrade, I noticed that my Seagate Backup+ Hub external drive was displaying a series of puzzling symptoms:

1. gsmartcontrol can't get SMART data from the drive. I am pretty sure it used to report SMART data? Here's a log of it not working:

<warn> [hz] Warning: exit: Command line did not parse.
<warn> [app] execute_smartctl(): Smartctl binary did not execute cleanly.
<warn> [app] StorageDevice::execute_device_smartctl(): Smartctl binary did not execute cleanly.
<warn> [app] SmartctlParser::parse_section_info_property(): Unknown property "Physical block size"
<warn> [app] SmartctlParser::parse_section_info_property(): Unknown property "Logical Unit id"
<warn> [app] SmartctlParser::parse_section_info_property(): Unknown property "Temperature Warning"
<warn> [app] SmartctlParser::parse_section_data(): Unknown Data subsection encountered.
<warn> [hz] Warning: exit: Some SMART command to the disk failed, or there was a checksum error in a SMART data structure
<warn> [app] SmartctlParser::parse_section_info_property(): Unknown property "Physical block size"
<warn> [app] SmartctlParser::parse_section_info_property(): Unknown property "Logical Unit id"
<warn> [app] SmartctlParser::parse_section_info_property(): Unknown property "Temperature Warning"
<warn> [app] SmartctlParser::parse_section_data(): Unknown Data subsection encountered.

2. hdparm used to be able to spin down the drive. I had it configured to spin it down after a few minutes of inactivity, in the hdparm config file. Now that no longer happens, and hdparm can't seem to talk to the drive meaningfully at all:

[anovak@octagon ~]$ sudo hdparm -I /dev/sdb

/dev/sdb:
SG_IO: bad/missing sense data, sb[]: 70 00 05 00 00 00 00 0a 00 00 00 00 24 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

ATA device, with non-removable media
Standards:
 Likely used: 1
Configuration:
 Logical max current
 cylinders 0 0
 heads 0 0
 sectors/track 0 0
 --
 Logical/Physical Sector size: 512 bytes
 device size with M = 1024*1024: 0 MBytes
 device size with M = 1000*1000: 0 MBytes
 cache/buffer size = unknown
Capabilities:
 IORDY not likely
 Cannot perform double-word IO
 R/W multiple sector transfer: not supported
 DMA: not supported
 PIO: pio0
[anovak@octagon ~]$ sudo hdparm -y /dev/sdb

/dev/sdb:
 issuing standby command
SG_IO: bad/missing sense data, sb[]: 70 00 05 00 00 00 00 0a 00 00 00 00 24 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

I think this may be related to https://askubuntu.com/questions/1037997/upgraded-to-18-04-usb-harddrive-doesn-t-idle-anymore which is someone else having the same problem.

3. The ZFS tools think the drive is hosed:

[anovak@octagon ~]$ sudo zpool status hub
  pool: hub
 state: UNAVAIL
status: One or more devices could not be used because the label is missing
 or invalid. There are insufficient replicas for the pool to continue
 functioning.
action: Destroy and re-create the pool from
 a backup source.
   see: http://zfsonlinux.org/msg/ZFS-8000-5E
  scan: none requested
config:

 NAME STATE READ WRITE CKSUM
 hub UNAVAIL 0 0 0 insufficient replicas
   ata-ST6000DM003-2CY186_ZF200PC8 UNAVAIL 0 0 0

This may be related to the drive having adopted a new /dev/disk/by-id name during the upgrade? I think it was "ata-ST6000DM003-2CY186_ZF200PC8" when I added it to my zpool by its symlink under /dev/disks/by-id, but now it is "usb-Seagate_Backup+_Hub_BK_NA8TQC87-0:0":

[anovak@octagon ~]$ ls -lah /dev/disk/by-id/usb-Seagate_Backup+_Hub_BK_NA8TQC87-0\:0
lrwxrwxrwx 1 root root 9 May 31 20:52 /dev/disk/by-id/usb-Seagate_Backup+_Hub_BK_NA8TQC87-0:0 -> ../../sdb

This *shouldn't* cause trouble; you should be able to export the zpool and re-import it under the new name. But zpool import shows nothing to import:

[anovak@octagon ~]$ sudo zpool import
no pools available to import

And I also can't export or even destroy the busted zpool, because zpool doesn't think it exists for exporting or destroying purposes:

[anovak@octagon ~]$ sudo zpool export hub
cannot export 'hub': no such pool or dataset
[anovak@octagon ~]$ sudo zpool destroy hub
cannot destroy 'hub': no such pool or dataset

4. The weirdest thing is that the drive itself seems to be working correctly. I see /dev/sdb1 and /dev/sdb9, as expected for a ZFS drive. I can `cat /dev/sdb1 | xxd | less` and see the data stored on the drive, including what I think is the ZFS label (at 0x4000, with a bunch of ZFS-y strings in it) that zpool is upset about not seeing. I see the partitions in `gparted` just fine, too; there's no indication that there's anything wrong with the partition table. Even the device's integrated USB hub seems to be working fine. This is definitely not a hard drive failure.

If I had to speculate, I would guess that the drive is being treated as a generic USB mass storage device now, when it used to be being handled as a SATA device in a USB-to-SATA enclosure (which I think it is). That would explain the name change, and the difficulty that hdparm and gsmartcontrol have in talking to it. The ZFS weirdness with not being able to export/destroy the pool has to be another issue; it happens even when the drive is disconnected from the system entirely.

ProblemType: Bug
DistroRelease: Ubuntu 18.04
Package: gsmartcontrol 1.1.3-1
ProcVersionSignature: Ubuntu 4.15.0-22.24-generic 4.15.17
Uname: Linux 4.15.0-22-generic x86_64
NonfreeKernelModules: zfs zunicode zavl icp zcommon znvpair
ApportVersion: 2.20.9-0ubuntu7
Architecture: amd64
CurrentDesktop: ubuntu:GNOME
Date: Thu May 31 20:46:52 2018
InstallationDate: Installed on 2017-08-06 (298 days ago)
InstallationMedia: Ubuntu 17.04 "Zesty Zapus" - Release amd64 (20170412)
ProcEnviron:
 TERM=xterm-256color
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: gsmartcontrol
UpgradeStatus: Upgraded to bionic on 2018-05-29 (3 days ago)

Revision history for this message
Adam Novak (interfect) wrote :
Revision history for this message
Adam Novak (interfect) wrote :
Download full text (5.0 KiB)

Nope, my speculation is definitely wrong. The disk shows up in lsscsi:

[anovak@octagon ~]$ lsscsi
...
[9:0:0:0] disk Seagate Backup+ Hub BK D781 /dev/sdb

Also, it shows up in lsusb -t with a "uas" driver.

Maybe the problem is the uas driver itself?

Here's the full description of the USB device, if that helps:

[anovak@octagon ~]$ sudo lsusb -v -d 0bc2:ab38

Bus 001 Device 008: ID 0bc2:ab38 Seagate RSS LLC
Device Descriptor:
  bLength 18
  bDescriptorType 1
  bcdUSB 2.10
  bDeviceClass 0 (Defined at Interface level)
  bDeviceSubClass 0
  bDeviceProtocol 0
  bMaxPacketSize0 64
  idVendor 0x0bc2 Seagate RSS LLC
  idProduct 0xab38
  bcdDevice 1.00
  iManufacturer 2 Seagate
  iProduct 3 Backup+ Hub BK
  iSerial 1 NA8TQC87
  bNumConfigurations 1
  Configuration Descriptor:
    bLength 9
    bDescriptorType 2
    wTotalLength 85
    bNumInterfaces 1
    bConfigurationValue 1
    iConfiguration 0
    bmAttributes 0xc0
      Self Powered
    MaxPower 0mA
    Interface Descriptor:
      bLength 9
      bDescriptorType 4
      bInterfaceNumber 0
      bAlternateSetting 0
      bNumEndpoints 2
      bInterfaceClass 8 Mass Storage
      bInterfaceSubClass 6 SCSI
      bInterfaceProtocol 80 Bulk-Only
      iInterface 0
      Endpoint Descriptor:
        bLength 7
        bDescriptorType 5
        bEndpointAddress 0x81 EP 1 IN
        bmAttributes 2
          Transfer Type Bulk
          Synch Type None
          Usage Type Data
        wMaxPacketSize 0x0200 1x 512 bytes
        bInterval 0
      Endpoint Descriptor:
        bLength 7
        bDescriptorType 5
        bEndpointAddress 0x02 EP 2 OUT
        bmAttributes 2
          Transfer Type Bulk
          Synch Type None
          Usage Type Data
        wMaxPacketSize 0x0200 1x 512 bytes
        bInterval 0
    Interface Descriptor:
      bLength 9
      bDescriptorType 4
      bInterfaceNumber 0
      bAlternateSetting 1
      bNumEndpoints 4
      bInterfaceClass 8 Mass Storage
      bInterfaceSubClass 6 SCSI
      bInterfaceProtocol 98
      iInterface 0
      Endpoint Descriptor:
        bLength 7
        bDescriptorType 5
        bEndpointAddress 0x81 EP 1 IN
        bmAttributes 2
          Transfer Type Bulk
          Synch Type None
          Usage Type Data
        wMaxPacketSize 0x0200 1x 512 bytes
        bInterval 0
        Data-in pipe (0x03)
      Endpoint Descriptor:
        bLength 7
        bDescriptorType 5
        bEndpointAddress 0x02 EP 2 OUT
        bmAttributes ...

Read more...

Revision history for this message
Adam Novak (interfect) wrote :

Even after rebooting with the drive for the zpool physically removed from the system, I still had a zpool I couldn't destroy, export, or otherwise remove from the listing.

Using "sudo zpool status -Pv" I worked out that my ZFS was actually expecting to find the data on partition 1 of the drive:

errors: No known data errors

  pool: hub
 state: UNAVAIL
status: One or more devices could not be used because the label is missing
 or invalid. There are insufficient replicas for the pool to continue
 functioning.
action: Destroy and re-create the pool from
 a backup source.
   see: http://zfsonlinux.org/msg/ZFS-8000-5E
  scan: none requested
config:

 NAME STATE READ WRITE CKSUM
 hub UNAVAIL 0 0 0 insufficient replicas
   /dev/disk/by-id/ata-ST6000DM003-2CY186_ZF200PC8-part1 UNAVAIL 0 0 0

I'd previously tried symlinking the old device name to the new one, but I was inspired to try it with just the partition:

[anovak@octagon ~]$ cd /dev/disk/by-id/
[anovak@octagon by-id]$ sudo ln -s 'usb-Seagate_Backup+_Hub_BK_NA8TQC87-0:0-part1' ata-ST6000DM003-2CY186_ZF200PC8-part1

When I did that, the pool immediately came back online, and I was able to export it to make it go away.

Then I managed to import it under a more stable name with "sudo zpool import -a -d /dev/disk/by-partuuid/".

I still can't see the drive data in gsmartcontrol, and I still can't spin it down, but at least I can now use it.

Revision history for this message
Adam Novak (interfect) wrote :

I pulled the hdparm binary from Artful, and it can't spin down the drive with -y either.

Revision history for this message
Adam Novak (interfect) wrote :

It looks like the drive is replying with an ILLEGAL REQUEST/INVALID FIELD IN CDB error to all the interesting SCSI commands, and to pretty much anything hdparm sends it.

I've also tried throwing sdparm at it. The only page sdparm can get out of it is the basic identification page:

[anovak@octagon hdparm-9.54]$ sudo sdparm -i /dev/sdg
    /dev/sdg: Seagate Backup+ Hub BK D781
Device identification VPD page:
  Addressed logical unit:
    designator type: NAA, code set: Binary
      0x5000000000000001

But this has convinced me that I am actually communicating with the disk itself. Is there any way the kernel/driver could be tinkering with the commands that hdparm used to send that worked and which now fail? Or is there some kind of initialization that isn't being done that would put the disk in a mode where it is willing to do more things?

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in gsmartcontrol (Ubuntu):
status: New → Confirmed
Changed in hdparm (Ubuntu):
status: New → Confirmed
Changed in zfs-linux (Ubuntu):
status: New → Confirmed
Revision history for this message
Marin Purgar (marin-purgar) wrote :

Same here:

root@desktop:~# sdparm -i /dev/sdb
    /dev/sdb: Seagate Backup+ Hub BK D781
Device identification VPD page:
  Addressed logical unit:
    designator type: NAA, code set: Binary
      0x5000000000000001
root@desktop:~# hdparm -y /dev/sdb

/dev/sdb:
 issuing standby command
SG_IO: bad/missing sense data, sb[]: 70 00 05 00 00 00 00 0a 00 00 00 00 24 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

Revision history for this message
Marin Purgar (marin-purgar) wrote :

Also not working for my other external HDDs:

root@desktop:~# sdparm -i /dev/sdd
    /dev/sdd: WD My Book 1140 1019
Device identification VPD page:
  Addressed logical unit:
    designator type: T10 vendor identification, code set: ASCII
      vendor id: WD
      vendor specific: My Book 1140 PL1331LAGEKTJH
root@desktop:~# sdparm -i /dev/sdf
    /dev/sdf: WD My Passport 25E2 4004
Device identification VPD page:
  Addressed logical unit:
    designator type: T10 vendor identification, code set: ASCII
      vendor id: WD
      vendor specific: My Passport 25E2WX21D76F7R14
root@desktop:~# hdparm -y /dev/sdd

/dev/sdd:
 issuing standby command
SG_IO: bad/missing sense data, sb[]: 70 00 01 00 00 00 00 0a 00 00 00 00 00 1d 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
root@desktop:~# hdparm -y /dev/sdf

/dev/sdf:
 issuing standby command
SG_IO: bad/missing sense data, sb[]: f0 00 01 00 50 40 00 0a 80 00 00 00 00 1d 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

Revision history for this message
Colin Ian King (colin-king) wrote :

Since this is a physical through to block layer issue and not ZFS per-se, I'm going to remove ZFS off this bug report.

no longer affects: zfs-linux (Ubuntu)
Revision history for this message
axion (bugzilla-axion) wrote :
Download full text (5.3 KiB)

HDParm/SDParm bug afects me as well with 2 different Seagate usb drives, I think this one should have a high priority, since it also affects power management. Further more since the aforementioned drive is also a sub-hub it would be good to be able to turn on/off the drive portion without needing to re-plug the usb-cable or the power-cable.

However I cannot confirm or deny if this behaviour was not observed in 17.04.

Seagate Backup+ Hub;

[733263.671304] usb 1-2: new full-speed USB device number 82 using xhci_hcd
[733263.927640] usb 2-2: new SuperSpeed USB device number 49 using xhci_hcd
[733263.953201] usb 2-2: New USB device found, idVendor=0bc2, idProduct=ab45
[733263.953206] usb 2-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[733263.953209] usb 2-2: Product: Backup+ Hub
[733263.953211] usb 2-2: Manufacturer: Seagate
[733263.953214] usb 2-2: SerialNumber: 01CB7447B2D2
[733263.955412] hub 2-2:1.0: USB hub found
[733263.955699] hub 2-2:1.0: 3 ports detected
[733264.075319] usb 1-2: new high-speed USB device number 83 using xhci_hcd
[733264.226923] usb 1-2: New USB device found, idVendor=0bc2, idProduct=ab44
[733264.226928] usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[733264.226931] usb 1-2: Product: Backup+ Hub
[733264.226934] usb 1-2: Manufacturer: Seagate
[733264.226936] usb 1-2: SerialNumber: 01CB7447B2D2
[733264.228162] hub 1-2:1.0: USB hub found
[733264.228426] hub 1-2:1.0: 3 ports detected
[733264.303425] usb 2-2.1: new SuperSpeed USB device number 50 using xhci_hcd
[733264.324224] usb 2-2.1: New USB device found, idVendor=0bc2, idProduct=ab38
[733264.324228] usb 2-2.1: New USB device strings: Mfr=2, Product=3, SerialNumber=1
[733264.324232] usb 2-2.1: Product: Backup+ Hub BK
[733264.324234] usb 2-2.1: Manufacturer: Seagate
[733264.324236] usb 2-2.1: SerialNumber: NA8TS9K5
[733264.328836] scsi host6: uas
[733264.329274] scsi 6:0:0:0: Direct-Access Seagate Backup+ Hub BK D781 PQ: 0 ANSI: 6
[733264.329760] sd 6:0:0:0: Attached scsi generic sg0 type 0
[733264.329875] sd 6:0:0:0: [sda] Spinning up disk...
[733265.291754] usb 1-2-port2: Cannot enable. Maybe the USB cable is bad?
[733265.363336] .
[733266.387390] .
[733267.411383] .
[733268.435283] .
[733269.459369] .
[733270.483306] .
[733271.507316] .
[733272.531296] .
[733273.559245] .
[733274.579343] .
[733275.603273] .
[733276.627270] .
[733276.628098] ready
[733276.628416] sd 6:0:0:0: [sda] 11721045167 512-byte logical blocks: (6.00 TB/5.46 TiB)
[733276.641757] sd 6:0:0:0: [sda] Write Protect is off
[733276.641759] sd 6:0:0:0: [sda] Mode Sense: 4f 00 00 00
[733276.641909] sd 6:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[733276.774212] sda: sda1
[733276.775169] sd 6:0:0:0: [sda] Attached SCSI disk

Seagate Expansion Desk;

[733476.458208] usb 2-2: new SuperSpeed USB device number 52 using xhci_hcd
[733476.483130] usb 2-2: New USB device found, idVendor=0bc2, idProduct=3320
[733476.483137] usb 2-2: New USB device strings: Mfr=2, Product=3, SerialNumber=1
[733476.483141] usb 2-2: Product: Expansion Desk
[733476.483145] usb 2-2: Manufacturer: Seagate
[733476.483149] usb 2-2: SerialNumber: NA4MBV5C
[73347...

Read more...

Revision history for this message
Jakob Mühldorfer (jmuehldorfer) wrote :

FYI I am on a rolling distro (arch) and the same problem has started for me with my seagate backup drive
It is still present today

Revision history for this message
Christian Franke (christian-franke) wrote :

See my comments in this smartmontools ticket:
https://bugs.launchpad.net/ubuntu/+source/smartmontools/+bug/1810215

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.