I would like to use an external USB disk (Buffalo HD-LCU3/N) on a Raspberry Pi as my home backup server. The Pi is always on, but the disk should shut itself off, be silent and consume little power when not in use.
On a Windows PC, the disk does shut itself down after a few minutes. On Linux (both Raspbian and Fedora on another PC), it doesn't.
I am rather ignorant as far as SCSI or USB connections are concerned.
What do I have to do to enable sleep? Where should I look for errors or clues?
So far, I tried
Code:
hdparm -S 10 /dev/sdb
setting standby to 10 (50 seconds)
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
I also ran
hdparm -I. The whole output is at the end of my post.
I also learned that
udisks2 polls disks regularly and can be disabled with a udev rule. I configured:
Code:
KERNEL=="sd*[!0-9]", ENV{ID_BUS}=="usb", ENV{DEVTYPE}=="disk", ENV{UDISKS_DISABLE_POLLING}="1"
Still no success. Killing udisks processes: No change.
The
kernel message buffer only contains startup messages. I am surprised to see a ten seconds gap between the generic USB and SCSI messages and the storage-related messages, but doubt it has anything to do with my problem:
Code:
[ 34.465819] usb 2-1.2: new high-speed USB device number 3 using ehci-pci
[ 34.553740] usb 2-1.2: New USB device found, idVendor=0411, idProduct=0286
[ 34.553751] usb 2-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 34.553756] usb 2-1.2: Product: HD-LCU3
[ 34.553760] usb 2-1.2: Manufacturer: BUFFALO
[ 34.553763] usb 2-1.2: SerialNumber: 00000029000017B6
[ 34.613773] usb-storage 2-1.2:1.0: USB Mass Storage device detected
[ 34.613974] scsi host6: usb-storage 2-1.2:1.0
[ 34.614187] usbcore: registered new interface driver usb-storage
[ 34.619263] usbcore: registered new interface driver uas
[ 35.618282] scsi 6:0:0:0: Direct-Access BUFFALO External HDD 0000 PQ: 0 ANSI: 3
[ 35.619339] sd 6:0:0:0: Attached scsi generic sg1 type 0
[ 45.796102] sd 6:0:0:0: [sdb] Very big device. Trying to use READ CAPACITY(16).
[ 45.796860] sd 6:0:0:0: [sdb] 5860533168 512-byte logical blocks: (3.00 TB/2.73 TiB)
[ 45.796867] sd 6:0:0:0: [sdb] 4096-byte physical blocks
[ 45.798053] sd 6:0:0:0: [sdb] Write Protect is off
[ 45.798065] sd 6:0:0:0: [sdb] Mode Sense: 73 00 10 08
[ 45.799294] sd 6:0:0:0: [sdb] Write cache: enabled, read cache: enabled, supports DPO and FUA
[ 45.800945] sd 6:0:0:0: [sdb] Very big device. Trying to use READ CAPACITY(16).
[ 45.857980] sdb: sdb1
[ 45.860309] sd 6:0:0:0: [sdb] Very big device. Trying to use READ CAPACITY(16).
[ 45.863436] sd 6:0:0:0: [sdb] Attached SCSI disk
hdparm -I output. What I consider significant is highlighted.
Code:
$ sudo hdparm -I /dev/sdb
/dev/sdb:
ATA device, with non-removable media
Model Number: TOSHIBA DT01ACA300
Serial Number: 76CDSS9AS
Firmware Revision: MX6OABB0
Transport: Serial, ATA8-AST, SATA 1.0a, SATA II Extensions, SATA Rev 2.5, SATA Rev 2.6, SATA Rev 3.0; Revision: ATA8-AST T13 Project D1697 Revision 0b
Standards:
Used: unknown (minor revision code 0x0029)
Supported: 8 7 6 5
Likely used: 8
Configuration:
Logical max current
cylinders 16383 16383
heads 16 16
sectors/track 63 63
--
CHS current addressable sectors: 16514064
LBA user addressable sectors: 268435455
LBA48 user addressable sectors: 5860533168
Logical Sector size: 512 bytes
Physical Sector size: 4096 bytes
Logical Sector-0 offset: 0 bytes
device size with M = 1024*1024: 2861588 MBytes
device size with M = 1000*1000: 3000592 MBytes (3000 GB)
cache/buffer size = unknown
Form Factor: 3.5 inch
Nominal Media Rotation Rate: 7200
Capabilities:
LBA, IORDY(can be disabled)
Queue depth: 32
Standby timer values: spec'd by Standard, no device specific minimum
R/W multiple sector transfer: Max = 16 Current = 0
Advanced power management level: disabled
DMA: mdma0 mdma1 mdma2 udma0 udma1 udma2 udma3 udma4 udma5 *udma6
Cycle time: min=120ns recommended=120ns
PIO: pio0 pio1 pio2 pio3 pio4
Cycle time: no flow control=120ns IORDY flow control=120ns
Commands/features:
Enabled Supported:
* SMART feature set
Security Mode feature set
* Power Management feature set
* Write cache
* Look-ahead
* Host Protected Area feature set
* WRITE_BUFFER command
* READ_BUFFER command
* NOP cmd
* DOWNLOAD_MICROCODE
Advanced Power Management feature set
Power-Up In Standby feature set
* SET_FEATURES required to spinup after power up
SET_MAX security extension
* 48-bit Address feature set
* Device Configuration Overlay feature set
* Mandatory FLUSH_CACHE
* FLUSH_CACHE_EXT
* SMART error logging
* SMART self-test
Media Card Pass-Through
* General Purpose Logging feature set
* WRITE_{DMA|MULTIPLE}_FUA_EXT
* 64-bit World wide name
* URG for READ_STREAM[_DMA]_EXT
* URG for WRITE_STREAM[_DMA]_EXT
* WRITE_UNCORRECTABLE_EXT command
* {READ,WRITE}_DMA_EXT_GPL commands
* Segmented DOWNLOAD_MICROCODE
* unknown 119[7]
* Gen1 signaling speed (1.5Gb/s)
* Gen2 signaling speed (3.0Gb/s)
* Gen3 signaling speed (6.0Gb/s)
* Native Command Queueing (NCQ)
* Host-initiated interface power management
* Phy event counters
* NCQ priority information
Non-Zero buffer offsets in DMA Setup FIS
* DMA Setup Auto-Activate optimization
Device-initiated interface power management
In-order data delivery
* Software settings preservation
* SMART Command Transport (SCT) feature set
* SCT Write Same (AC2)
* SCT Error Recovery Control (AC3)
* SCT Features Control (AC4)
* SCT Data Tables (AC5)
Security:
Master password revision code = 65534
supported
not enabled
not locked
not frozen
not expired: security count
not supported: enhanced erase
492min for SECURITY ERASE UNIT.
Logical Unit WWN Device Identifier: 5000039fe3d3e51e
NAA : 5
IEEE OUI : 000039
Unique ID : fe3d3e51e
Checksum: correct