1844183 Members
2536 Online
110229 Solutions
New Discussion

Device File ISSUE

 
SOLVED
Go to solution
abhijit chaphekar
Occasional Advisor

Device File ISSUE

Hi ALL,

Few days back we had hfs to vxfs conversion.
After that conversion the device files accessing the dlt (in all 4) drives have changed ie /dev/rmt/4m has now become /dev/rmt/2m.
Can anyone justify this change.
Any help would be highly appreciated.

For details of device files iam attaching a file....please have a look.

Thanx.
7 REPLIES 7
A. Clay Stephenson
Acclaimed Contributor

Re: Device File ISSUE

This isn't so strange; it very frequently happens if interface cards were added to the system and the root filesystem is recreated
or a new OS is installed.
If you do an ioscan -C tape -fn you will notice an 'I' column for instance. That's simply the order in which the system discovered
the device. Generally, 0m is instance 0, 1m is instance 1m, and so on. However, you could very easily recreate the device node with the proper major/minor device and 0m can be anything you like.
If if bugs you, simply use mknod to create the short tape device nodes to the old values.

BTW - this could also occur with your SCSI controllers as well; what was c2 might now be c3.

The discovery sequence varies from platform to platform but it is predictable.

Hope this clears things up a bit, Clay.
If it ain't broke, I can fix that.
abhijit chaphekar
Occasional Advisor

Re: Device File ISSUE

Clay,

8/0.8.0.0.0.2.0 has /dev/rmt/2m
and
8/0.8.0.0.1.4.0 has /dev/rmt/4m

i want to reverse them. so do have to do rmsf to both of them and recreate with mknod/mksf.

thanx,
MANOJ SRIVASTAVA
Honored Contributor

Re: Device File ISSUE

I also agree . Actually the way a device is reported is as it is sensed by the kernel while the kernel is booting , more to do with the Interrupts , the slots where they are located on the system bus , and the ID's so any time you change the OS , cards you will find that the same device now has differnt dev file name.

Manoj
A. Clay Stephenson
Acclaimed Contributor

Re: Device File ISSUE

Hi Abhijit:

We don't need no stinkin' mksf; we're gonna do this like real UNIX guys with mknod.

1) cd to /dev/rmt.
2) ls -l and note the major and minor device numbers of the devices you wish to swap. You might want to do an ls -l | lp to have handy.
3) Lets say that 2m looks like:
crw-rw-rw 2 bin bin 205 0x022000 date 2m
and that
4m looks like (just examples)
crw-rw-rw 2 bin bin 204 0x052000 date 4m
were going to swap the 0x022000 and the 0x052000
4) rm 2m 4m
5) mknod 2m c 205 0x052000
mknod 4m c 205 0x022000
chown bin:bin 2m 4m
chmod 666 2m 4m

It's a little bit tedious but it really is the most certain way to do this. You will also need to do the 2n, 2nb, etc. nodes as well. I would do them even if you don't use them. They could cause great confusion (at least on humans) in the future if 2m and 2mn were diffrent physical tape drives.

This should do the trick, Clay.
If it ain't broke, I can fix that.
MANOJ SRIVASTAVA
Honored Contributor

Re: Device File ISSUE

There is also one more way to do it .
Interchange the devices physically ?
Just a thought .Though the other way is easier .


Manoj Srivastav
abhijit chaphekar
Occasional Advisor

Re: Device File ISSUE

Clay,

If i reverse the device files this will be true only till the next reboot.Again after the next reboot.i will have to do conversions........
Is there any....workaround for this problem.

thanx
A. Clay Stephenson
Acclaimed Contributor
Solution

Re: Device File ISSUE

You're lucky you caught me just before I left.
No, the changes are permanent; if you add another device in the future the next available instance will be used. Existing entries will not be touched. You're home free.

Regeards, Clay
If it ain't broke, I can fix that.