Re: Help - I can't create device files.
From: Ben (unix-rlz_at__mail9ndn3ws_._com)
Date: 10/27/03
- Next message: Beardy: "Re: Help - I can't create device files."
- Previous message: John Auer: "Check out the correction patch"
- In reply to: Dr. David Kirkby: "Help - I can't create device files."
- Next in thread: Dr. David Kirkby: "Re: Help - I can't create device files."
- Reply: Dr. David Kirkby: "Re: Help - I can't create device files."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sun, 26 Oct 2003 19:06:16 -0500
"Dr. David Kirkby" wrote:
>
> I had a relatively small problem today on my Ultra 80 running Solaris
> 9 that I managed to make into a **big** problem. If you have any
> suggestions how I can get out of this mess, please let me know. Sorry
> if the message is a bit long-winded, but hopefully someone can see
> what I need to do.
>
> The basic problem is I can't seem to create device files for some
> external disks, so I can't read them, although the disks are seen by
> format and mount okay if I boot from cd-rom. That's the problem - this
> is the background.
>
> The original (small) problem was the external disks would not mount.
> For reasons I can't work out, following a boot -r, the /dev/dsk/c3*
> device files had been removed and in their place were files which
> appeared to be on controller #5 (/dev/dsk/c5*) - which is a bit odd
> given I only have 4 SCSI controllers - two on the motherboard, plus a
> dual SCSI card.
>
> I edited /etc/vfstab and replaced the all the c3's with c5's and the
> machine booted and mounted all systems okay. However, like a stupid
> fool, not content with that, I thought I'd remove the appropriate
> files in /devices, with a hope of getting the disks back to their
> correct place - on controller #3. The problem was I obviously removed
> the wrong file(s) in /devices, as then the system was completely
> unbootable. I could do nothing with it. boot -b, boot -r, all failed
> miserably.
>
> My backups of the root file system were not as recent as they should
> be, so I booted from CD, mounted and backed up every single partition
> to tape, although the backup of the root file system was clearly
> missing some important device files.
>
> I then reinstalled the system from the Solaris installation CD, doing
> the smallest installation. I then did a 'boot cdrom' restored the /
> and /usr file systems from tape, but without any files in /devices,
> /dsk or /rdsk.
>
> The system now boots and mounts all the file systems I created during
> the install (/, /var, /usr), plus one other (/export/home) which is on
> an internal disk. The data on /export/home has not been changed, so I
> all the user directories remain.
>
> The problem is I can't create device files. Following a boot -r, there
> are entries in /dev/dsk for controllers 0 and 1, but not and 3. The
> disks and partitions on the disks on c3 are visible to format. Booting
> from CD I can mount them. But I can't mount them if I boot from disk,
> as I don't have any device files, and seem unable to create them with
> a boot -r.
>
> Any suggestions - other than to keep better backups!
>
> Dave Kirkby
Dave--
Not to rub salt in the wound but see the manpage 'devfsadm' for doing
what you were trying to do. Starting with Solaris 7, 'devfsadm'
replaced the former multi-command management of /dev and /devices. It
should help get you back on your feet, too.
Since it sounds as though you've got a bootable system, see the manpage
and try running:
# devfsadm -c disk -Csv
and note the run and output with the "-s" option is a dry-run (no
changes). You *should* see output to the affect of adding/creating the
necessary device files.
The "-c disk" keeps the operation to a specific device class
(self-explanatory) and the "-Csv" indicates it should run in cleanup
mode, suppress changes and be verbose. At this point, cleanup (removal
of non existent/dangling files) is optional here since you sound to be
more concerned with getting your disk(s) added back. It may be useful
to include a cleanup run on all device-classes (leave out the "-c") at
some later point to see if it can/should remove extraneous items.
Also, there's a "-r root_dir" option that you could have used with
booting from the CD to repair things.
Either post the dry-run output back if you're still in doubt, but it
should be pretty clear what 'devfsadm' will want to do, or if you're
satisfied then move ahead and remove the "-s" option to make the
changes.
HIH.
Ben--
- Next message: Beardy: "Re: Help - I can't create device files."
- Previous message: John Auer: "Check out the correction patch"
- In reply to: Dr. David Kirkby: "Help - I can't create device files."
- Next in thread: Dr. David Kirkby: "Re: Help - I can't create device files."
- Reply: Dr. David Kirkby: "Re: Help - I can't create device files."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|