Operating System - Tru64 Unix
1748051 Members
5087 Online
108758 Solutions
New Discussion юеВ

Can I 'rename' disk devices?

 
R Swenson
Frequent Advisor

Can I 'rename' disk devices?

I blew an HSZ70 controller on one of my Storageworks systems and had to input all of the disks, raids, and units to get them back to where the system would see them. (I have all of my disks labeled so the configurations should be right). I deleted the 'stale' devices and then rebooted (I'm running Tru64, version 5.1(only)). HereтАЩs what the system shows currently:

# /sbin/hwmgr -view devices
HWID: Device Name Mfg Model Location
------------------------------------------------------------------------------
4: /dev/kevm
46: /dev/disk/floppy0c 3.5in floppy fdi0-unit-0
51: /dev/disk/cdrom0c DEC RRD46 (C) DEC bus-0-targ-5-lun-0
56: /dev/disk/dsk4c DEC RZ1CB-CA (C) DEC bus-2-targ-0-lun-0
63: /dev/ntape/tape4 COMPAQ SuperDLT1 bus-4-targ-5-lun-0
77: /dev/disk/dsk11c DEC HSZ70 (C) DEC bus-1-targ-0-lun-1
78: /dev/disk/dsk12c DEC HSZ70 (C) DEC bus-1-targ-0-lun-2
79: /dev/disk/dsk13c DEC HSZ70 (C) DEC bus-1-targ-0-lun-3
80: /dev/disk/dsk14c DEC HSZ70 (C) DEC bus-1-targ-0-lun-4

Trouble is, instead of dsk11c through dsk14c, the disks SHOULD be dsk0c through dsk3c. Can anyone tell me how to do this? Thanks.
9 REPLIES 9
Rob Leadbeater
Honored Contributor

Re: Can I 'rename' disk devices?

Hi,

You need to use dsfmgr to move the names back to what they should be.

# dsfmgr -m dsk11 dsk0

If I remember correctly... check the man pages for dsfmgr and hwmgr to be sure.


Cheers,

Rob
R Swenson
Frequent Advisor

Re: Can I 'rename' disk devices?

Thanks for your help, Rob. I tried a few variations, here is what happened:

# /sbin/dsfmgr -m dsk11 dsk0
dsfmgr: ERROR: second device status is active: dsk0a

# /sbin/dsfmgr -m dsk11c dsk0c
dsfmgr: ERROR: move device does not exist: dsk11c
dsfmgr: ERROR move failed: Invalid argument

# /sbin/dsfmgr -m disk11 disk0
dsfmgr: ERROR: move device does not exist: disk11
dsfmgr: ERROR: second name "disk0" must have the same prefix as the first: dsk
dsfmgr: ERROR move failed: Invalid argument
R Swenson
Frequent Advisor

Re: Can I 'rename' disk devices?

Also, are you familiar with this?

/usr/sbin/cleanPR clean
Reto Kisseleff
Advisor

Re: Can I 'rename' disk devices?

You have to check with "hwmgr -show scsi" if you have a dsk0 with no valid pathes. If so, delete the device with "hwmgr -delete scsi -did " (second column)

If you can't see it with hwmgr command, check /etc/dfsc.dat file with "grep dsk0 /etc/dfsc.dat". Fourth column shows you the hwid.
Don't change anything in this file, delete dsk0 by executing "hwmgr -delete cimp -id "

cleanPR is just to remove reservations on disks, which has nothing to do with this kind of problem.

cheers
Reto
Reto Kisseleff
Advisor

Re: Can I 'rename' disk devices?

hwmgr -delete comp -id
is the correct command I meant.
R Swenson
Frequent Advisor

Re: Can I 'rename' disk devices?

I did the "-scan scsi" and "-show scsi -full" initially and found that I had 'stale' path states on bus-target-lun 1-0-1, 1-0-2, 1-0-3, and 1-0-4 which were SCSI device ID's 1-4 respectively. So I used "hwmgr -delete scsi -did " and deleted them as you suggested. I figured once those addresses were now empty, all I would need to do was reboot and things would be fine. Unfortunately after that initial reboot, the disks showed up as dsk6c-dsk9c. So I blew them away as well, and tried a second reboot. Here is where things stand as of now:

# /sbin/hwmgr -show scsi

SCSI DEVICE DEVICE DRIVER NUM DEVICE FIRST
HWID: DEVICEID HOSTNAME TYPE SUBTYPE OWNER PATH FILE VALID PATH
-------------------------------------------------------------------------
51: 0 hmpunix cdrom none 0 1 cdrom0 [0/5/0]
56: 5 hmpunix disk none 2 1 dsk4 [2/0/0]
63: 7 hmpunix tape none 0 1 tape4 [4/5/0]
77: 1 hmpunix disk none 0 1 dsk11 [1/0/1]
78: 2 hmpunix disk none 0 1 dsk12 [1/0/2]
79: 3 hmpunix disk none 0 1 dsk13 [1/0/3]
80: 4 hmpunix disk none 0 1 dsk14 [1/0/4]
R Swenson
Frequent Advisor

Re: Can I 'rename' disk devices?

Correction to the above documentation: "Unfortunately after that initial reboot, the disks showed up as dsk6c-dsk9c". The disks actually showed up as dsk7 - dsk10.
R Swenson
Frequent Advisor

Re: Can I 'rename' disk devices?

First off, my thanks (and points) to those who posted the suggestions above! I discovered after the fact that, although we had dropped hardware support on this system, we still had software support so I logged a call with HP Support. Here is the solution that WORKED, compliments of Marlene J. Lam (one of HP's BEST, I've worked with her before):

After shutting down the system to single user mode :
remount / and /usr read/write

ie)

