Operating System - HP-UX
1834208 Members
2459 Online
110066 Solutions
New Discussion

Re : changing device files

 
Vincent_5
Super Advisor

Re : changing device files

Hi Guys,
Can someone advice if I can change a hardware device file from /dev/rmt2m to /dev/rmt/0m . This is because, I have a few script which is setup to backup the server to tape device /dev/rmt/0m. And after inserting the additional card for the tape drive dat72 on a rx2620 it seems to change the device file from /dev/rmt/0m to /dev/rmt/2m.

Pls advice??

Regards
Vincent
nothing is better than to know more
5 REPLIES 5
Anil C. Sedha
Trusted Contributor

Re: Re : changing device files

Why can't you just change the script to look for 2m.

the hardware device file should not be changed to something that you like.

I believe you can do it the following way.

Rename 0m to 0m.orig and then move 2m to 0m, and then mv /dev/rmt/0m.orig as /dev/rmt/2m

You don't lose anything, but when you are tracking devices with their controller name, you/someone else in your organization may make a mistake.

-Anil
If you need to learn, now is the best opportunity
Steven E. Protter
Exalted Contributor

Re: Re : changing device files

Shalom Vincent,

The only way to do this is to wipe out this file:
/etc/ioconfig

Boot the box and reinitialize the drivers.

Its dangerous and risks an unbootable system.

Some resources on the process:
http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=695058

http://docs.hp.com/en/B2355-60105/ioconfig.4.html

http://docs.hp.com/en/B2355-60103/ioinit.1M.html

http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=425790

http://docs.hp.com/en/B2355-90691/ioinit.1M.html

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Pete Randall
Outstanding Contributor

Re: Re : changing device files

Yes, absolutely - you can simply rename the device file - or you can set up a link for /dev/rmt/0m that points to /dev/rmt/2m.


Pete

Pete
Stephen Keane
Honored Contributor

Re: Re : changing device files

Or you can change your scripts so that the tape device is held in a variable, so you don't have this pain again. Especially if you ever plan on running the script(s) on another machine. Hard-coding the tape device name is not usually a good idea.
Bill Hassell
Honored Contributor

Re: Re : changing device files

I would definitely NOT recommend renaming a device file. When new hardware is added, device files are created. So the names are a history of adding new hardware. As mentioned, the backup script should NEVER hardcode the device file name -- it should be a runtime parameter so you can specify the tae drive you want to use.


Bill Hassell, sysadmin