On Sat, Jun 18, 2016 at 09:54:02PM -0500, David Young wrote: > On Sat, Jun 18, 2016 at 10:51:25PM +0200, Manuel Bouyer wrote: > > On Sat, Jun 18, 2016 at 03:31:20PM -0500, David Young wrote: > > > BTW, what should we do during "manual" action, such as 'drvctl -d wd0'? > > > Seems like we should power off the drive then, too? Otherwise, it is > > > set up for an abrupt power-loss, later. > > > > But if you do this in order to do a rescan, you will power down/up > > the drive, which is not so good for enterprise-class drives (for drives > > designed for 24x7 SMART counts the number of stop/start cycles) > > I don't understand. Why detach in order to do a rescan?
You can't rescan if there is any device attached to an atabus (you get EBUSY). In such a case you can put the device in standby with atactl before detaching. > > BTW, I think that when I wrote "power off the drive," I should have > written "put it into standby." I'm not sure the formal meaning of > standby, but I reckon it is up to the drive (controller?) whether or not > to stop the spindle as well as parking the heads. > > Seen in a certain perspective, it's asymmetric that frequently the > BIOS powers a drive *up* before the bootloader runs, but the OS is > responsible to power a drive *down* during power off, or else the drive > may abruptly lose power. Is there some way to hand responsibility for > the drive's power state back to the BIOS? I guess that on x86, that > would be an ACPI BIOS method. Don't we use an ACPI method to power down > the machine, after all? ISTR we put the machine into "sleep state 5". No idea if there is an ACPI method for this. And this woudln't help e.g. evbarm. -- Manuel Bouyer <[email protected]> NetBSD: 26 ans d'experience feront toujours la difference --