# /sbin/shutdown now
# /sbin/mountroot
# /sbin/mount /usr

or

( alternatively, boot single user mode and then mount / and /usr read/write)
P00>>> boot -fl s

# /sbin/mountroot
# /sbin/mount /usr

================

try the dsfmgr -m commands :

# /sbin/dsfmgr -m dsk11 dsk0
# /sbin/dsfmgr -m dsk12 dsk1

# /sbin/dsfmgr -m dsk13 dsk2
# /sbin/dsfmgr -m dsk14 dsk3


==========

If you still get an error, (Note: I did) try the following:

The problem can be resolved using the undocumented "-Z" flag
to dsfmgr with the HWID of the old (removed) disk. First, find
the old HWID of the removed disk. If the removed disk is dsk0,
do:

# cd /etc

make copies of the original files:
# /sbin/cp dfsc.dat dfsc.dat.may28
# /sbin/cp dfsl.dat dfsl.dat.may28

# /sbin/grep "dsk 0" dfsc.dat dfsl.dat

On the lines that have "0" as the next to last field,
field 4 will contain the old HWID of this disk (say 63 for this example).

ie)
NASSOR #> /sbin/grep "dsk 0" dfsc.dat dfsl.dat
dfsc.dat:A: 0 1300011 63 8 0 b "" /dev/disk/ dsk 0 a
dfsc.dat:A: 0 1300013 63 8 1 b "" /dev/disk/ dsk 0 b
dfsc.dat:A: 0 1300015 63 8 2 b "" /dev/disk/ dsk 0 c
dfsc.dat:A: 0 1300017 63 8 3 b "" /dev/disk/ dsk 0 d
dfsc.dat:A: 0 1300019 63 8 4 b "" /dev/disk/ dsk 0 e
dfsc.dat:A: 0 130001b 63 8 5 b "" /dev/disk/ dsk 0 f
dfsc.dat:A: 0 130001d 63 8 6 b "" /dev/disk/ dsk 0 g
dfsc.dat:A: 0 130001f 63 8 7 b "" /dev/disk/ dsk 0 h
dfsc.dat:A: 0 1300012 63 8 0 c "" /dev/rdisk/ dsk 0 a
dfsc.dat:A: 0 1300014 63 8 1 c "" /dev/rdisk/ dsk 0 b
dfsc.dat:A: 0 1300016 63 8 2 c "" /dev/rdisk/ dsk 0 c
dfsc.dat:A: 0 1300018 63 8 3 c "" /dev/rdisk/ dsk 0 d
dfsc.dat:A: 0 130001a 63 8 4 c "" /dev/rdisk/ dsk 0 e
dfsc.dat:A: 0 130001c 63 8 5 c "" /dev/rdisk/ dsk 0 f
dfsc.dat:A: 0 130001e 63 8 6 c "" /dev/rdisk/ dsk 0 g
dfsc.dat:A: 0 1300020 63 8 7 c "" /dev/rdisk/ dsk 0 h

