[wellylug] USB 3.0 via PCI-e, & SATA HDD enclosures/docks
Ewen McNeill
wellylug at ewen.mcneill.gen.nz
Tue Jul 19 22:26:43 NZST 2011
On 2011-07-19 20:51 , Cliff Pratt wrote:
> Yeah good points, but a) I thought that drives/caches retain enough
> power to write the last of the data in the cache and
FWIW, I have very little faith in this occurring in a meaningful
fashion: the buffering is too big, and the drive staying up to useful
speed to reliably write once power is removed is too short. (See also
write behind caching on by default in most mainstream devices, eg:
http://brad.livejournal.com/2116715.html)
My normal approach is to umount the disk, and then wait "a while"
(typically a minute or two or however long it takes to walk from my
workstation to the machine in question) before removing power from it.
(Which is very "sync<NL> sync<NL> sync<NL> halt<NL>" like I know, see eg
http://www.classiccmp.org/pipermail/cctalk/2001-April/169861.html.) I
have at least one (powered) USB enclosure which seems to need this sort
of approach: without giving it a bit of time the final "file system
clean" write doesn't seem to get flushed to the media (it gets checked
on the next mount), so I'll usually give it a minute or two after
unmounting, then pull the USB only (leaving it powered), and give it
another minute or two before pulling the power. (Flash media,
currently, has less write buffering depth than "spinning rust".)
So as noted earlier I'll do what I can to ensure that all the bits I
want are committed to the underlying media. But I draw the line at
spinning down the drive first (especially since in most server
environments it's difficult to issue a command like that anyway: there
are layers of indirection in the way).
> I was also under the impression that even older IDE drives didn't
> actually park the heads.
I guess that depends on what you mean by "older" IDE drives, and whether
you include "unloaded the heads" in "parked the heads". (See, eg,
http://en.wikipedia.org/wiki/Hard_disk_drive#Landing_zones_and_load.2Funload_technology)
AFAIK the "landing zone" approach is still pretty common, they just
got better at reducing the chances of stiction, etc.
With older hard drives (eg, full height 5.25" ones) you could definitely
tell the heads were being parked as the power removed (compared with
older still ones before them which needed a "park the heads" command
run). Modern near silent hard drives make it difficult to be sure, by
sound, what they're doing. And I suspect many recent drives probably
idle their heads over the landing zone if they've not been used in a
while anyway.
Ewen
More information about the wellylug
mailing list