I have 2TB external usb hdd attached to ipfire. On this hdd is shared folder - smb.
Disk is making noise, and never spin down. Even when nothing is connected to smd share. I tested two external hdd, both spins down on windows, none in ipfire.
Is there any solution how to spin down usb hdd.
And yes, external drive graph shows that hdd is idle, but in reality is not.
I found this thread pretty much explaining your issue.
Basically, the combination of the hard disk firmware and enclosure are frequently buggy, in particular in the SATA-USB bridge which stratify two layers of communication channels (SCSI and USB) that the ATA commands have to transverse to reach the disk.
You should read the entire message and also this answer.
Beyond that, the topic gets way above my head. My only suggestion is that you could consider opening a bug report so the developers might help. Maybe they can tune up the firmware, as the Ubuntu users did in the tread I linked above? @arne_f or @ms , some suggestion?
The Linux usb storage subsystem doesn’t support sending direct ATA commands to the drives at all.
smartmontools work arround this by accessing the usb bridges via direct access but hdparm doesn’t support this. So at the moment setting usb drives to sleep is not supported except the drive support itself.
Swaped enclosure for 15 years old Fujitsu-Simens USB2 eclosure with 10 years old WD caviar and it respond to hdparm -y /dev/sdc (stadby), and hdparm -Y /dev/sdc (sleep).
Sometimes go to standby by itself after 40 min., sometimes not.
that’s to make the change survive at reboot. However, you can test if it works by using the /sys interface of the kernel, as discussed in that thread. At least you know that what is discussed in that thread is the same problem you are having. If yes, you can use rc.local to issue an echo to the sys interface at boot.
wd.com site no longer has support for WD Caviar Green. Earlier, it pointed out that the drive has firmware that will spin it down after a few seconds of inactivity. WD Caviar Green were intended as only occasional use backup drives.
Regardless of whether or not you are able to resolve the issues between enclosure and drive, WD Caviar Green is not suited to your application. If you persist with it, then it is likely to use up its stop/start life in short order.