Sunday, May 29, 2011

External usb hdd WD Elements - avoid spindown

Update: I got a new workaound here: External usb hdd WD Elements - avoid spindown -- #2

I've got an external 2.5", 500G USB HDD from WesternDigital
- this one: http://images.google.com/images?q=WDBABV5000ABK-00.
Without being accessed, it spins down after 5-10s (seconds, not minutes!) automatically.
This behavior seems to be hardcoded in the hardware/firmware by WD and cannot be changed (if anyone knows better, please leave a comment). It can be very annoying, for example when starting a file manager or open a 'save as...'-dialog etc. because the hard drive has to spin up every time adding a delay of some seconds until the dialog appears. The same happens when reading or writing at a low speed (let's say ~ <10KiBytes/s) - the drive spins up and down multiple times a minute.

A dirty workaround is to keep the drive busy by touching and syncing in a short interval.

A quick way to do this via commandline:
while [ 1 ]; do echo "touch at - `date`"; touch /media/WD_500G_NTFS/tempfile; sleep 5s; sync; done
A bit nicer with the following script:


edit: inserted link to new post.

Tests with code and syntax highlighting.

Hello, this is my first blog entry and i'm just testing how to add code.
  • The 'Quote' option in the 'new Post' editor just indents the text block; one possibility is to change the font for the selected text block to e.g. Courier, a fixed width font, but of course there is no syntax highlighting.

There are some other solutions i found in the internet:

Below a simple shellscript example with http://gist.github.com/. Just copy&paste your code there, get the 'embed code', paste into the blogger/blogspot html-editor, done.
[EndOfFirstBlogEntry] - Woohoooo.