1831320 Members
3932 Online
110023 Solutions
New Discussion

Change device file

 
jhuihuihi
Contributor

Change device file

Dear all,

I want to change device file my tape from /dev/rmt/1m to be /dev/rmt/1m.
What should i do ?

thanks for your help

BR,

Sam
10 REPLIES 10
Massimo Bianchi
Honored Contributor

Re: Change device file

Hi,
we need a little more information...

1)
from /dev/rmt/1m to be /dev/rmt/1m

looks identical :9

2)
in which application ? Omniback ? fbackup ? tar ?


tar: tar .... -f your_device_file


fbackup: fbackup .... -f your_device_file


omniback: modify device properties and write whatever you want...


HTH,
Massimo

jhuihuihi
Contributor

Re: Change device file

Sorry give you wrong information.

I want to change tape devive file in HP-UX from /dev/rmt/1m to /dev/rmt/0m.

Thanks for your reply
twang
Honored Contributor

Re: Change device file

If you want to access the tape drive using another name, you may try to create a link:
# ln -s /dev/rmt/0m /dev/rmt/1m

Hope this helps.
Tom Geudens
Honored Contributor

Re: Change device file

Hi,
Not wanting to be difficult here, but why would you want to do that ? There is no device linked to /dev/rmt/0m any more (but there was probably, otherwise you wouldn't have a /dev/rmt/1m) ?

Note that it is not a simple procedure to change this. What you need is the "ioinit" command. Read the manpages carefully !!!

Regards,
Tom Geudens

P.S. If you want tapedrives to have the same name in your applications, use symbolic links. The following is from our systems :
lrwxr-xr-x 1 root sys 13 Apr 12 2002 /dev/robotwilg_drv0 -> /dev/rmt/5mnb
lrwxr-xr-x 1 root sys 14 May 2 2002 /dev/robotwilg_drv1 -> /dev/rmt/10mnb
lrwxr-xr-x 1 root sys 13 Apr 12 2002 /dev/robotwilg_drv3 -> /dev/rmt/4mnb

Whatever the device is, the application always uses robotwilg_drv0,drv1 or drv3.
A life ? Cool ! Where can I download one of those from ?
Massimo Bianchi
Honored Contributor

Re: Change device file

Hi,
i agree with others comments.
Not for doing your businness, but why do you want to do so ?

if, from "ioscan -fnCtape", you have just tape 1m, then you must use it.

If there are script that uses the 0m, then you must change them, and not the system.

HTH,
Massimo
twang
Honored Contributor

Re: Change device file

Pete Randall
Outstanding Contributor

Re: Change device file

Tim Sanko
Trusted Contributor

Re: Change device file

If you need to really change this for massive script changes. (for a system with one tape drive I have difficulty imagining this being something an awk script can't handle.

I would replace my ioconfig file, however, it would be much easier to replace my /dev/rmt/0m in scripts with sed or awk...

Tim
Caesar_3
Esteemed Contributor

Re: Change device file

Hello!

Just create link to the device and that's all
what you need.

Caesar
blal
Frequent Advisor

Re: Change device file


Hi,

One more thing what you can do is ,if the dat drive is the only device connected in your SCSI controller you can delete the existing device file using rmsf and change the SCSI id of the DAT drive to 0 and reboot the server.The new device file will be /dev/rmt/0m.

Other wise just create a create a link using

#ln /dev/rmt/0m /dev/rmt/1m.

Now both device file will point to save drive .

Regards
baiju
Live and let live.