Identifying the Right Disk…

21 September 2007

When it comes time to replace a disk - such as when a disk goes bad in an external hot-swappable disk cage - it can be catastrophic to remove the wrong disk (to say the least). Assuming that you have “read” capabilities on this drive, how do you identify the disk associated with the one you know is bad (which you’ve identified from the operating system)?

Well, in a UNIX-based environment, you can use dd. How?

Make the disk light on the disk glow by entering this command:

dd if=/dev/baddsk of=/dev/null

This will read the entire disk, starting at the beginning, and send the output to…. nowhere! It does, however, make the disk light light up.

In system administration, it is never wrong to double-check. So: execute the command, and check which disk has lit up. Then stop the command and watch to see that the light goes out (or is no longer solidly lit). Restarting the command should then light up the disk. So now you know.

Entry Filed under: Tips, UNIX. Tags: , .

Leave a Comment

Required

Required, hidden

Some HTML allowed:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Trackback this post  |  Subscribe to the comments via RSS Feed


David Douthitt

David is an experienced UNIX and Linux system administrator, a former Linux distribution maintainer, and author of two books ("Advanced Topics in System Administration" and "GNU Screen: A Comprehensive Manual"). View David Douthitt's profile on LinkedIn

Recent Posts

Top Posts

RSS Sharky's Column!

Calendar

September 2007
M T W T F S S
« Aug   Oct »
 12
3456789
10111213141516
17181920212223
24252627282930

Recent Comments

bharat on The Demise of the HP-UX System…
H4mm3r on Avoiding catastrophe!
Vladimir on Argument list too long?
ddouthitt on The UNIX find command and…
Mihir G joshi on The UNIX find command and…

Category Cloud

BSD Career Debian Debugging Fedora FreeBSD HPUX Learning Linux MacOS X Mind Hacks Mobile Computing NetBSD Networking OpenBSD OpenSolaris Open Source OpenVMS Personal Notes Portable Presentations Red Hat Scripting Security Solaris Tips Ubuntu UNIX Wheel Group Windows

Archives

Feeds

Links