Hello.
I'm planning to set up a Raspberry Pi server and, among other things, use hard disks with USB adapters for NAS with RAID. I want the disks to spin down after some time of inactivity. I experimented with an USB adapter and one SATA disk on my x86_64 desktop, and using
I don't know whether I should make another thread for this thing, but I would also like to know whether there is a way to cache write operations while disk is spun down and flush the cached operations to disk when spinning, possibly automatically spinning up the disk after it has been idle for a longer time, say, 24 hours, to prevent loss of much data in the case of power loss, for example.
I'm planning to set up a Raspberry Pi server and, among other things, use hard disks with USB adapters for NAS with RAID. I want the disks to spin down after some time of inactivity. I experimented with an USB adapter and one SATA disk on my x86_64 desktop, and using
ataidle -s /dev/da4
doesn't work, but camcontrol standby da4
does spin the disk down. dmesg
for the disk with USB adapter says:
Code:
ugen1.6: <JMicron> at usbus1
umass1: <MSC Bulk-Only Transfer> on usbus1
umass1: SCSI over Bulk-Only; quirks = 0x4000
umass1:8:1:-1: Attached to scbus8
(probe0:umass-sim1:1:0:0): REPORT LUNS. CDB: a0 00 00 00 00 00 00 00 00 10 00 00
(probe0:umass-sim1:1:0:0): CAM status: SCSI Status Error
(probe0:umass-sim1:1:0:0): SCSI status: Check Condition
(probe0:umass-sim1:1:0:0): SCSI sense: ILLEGAL REQUEST asc:20,0 (Invalid command operation code)
(probe0:umass-sim1:1:0:0): Error 22, Unretryable error
da4 at umass-sim1 bus 1 scbus8 target 0 lun 0
da4: <WDC WD32 00BEVS-60VAT0 > Fixed Direct Access SPC-3 SCSI device
da4: Serial Number 000001D918E5
da4: 40.000MB/s transfers
da4: 305245MB (625142448 512 byte sectors: 255H 63S/T 38913C)
da4: quirks=0x2<NO_6_BYTE>
I don't know whether I should make another thread for this thing, but I would also like to know whether there is a way to cache write operations while disk is spun down and flush the cached operations to disk when spinning, possibly automatically spinning up the disk after it has been idle for a longer time, say, 24 hours, to prevent loss of much data in the case of power loss, for example.