Operating System - HP-UX
1821537 Members
2354 Online
109633 Solutions
New Discussion юеВ

Re: Changing the device file

 
meekrob
Super Advisor

Changing the device file

Hi all ,

i have a DLT 8000 attached to a L3000 server ,
the server detect the drive with the device file /dev/rmt/1m ,
or the script that i have for the backup is /dev/rmt/0m , is there a way to change the device file from 1m to 0m , because if not i will need to change the script
thank you
7 REPLIES 7
Dennis Handly
Acclaimed Contributor

Re: Changing the device file

I assume that number has only meaning if there was some hardware device that had a "1"? Or there were both 0m and 1m?

I'm not sure if "lssf /dev/rmt/1m" would help?

I assume all you need to do is a "mv" as root to rename it. But if there already is a 0m, you better wait until someone more experience answers.

How hard is it to change your script? Does your script run on multiple machines?
Robert-Jan Goossens
Honored Contributor

Re: Changing the device file

Hi,

Could you post the output of

# ls -la /dev/rmt

Is here an other tape-drive attched to this L3000?

# ioscan -fnCtape

Regards,
Robert-Jan
meekrob
Super Advisor

Re: Changing the device file

Hi ,

this is the only tape drive attached to the L3000 ;

Court Campbell
Honored Contributor

Re: Changing the device file

for the amount of time you will burn trying to change the device file. you could have already edited the script.
"The difference between me and you? I will read the man page." and "Respect the hat." and "You could just do a search on ITRC, you don't need to start a thread on a topic that's been answered 100 times already." Oh, and "What. no points???"
Robert-Jan Goossens
Honored Contributor

Re: Changing the device file

this is the only tape drive attached to the L3000
---

then mv the device files from 1 to 0
example:
# mv /dev/rmt/1m /dev/rmt/0m

Regards,
Robert-Jan
Luk Vandenbussche
Honored Contributor

Re: Changing the device file

You can also change the SCSI id of your tape drive, so that /dev/rmt/0m is claimed to the exact scsi id
Bill Hassell
Honored Contributor

Re: Changing the device file

Device file names are just names, so you can rename the device file 1m to 0m and your script will now work.

But that is a VERY bad idea. The device names are created automatically by insf and you risk having problems in the future if you add or change tape drives. Further, it is a bad idea to hardcode a device file into a script. Things change and the only sane way to handle this is to obtain the device file from the command line when you run the script.

Now if this is simply impossible, you will have to remove the devices for both 0m and 1m using rmsf -H (do not use rm). Once removed, use insf to add the tape drive back again, this time specifying -I 0 to create instance 0 (0m and relatives):

insf -H 1/2/3.4.5 -I 0

where 1/2/3.4.5 is the actual hardware path for your tape. To see the tape drive path:

ioscan -kfnC tape


Bill Hassell, sysadmin