Hi,
Well: This was kind of a tough afternoon. I just wanted to replace the
system disk of one of our boxes like I did it many times before under 4.0x
where it never was a problem. I've even copied the system disk of the
running system and booted up from the copy without problems.
Under 5.x things are quite different, apparently and I didn't quite
get used to it yet. So to make the long story short:
a.) I already had the copied system running (with the old disks
removed) and decided to rename dsk7 to dsk0. As adviced by Jan Mark
Holzer of Compaq, I used the command
# dsfmgr -e dsk7 dsk0
and modified the device links in /etc/fdmns/* accordingly.
BTW: The command "dsfmgr -m dsk7 dsk0" did not work because it said
that dsk0 would already be "active" which it was not. The disk was
removed from the system.
b.) Now when booting the machine I could not mount /usr anymore. It said:
Error: /dev/disk/dsk0g is an invalid device or cannot be opened.
when trying to "mount /usr".
However: All commands like "showfdmn", "showfset" and even
"/sbin/advfs/verify" worked very well.
c.) I finally found the solution in the mail of Gerhard Nolte who said
that after deleteing all device files and /etc/dfs* files etc.
when booting next time you need this:
# dn_setup -clean
this apparently deletes all devices files (everything under /dev and
/device). Even though I did not find any documentation about dn_setup
a long time system admin intuitively says :-)
# dn_setup -init
which really worked and re-created all device files again. Then in
order to recreate the /dev/disk/* files you only need this:
# dsfmgr -K
That's all: Now I can mount /usr again and all is well. It is still
unknown why I could not mount /usr after doing "dsfmgr -e dsk7 dsk0".
However Jan Mark Holzer of Compaq said he would look into it.
So thanks to the following people for their fast replies:
From: Klas.Erlandsson_at_europolitan.se
From: "McDowell, Paul" <Paul.McDowell_at_celera.com>
From: Jan Mark Holzer <jmh_at_zk3.dec.com>
From: Gerhard Nolte <gnolte_at_gwdg.de>
Here are their answers followed by me original posting.
Bye // Tom
-------------------------------------------------------------------------
From: Klas.Erlandsson_at_europolitan.se
Hi!
You can rename the device...
dsfmgr -m dskx dsky
/Klas
-------------------------------------------------------------------------
From: "McDowell, Paul" <Paul.McDowell_at_celera.com>
Thomas,
As long as the target name, in your case dsk0, is not in use on the new
system you can use the dsfmgr command to rename devices
e.g.
#dsfmgr -m "dsk-oldname" "dsk-newname"
So, if the on the target system the system disk is appearing as dsk8 and you
want it to be dsk0 you would run:
#dsfmgr -m dsk8 dsk0
Hope this helps,
Paul McDowell
Celera Genomics Corp.
45 West Gude Drive, Rockville, MD 20850
+1 240 453 3897
-------------------------------------------------------------------------
From: Jan Mark Holzer <jmh_at_zk3.dec.com>
Hi Thomas,
there's no 'easy' way to restart the numbering of devices
in the V5 stream (you'd have to delete the dec_hw* and
dfs* files in /etc but this would have other side effects
as all of your devices would get new names).
However if you just want to change the device name
of a certain disk you could use the command
dsfmgr -m to 'move' a device from one name to
another.
In your case you could use the command
dsfmgr -m dsk7 dsk0 which would 'rename'
dsk7 to dsk0 . Of course you have to make sure
that dsk0 does not exist, otherwise you could
use dsfmgr -e to 'exchange' a device name
(ie. dsfmgr -e dsk0 dsk7) .
If your problem is that a new installation does
not 'start' with dsk0 this is most likley because
you have not set bootdef_dev to a 'null' string
(>>> set bootdef_dev " ") and therefore the installation
procedure will read the value of bootdef_dev and read
and existing hardware database.
I believe this is documented in our system admin
guide at :
http://www.tru64unix.compaq.com/docs/base_doc/DOCUMENTATION/V51_HTML/ARH9FCT
E/TITLE.HTM
Feel free to contact me if you have any addtl. questions.
- Jan
-------------------------------------------------------------------------
From: Gerhard Nolte <gnolte_at_gwdg.de>
Hi Tom!
Im Anhang ein Skript, das das Devicenaming wieder neu anwirft. Hat
meiner Erinnerung nach gut funktioniert. Nach dem Laufen des Skripts
finden ich in meinen Anweisungen fuer mich, dass man "vorsichtig booten soll":
10) Vorsichtig booten:
b -fl s
mount -u /
dn_setup -clean
bcheckrc
Ich weiss aber nicht mehr, ob das notwendig ist.
Hoffentlich hilft's
Gerhard
8< ---------------- cut here -------------------- >8
#!/bin/ksh
#
# reinit the device naming
#
P=/newroot
PC=$P/cluster/members/member0
cat<<EOF
#
# clean Booted flag
#
EOF
echo "rm $PC/.Booted"
rm $PC/.Booted
cat <<EOF
#
# rem devices in /devices/disk cluster/.../dev
#
EOF
echo "rm -fr $P/devices/*"
rm -fr $P/devices/*
#echo "rm -fr $PC/dev/*"
# rm -fr $PC/dev/*
cat <<EOF
#
# Clean some description files
#
EOF
echo rm $P/etc/dec_*
rm $P/etc/dec_*
echo rm $P/etc/dfsc.*
rm $P/etc/dfsc.*
echo rm $P/etc/dfsl.*
rm $P/etc/dfsl.*
echo rm $PC/etc/dfsl.*
rm $PC/etc/dfsl.*
-------------------------------------------------------------------------
From: "McDowell, Paul" <Paul.McDowell_at_celera.com>
OK,
I think you need to delete the hwmgr database entry for the scsi ID of the
dsk0 device:
According to the show scsi command that you've run, the scsi device ID for
dsk7 is 6. The other disks in the system don't have special device file
names anymore but there are entries in the hwmgr db. The problem now is I
don't know which of these other entries belongs to the dsk0. If the system
disk, dsk7, is the only disk that you care about you could try deleting the
hwmgr db entries for the other devices that are still resident: Try deleting
them sequentially and then trying to move dsk7 to dsk0 as before
e.g.
#hwmgr -delete scsi -did 0
then run
#dsfmgr -m dsk8 dsk0
If you get the same message as before
dsfmgr: ERROR: second device status is active: dsk0a
then run
#hwmgr -show scsi
and delete the next -did number - probably 1 in your case.
#hwmgr -delete scsi -did 1
Eventually you'll clean the entry for dsk0.
Paul
-------------------------------------------------------------------------
From: Jan Mark Holzer <jmh_at_zk3.dec.com>
Hi Tom,
can you issue a showfsets/showfdmn against you usr_domain ??
showfsets works on an unmounted domain and it should not
return an error if there's a valid AdvFS filesystem on
the disk.
Is this a new installation or a copy of an existing system
disk ??
- Jan
ORIGINAL POSTING -----------------------------------------------------------
Hi,
I need a quick answer to this as I'm currently duplicating the system disk
on one of our machines: Apparently Tru64 5.x numbers disk devices with
/dev/disk/dskXX where XX seems to be ever increasing. I already had a
number of disks installed and removed on this machines and I always had XX
increasing. The new installation, however should have /dev/disk/dsk0 as
the system disk. How can I achieve that? Currently I'm booting from the
old system disk and the new disk is /dev/disk/dsk7. How can I achieve
that /dev/disk/dsk7 becomes /dev/disk/dsk0 when I boot next time?
I've already tried this:
# hwmgr -show scsi
# hwmgr -delete component -id XX
and deleted all but the system disk. I've also ensured that there
are no associated /dev/disk and /dev/rdisk entries anymore. However next
time when I boot up it automatically creates a /dev/disk/dsk8 and so on
ad infinitum?
Any ideas anyone to to influence this behaviour?
Thanks // Tom
--
--------------------------------------------------------------------------
Dr. Tom Leitner Dept. of Communications
Graz University of Technology,
e-mail : tom_at_radar.tu-graz.ac.at Inffeldgasse 12
Phone : +43-316-873-7455 A-8010 Graz / Austria / Europe
Fax : +43-316-463-697
Home page : http://www.radar.tugraz.at/people/tom.html
PGP public key on : ftp://wiis.tu-graz.ac.at/pgp-keys/tom.asc or send
mail with subject "get Thomas Leitner" to pgp-public-keys_at_keys.pgp.net
--------------------------------------------------------------------------
Before we have the paperless office, we have the paperless toilet!
Received on Thu Sep 27 2001 - 15:42:36 NZST