Some time ago I posted a request to the list for information on how
to backup and restore a root advfs file partition. While I posted
a summary of the responses, I also said that I'd eventually get
back a more formal results summary of trying those responses out.
So again... thanks to the following for their original responses.
Helgi Viggosson <helgi_at_ott.is> who provided by far the most exacting
procedure!
Kris Chandrasekhar <chandrasek_at_odixie.ENET.dec.com> who came across
the problem with the use of the "mt" command interestingly
enough. The "mt" command is not included in the root file
system.
Lucien Hercaud <Lucien_Hercaud_at_paribas.com> who cited the
/isl/install.1 shell script.
For those interested in the details... we think these work. Any
comments would be appreciated. You may send them either to me,
or to my compatriot, Stan Uno, who actually did all the work....
uno_at_tti.com
-----Start of Restore.procedures-----
RESTORING ADVFS FILESYSTEM DISKS
You must have the following prior to restoring a disk containing AdvFS
filesystems:
1) A good backup of the filesystems on the disk.
2) The tape and disk drive types and addresses (e.g. tz5 and rz28)!
3) The disklabel information for the drive to be restored.
A SAMPLE ADVFS DISK RESTORE SCENARIO
For our example restore, we will take the case a little more complex
than is assumed in the DEC documentation:
1) The disk drive (SCSI ID 0) that has failed is assumed to contain
three filesystems: the root (root_domain), /usr (usr_domain) and
/var (var_domain) partitions.
2) The restore will go onto a disk with a different SCSI address than
the original (SCSI ID 3). The disk is assumed to be formatted, but
we are unsure as to the partitioning information.
3) The tape drive to be used is tz5, the disk drive type rz28, and we
have a CD reader at dka400 for the installation media.
4) The original backups were taken on a system called alpha2 using the
sample backup scripts. The backup tape is layed out as follows:
File 1 / root_domain#root
File 2 /usr usr_domain#usr
File 3 /var var_domain#var
File 4 /usr/users users_domain#users
(Refer to the "DEC OSF1 System Administration" chapter on "Managing
Backup and Restore Services", specifically the section on "Restoring
the root and /usr File Systems". Also, see the "DEC OSF1 Installation
Guide" section for the particular AlphaServer you are using. These
notes were written based upon the Version 3.2 manual used in
conjunction with a Version 3.0B OS on a AlphaServer 1000 4/200.)
1) Boot the operating system (e.g. from the Operating System CD). In
our scenario:
On the console while at the ">>>" prompt, do a "show VARNAME"
where VARNAME is boot_osflags, auto_action and boot_file and note
the values. Then issue the commands:
set boot_osflags ""
set auto_action halt
Now actually boot from the distribution media:
-- Place the Operating System CD in the caddy.
-- Issue the following command on the console:
show device
You should now see the CD-ROM device identified as "RRD43" or
"RRD44" as the third field. The boot device identifier will be
the second field, e.g. "DKA400".
-- Boot the CD by issueing the boot command on the console,
e.g.:
b dka400
2) The DEC OSF/1 system should now come up and prompt you to select
one of three options:
1) BASIC Installation
2) ADVANCED Installation
3) SYSTEM Management
Select the "3) SYSTEM Management" option. This will drop you into
single user mode on the console.
3) Create the tape device, e.g.:
cd /dev
MAKEDEV tz5
4) Restore the appropriate disk partition information. In our example
we are going to use the information from the original rz0 disk on
SCSI ID 0 that has been saved in the /usr/users directory on file 4
of the backup tape created by the example backup script in
subdirectory uno/projects2/backups/disk.info:
mt -f /dev/nrmt0h fsf 3
vrestore -i -f /dev/nrmt0h
(You will receive a "vrestore: Date of the vdump save-set"
message and a "(/)" prompt to let you know what directory you
are at. You can use ls and cd commands to find desired
directories and files.)
add uno/projects2/backups/disk.info
extract
This will take a while. You will receive the root shell prompt
("#") when it has completed.
5) Make the device files for the disk to be used for the restore (e.g.
rz3 in our case):
MAKEDEV rz3
6) Now repartition the disk to be used for the restore:
cd uno/projects2/backups/disk.info (to access disk information)
disklabel -r -R -t advfs rz3 disklabel.protofile.alpha2.rz0 rz28
Note that the sample backup script saves the disk prototype files
by doing a "disklabel -r" for each disk and saving it to a file
with the naming convention:
disklabel.protofile.HOSTNAME.DISKDEV
where:
HOSTNAME -- is the name of the system
DISKDEV -- is the disk device name for this prototype file.
7) Make the new root file domain and fileset:
mkfdmn -r /dev/rz3a root_domain
mkfset root_domain root
(You may get a 'No group "operator", using gid 0 for quota
files' message at this point. This is normal.)
8) Make a mount directory and mount the root_domain:
mkdir /new_root
mount -t advfs root_domain#root /new_root
9) Rewind the tape, change to the new root directory (for good
measure), and restore the root file system:
mt -f /dev/nrmt0h rewind
cd /new_root
vrestore -f /dev/nrmt0h -x -D /new_root
You will receive the root shell prompt ("#") when the restore of
the root partition has completed.
10) Since we are changing root disks in our example, update the
/etc/fstab entry for the swap area, update the file domain
information, change the swapdefault device and make a copy of the
"mt" program for use in subsequent restores:
cd /new_root/etc
mv fstab fstab.old
cp -p fstab.old fstab
ed fstab
/0b
s/0b/3b/
w
cat fstab (to check it visually)
mv fdmns fdmns.old
cd /etc
tar cBf - fdmns | (cd /new_root/etc; tar xvBpf -)
cd /new_root/sbin
mv swapdefault swapdefault.old
ln -s ../dev/rz3b swapdefault
cp -p /kit/isl/mt /new_root/sbin/mt
11) Shutdown the system and reboot using the new root partition:
cd /
umount /new_root
halt
After a little while and a few messages, the PROM monitor should
give you the prompt (">>>"). Boot from the new system disk (e.g.
rz3):
b dka300
If all has gone well, you should now receive the "INIT:
SINGLE-USER MODE" message and "#" prompt. Note that the root file
system is mounted read-only at this point.
12) To restore the /usr partition, first remount the root partition
writeable:
mount -u /
Next, create the new domain, fileset, and mount them:
mkfdmn /dev/rz3g usr_domain
mkfset usr_domain usr
mount -t advfs usr_domain#usr /usr
Then restore the filesystem from tape:
mt -f /dev/rmt0h rewind
mt -f /dev/nrmt0h fsf 1
cd /usr
vrestore -f /dev/nrmt0h -x -D /usr
You will receive the root shell prompt ("#") when the restore of
the /usr partition has completed. Now you should be able to
remove the special copy of the "mt" program that you made earlier:
rm /sbin/mt
13) To restore the /var partition, create the new domain, fileset,
and mount them:
mkfdmn /dev/rz3h var_domain
mkfset var_domain var
mount -t advfs var_domain#var /var
Then restore the filesystem from tape:
mt -f /dev/rmt0h rewind
mt -f /dev/nrmt0h fsf 2
cd /var
vrestore -f /dev/nrmt0h -x -D /var
You will receive the root shell prompt ("#") when the restore of
the /var partition has completed.
14) Now you can copy in any existing domains whose disk partitions
exist already, e.g.:
cd /etc/fdmns.old
tar cBf - users_domain | (cd /etc/fdmns;tar xvBpf -)
15) Shutdown, followed by a reboot as normal:
shutdown -h now
. . .
(In our example, since you have changed root disks, you may want
to do a "set bootdef_dev dka300" to change the default boot disk.)
RECOVERING RESTORED ADVFS FILESYSTEM PARTITIONS
If you should run into problems while restoring the filesystem
partitions and need to boot up the system from CD to recover, you can
try connecting any successfully restored filesystems to the CD booted
OS building the file domains and file sets by hand, e.g. in the case
of the root file system:
mkdir /etc/fdmns
mkdir root_domain
ln -s /dev/rz3a /etc/fdmns/root_domain/rz3a
(see additional note in following paragraph)
mkdir /new_root
mount -t advfs root_domain#root /new_root
We have observed this to work in the case where we needed to recover a
copy of the "mt" program for use in restoring the /usr partition. If
the above doesn't work, you can try a "mkfset root_domain root"
following the symbolic link step above prior to making a temporary
directory for mounting the filesystem. In this case, you will see
lots of error messages following the mkfset.
-----End of Restore.procedures-----
Received on Thu Nov 09 1995 - 02:39:48 NZDT