Use this HWID in the dsfmgr command:
# dsfmgr -Z rm_cluster_hwid 63 0
# dsfmgr -Z rm_local_hwid 63 0


then retry the dsfmgr -m commands:


# /sbin/dsfmgr -m dsk11 dsk0
# /sbin/dsfmgr -m dsk12 dsk1

# /sbin/dsfmgr -m dsk13 dsk2
# /sbin/dsfmgr -m dsk14 dsk3



and then bring the system back up !
R Swenson
Frequent Advisor

Re: Can I 'rename' disk devices?

after shutting down the system to single user mode :
remount / and /usr read/write

ie)

# /sbin/shutdown now
# /sbin/mountroot
# /sbin/mount /usr

or

( alternatively, boot single user mode and then mount / and /usr read/write)
P00>>> boot -fl s

# /sbin/mountroot
# /sbin/mount /usr

================

try the dsfmgr -m commands :

# /sbin/dsfmgr -m dsk11 dsk0
# /sbin/dsfmgr -m dsk12 dsk1

# /sbin/dsfmgr -m dsk13 dsk2
# /sbin/dsfmgr -m dsk14 dsk3


==========

If you still get an error, try the following:

The problem can be resolved using the undocumented "-Z" flag
to dsfmgr with the HWID of the old (removed) disk. First, find
the old HWID of the removed disk. If the removed disk is dsk0,
do:

# cd /etc

make copies of the original files:
# /sbin/cp dfsc.dat dfsc.dat.may28
# /sbin/cp dfsl.dat dfsl.dat.may28

# /sbin/grep "dsk 0" dfsc.dat dfsl.dat

On the lines that have "0" as the next to last field,
field 4 will contain the old HWID of this disk (say 63 for this example).

ie)
NASSOR #> /sbin/grep "dsk 0" dfsc.dat dfsl.dat
dfsc.dat:A: 0 1300011 63 8 0 b "" /dev/disk/ dsk 0 a
dfsc.dat:A: 0 1300013 63 8 1 b "" /dev/disk/ dsk 0 b
dfsc.dat:A: 0 1300015 63 8 2 b "" /dev/disk/ dsk 0 c
dfsc.dat:A: 0 1300017 63 8 3 b "" /dev/disk/ dsk 0 d
dfsc.dat:A: 0 1300019 63 8 4 b "" /dev/disk/ dsk 0 e
dfsc.dat:A: 0 130001b 63 8 5 b "" /dev/disk/ dsk 0 f
dfsc.dat:A: 0 130001d 63 8 6 b "" /dev/disk/ dsk 0 g
dfsc.dat:A: 0 130001f 63 8 7 b "" /dev/disk/ dsk 0 h
dfsc.dat:A: 0 1300012 63 8 0 c "" /dev/rdisk/ dsk 0 a
dfsc.dat:A: 0 1300014 63 8 1 c "" /dev/rdisk/ dsk 0 b
dfsc.dat:A: 0 1300016 63 8 2 c "" /dev/rdisk/ dsk 0 c
dfsc.dat:A: 0 1300018 63 8 3 c "" /dev/rdisk/ dsk 0 d
dfsc.dat:A: 0 130001a 63 8 4 c "" /dev/rdisk/ dsk 0 e
dfsc.dat:A: 0 130001c 63 8 5 c "" /dev/rdisk/ dsk 0 f
dfsc.dat:A: 0 130001e 63 8 6 c "" /dev/rdisk/ dsk 0 g
dfsc.dat:A: 0 1300020 63 8 7 c "" /dev/rdisk/ dsk 0 h

Use this HWID in the dsfmgr command:
# dsfmgr -Z rm_cluster_hwid 63 0
# dsfmgr -Z rm_local_hwid 63 0


then retry the dsfmgr -m commands:


# /sbin/dsfmgr -m dsk11 dsk0
# /sbin/dsfmgr -m dsk12 dsk1

# /sbin/dsfmgr -m dsk13 dsk2
# /sbin/dsfmgr -m dsk14 dsk3



and then bring the system back up !