[NBLUG/talk] Device node problems
Lincoln Peters
sampln at sbcglobal.net
Sat Oct 15 18:40:55 PDT 2005
Well, I got the replacement for the hard disk that failed. However, I seem to
have run into a new problem, though this one is definitely user error and I'm
sure is fixable.
For security reasons, I ran the "shred" utility on the failed hard disk before
swapping it out. However, instead of using the appropriate command:
# shred -fvxz /dev/hde
I accidentally typed in:
# shred -fuvxz /dev/hde
As a result, when shred finished erasing the hard disk, it deleted the hard
disk's node in the /dev directory! Interestingly enough, all of the nodes
associated with its partitions also disappeared!
So, after I installed the new hard disk, I tried using the MAKEDEV script to
recreate the nodes:
# cd /dev ; ./MAKEDEV hde
This restored the "hde" node, but not the nodes for partitions ("hde1",
"hde2", and "hde3"). So I checked the numbers on the nodes for the other
disks, and found this:
# cd /dev ; ls -lh hd*
brw-rw---- 1 root disk 3, 0 2005-10-15 17:24 hda
brw-rw---- 1 root disk 3, 1 2005-10-15 17:24 hda1
brw-rw---- 1 root disk 3, 2 2005-10-15 17:24 hda2
brw-rw---- 1 root disk 3, 3 2005-10-15 17:24 hda3
brw-rw---- 1 root cdrom 22, 0 2005-10-15 17:24 hdc
brw-rw---- 1 root disk 33, 0 2005-10-15 17:24 hde
brw-rw---- 1 root disk 34, 0 2005-10-15 17:24 hdg
brw-rw---- 1 root disk 34, 1 2005-10-15 17:24 hdg1
brw-rw---- 1 root disk 34, 2 2005-10-15 17:24 hdg2
brw-rw---- 1 root cdrom 56, 0 2005-10-15 17:24 hdi
brw-rw---- 1 root cdrom 57, 0 2005-10-15 17:24 hdk
Based on this pattern, I created new device nodes for the partitions with
major number 33 and minor numbers 1-3:
# mknod hde1 b 33 1
# mknod hde2 b 33 2
# mknod hde2 b 33 3
However, any time I try to access any of the partitions, I get an error that
looks like:
cannot open /dev/hde1: No such device or address
So what the heck am I doing wrong???
--
Lincoln Peters
<sampln at sbcglobal.net>
Wait for that wisest of all counselors, Time.
-- Pericles
/~\ The ASCII Ribbon Campaign
\ / No HTML/RTF in email
X No Word docs in email
/ \ Respect for open standards
More information about the talk
mailing list