Package: hdparm Version: 9.39-1+b1 Severity: important Tags: upstream I've recently bought a 2TB Seagate Barracuda 7200.14 HDD for use as a external drive, plugged to my Debian laptop using a cheap USB-to-SATA converter powered by a JMicron bridge chip: ID 152d:2338 JMicron Technology Corp. / JMicron USA Technology Corp. JM20337 Hi-Speed USB to SATA & PATA Combo Bridge
This HDD is one of those new "Advanced Format" drives (512b logical/4K physical sectors). And this JMicron bridge chip does something really neat whenever it detects one of those drives: instead of exposing a 512-byte sector mass storage device, it simply exposes the FULL 4K sectors: [455142.656082] usb 1-5: new high-speed USB device number 9 using ehci_hcd [455142.789119] usb 1-5: New USB device found, idVendor=152d, idProduct=2338 [455142.789128] usb 1-5: New USB device strings: Mfr=1, Product=2, SerialNumber=5 [455142.789134] usb 1-5: Product: USB to ATA/ATAPI bridge [455142.789139] usb 1-5: Manufacturer: JMicron [455142.789144] usb 1-5: SerialNumber: 000000000000 [455142.790109] scsi6 : usb-storage 1-5:1.0 [455143.789059] scsi 6:0:0:0: Direct-Access ST2000DM 001-9YN164 PQ: 0 ANSI: 2 CCS [455143.792440] sd 6:0:0:0: Attached scsi generic sg1 type 0 [455143.792757] sd 6:0:0:0: [sdc] 488378646 4096-byte logical blocks: (2.00 TB/1.81 TiB) [455143.793491] sd 6:0:0:0: [sdc] Write Protect is off [455143.793499] sd 6:0:0:0: [sdc] Mode Sense: 28 00 00 00 [455143.794242] sd 6:0:0:0: [sdc] No Caching mode page present [455143.794248] sd 6:0:0:0: [sdc] Assuming drive cache: write through [455143.795248] sd 6:0:0:0: [sdc] 488378646 4096-byte logical blocks: (2.00 TB/1.81 TiB) [455143.797250] sd 6:0:0:0: [sdc] No Caching mode page present [455143.797258] sd 6:0:0:0: [sdc] Assuming drive cache: write through [455143.802889] sdc: unknown partition table [455143.804873] sd 6:0:0:0: [sdc] 488378646 4096-byte logical blocks: (2.00 TB/1.81 TiB) [455143.806377] sd 6:0:0:0: [sdc] No Caching mode page present [455143.806384] sd 6:0:0:0: [sdc] Assuming drive cache: write through [455143.806390] sd 6:0:0:0: [sdc] Attached SCSI disk This is benefical for performance (no need to care about partition alignment or 512/4096 conversion issues), and also allows to work around MBR 2TB limits, plus it works fine under both Linux and Windows. However, not all apps seem to like this combination of drive/bridge. So far, the only one seems to be hdparm... I'm trying to turn off APM on this drive - for Seagate it's way more important to save 1W on desktop drives instead of not wasting load/unload cycles (which are very limited on modern drives - park your heads too frequently and you will either kill the drive or trip SMART warnings too early), so they now ship those Barracudas with AGGRESIVE APM settings from factory (128), causing constant head parkings (which can also cause lags whenever you try to access the drive). Unfortunately you can't turn off APM permanently on those drives (they don't want you to do that), so you must reapply your APM settings on each drive startup. You would normally do hddparm -B 255 /dev/whateverisyourseagatedrive and continue with your life, but unfortunately hdparm can't even ID this drive: # hdparm --verbose -I /dev/sdb /dev/sdb: outgoing cdb: 85 08 0e 00 00 00 01 00 00 00 00 00 00 40 ec 00 SG_IO: ATA_16 status=0x2, host_status=0x0, driver_status=0x8 SG_IO: sb[]: 72 00 00 1d 00 00 00 0e 09 0c 00 00 00 00 6e df 00 26 00 5c e0 50 00 00 00 00 00 00 00 00 00 00 incoming_data: 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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[]: 09 0c 00 00 00 00 6e df 00 26 00 5c e0 50 ATA_16 stat=50 err=00 nsect=00 lbal=df lbam=26 lbah=5c dev=e0 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 The only workaround so far is to reboot to Windows and use something else to turn off APM (CrystalDiskInfo works with this combo), then reboot back to Debian... and obviously this "workaround" is not acceptable. Other applications can talk just fine to this drive, including smartmontools: === START OF INFORMATION SECTION === Model Family: Seagate Barracuda 7200.14 (AF) Device Model: ST2000DM001-9YN164 Serial Number: Z2Fxxxxx LU WWN Device Id: 5 000c50 xxxxxxxxx Firmware Version: CC4H User Capacity: 2.000.398.934.016 bytes [2,00 TB] Sector Sizes: 512 bytes logical, 4096 bytes physical 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: Wed Mar 27 15:17:41 2013 VET SMART support is: Available - device has SMART capability. SMART support is: Enabled === START OF READ SMART DATA SECTION === SMART overall-health self-assessment test result: PASSED I've tried using other USB-to-SATA bridges: a Sunplus-based converter (which does expose 512b sectors and not 4K) achieves only partial compatibility (can ID the drive, but not turn off APM, and it always throws bad checksums and sense errors on every call). I've even tried building the latest version from upstream (9.43, now also available on unstable), but unfortunately nothing changes. Other non-AF drives work just fine with hdparm and this JMicron bridge (tested with a Samsung HD103SJ, a Hitachi Travelstar 5K160-160, and even a real ancient 8GB PATA Samsung SV0842D, using a PATA-to-SATA bridge inbetween!). So far my priority is to get rid of this APM headache induced by Seagate, but hdparm is making this harder than required. -- System Information: Debian Release: 7.0 APT prefers testing APT policy: (500, 'testing') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 3.2.0-4-amd64 (SMP w/2 CPU cores) Locale: LANG=es_VE.UTF-8, LC_CTYPE=es_VE.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Versions of packages hdparm depends on: ii libc6 2.13-38 ii lsb-base 4.1+Debian8 Versions of packages hdparm recommends: ii powermgmt-base 1.31 Versions of packages hdparm suggests: pn apmd <none> -- no debconf information -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org