1753822 Members
9075 Online
108805 Solutions
New Discussion юеВ

Reappearing device files

 
SOLVED
Go to solution
Maarten van Maanen
Regular Advisor

Reappearing device files

We have a 12H with six 18Gb disks. The AutoRAID has been reconfigured completely during the last weekend and now has four LUN's of 16Gb each with all LUN's being deleted before reconfiguration.
Before, all 8 LUN's were in use due to earlier modifications. I've also had, for a short time, a seventh disk in the AutoRAID. I had in my /dev/dsk and /dev/rdsk device files for these old configuration. I deleted these (both /dev/dsk and /dev/rdsk) and run insf -e -C disk. To my surprise, this recreated all seven device files although only four are in use at the moment (for LUN1 to LUN4).
I've tried this again but with the same results. To my knowledge, the system should create only the device files for the LUN's in use at the moment.
Why are the extra device files recreated ??
5 REPLIES 5
Andreas Voss
Honored Contributor

Re: Reappearing device files

Hi,

try an ioscan -f before insf -e

Regards

Andrew
Maarten van Maanen
Regular Advisor

Re: Reappearing device files

Hi,

I did run an ioscan -fnC disk both before and after insf with no new results.
When I run ioscan -f -C disk I get NO_HW in de list for the addresses mentioned but insf -e still gives me the same result.

disk 8 8/8.1.4 sdisk NO_HW DEVICE HP C5447A
disk 13 8/8.1.5 sdisk NO_HW DEVICE HP C5447A
disk 15 8/8.1.6 sdisk NO_HW DEVICE HP C5447A
disk 17 8/8.1.7 sdisk NO_HW DEVICE HP C5447A

Maybe I should remove the unnecessary device files and then reboot the system (K370)? Maybe the kernel still holds some of the paths involved.

Stefan Farrelly
Honored Contributor

Re: Reappearing device files


even if you do an ioscan -f and then an insf your server is still going to look a mess with some hardware devices left unclaimed. Best to rmsf the devices that shouldnt be there and then reboot. All should come up cleanly and no old device info left around.
Im from Palmerston North, New Zealand, but somehow ended up in London...
Bill Hassell
Honored Contributor
Solution

Re: Reappearing device files

Removing device files with rm is not recommend. Use the following device file commands:

rmsf (not rm)
lssf (not ls -l)
insf or mksf (not mknod)

The reason is that the kernel maintains an internal instance list of all the devices since hardware paths are much too long to fit into the minor number.

So after removing the lvols, then physical devices (and possibly the volume groups), use rmsf -H 1/2.3.0 (or whatever) to remove all the device files related to that hardware path.

Now add back the device files with insf -H 1/2.3.4.0 (and optionally, -I # to specify the same or different instance number). The instance number is the number after the letter c in a device file as in c1t2d0. While you can use mknod for non-hardware files (ie, /dev/null), the instance number must be assigned by the kernel.

insf actually polls the driver to determine all the responding addresses and creates an device file for each address (and if present, LUNs).


Bill Hassell, sysadmin
Maarten van Maanen
Regular Advisor

Re: Reappearing device files

I solved the problem in the following way.

Rerun the ioscan -f -C disk.
Then listed the device files in /dev/rdsk.
Used rmsf -a /dev/dsk/device files to remove both the device from the system and their device files.
After this, ioscan gave the required result.