Operating System - HP-UX
1753928 Members
8881 Online
108810 Solutions
New Discussion юеВ

Re: Changing device names

 
SOLVED
Go to solution

Changing device names

I need to change a tape drive device name from /dev/rmt/2m to /dev/rmt/1m. How do I do this?
5 REPLIES 5
Steffi Jones_1
Esteemed Contributor

Re: Changing device names

Hello Glenn,

you can give devicefiles any names you want as long as you stay in the HPUX convention.

You delete the existing device file with the rm command and create a new one with the mknod command.

Make sure that you keep a copy of the old file in a different dir to be on the safe side.

Check the manpage for mknod for the complete syntax.

Steffi Jones
Wieslaw Krajewski
Honored Contributor

Re: Changing device names

Hi,

You can just create a link:

ln /dev/rmt/2m /dev/rmt/1m

and it works

But should remember, that 1 and 2 have their meaning.
Permanent training makes master
Rob Smith
Respected Contributor

Re: Changing device names

Use the mknod command to duplicate the device characteristics and change the device name. This always works for me. Hope this helps.

Rob
Learn the rules so you can break them properly.
Vincenzo Restuccia
Honored Contributor

Re: Changing device names

#rmsf -a /dev/rmt/2m
#mksf -C tape -I 1 /dev/rmt/1m

See man rmsf and mksf
Jim Mulshine
Frequent Advisor
Solution

Re: Changing device names

The mv command works...
example (0m to 1m):
# cd /dev/rmt
# lssf 0m
stape card instance 0 SCSI target 0 SCSI LUN 0 at&t best density available at ad
dress 16/5.0.0 0m
# mv 0m 1m
# lssf 1m
stape card instance 0 SCSI target 0 SCSI LUN 0 at&t best density available at ad
dress 16/5.0.0 1m

You could also opt to keep the original device file name an create a link to it...
# cd /dev/rmt
# ln -s 0m 1m