SUMMARY restore of advfs root partition

From: Kent Frazier <frazier_at_orionb.tti.com>
Date: Tue, 19 Sep 95 14:15:08 PDT

My original request was as follows:

>We're running osf 3.0 on a system whose root file system is advfs.
>While we've had no problems so far, we've been trying to find in
>the documentation the procedure for restoring the root file system
>should we need to do so. The documentation (such as it is) seems to
>assume that the root file system is ufs. Does anyone have any pointers,
>and/or procedures for restoring an advfs root file system?

I received the following replies. There seems to be some disagreement
as to whether it can actually be done. I'll be giving some of the
suggestions a try and will let you all know the definitive answer.
Many thanks to those who responded! I hope the ones who said it
can be done are right!

>From jmaynard_at_admin5.hsc.uth.tmc.edu Mon Sep 18 14:38:43 1995
From: Jay Maynard <jmaynard_at_admin5.hsc.uth.tmc.edu>
Subject: Re: restore of advfs root file system

I looked at this issue, and can't seem to find any way to run vrestore from
the CD's maintenance mode; I don't think it's there. After researching it, I
went with a small ufs root partition and a huge advfs /usr.
-- 
>From john_at_WPI.EDU Mon Sep 18 14:38:50 1995
From: John Stoffel <john_at_WPI.EDU>
Just read the man page for vrestore.  Watch out for the /proc
filesystem, vdump has some problems dumping it.  Also, for some
strange reason vdump/vrestore won't save quota files.
>From alan_at_nabeth.cxo.dec.com Mon Sep 18 16:03:54 1995
	Not having the documentation handy for restoring a UFS root,
	I can only guess at the likely differences:
	1.  There should be an option on disklabel that will write
	    the ADVFS boot blocks instead of the UFS ones.  I think
	    it is:
		disklabel -wr -t advfs device type
	2.  Instead of using newfs to create the file system, use
	    mkfdmn and mkfset to create the domain and file set.
	3.  Use vrestore instead of restore.
>From helgi_at_ott.is Mon Sep 18 16:04:56 1995
Subject: Re: restore of advfs root file system
If we assume that your root disk crashes, the steps after you've installed a
spare disk would be:
1) Boot from the operating system CDROM.
2) Make a devices special files for the new disk, i.e.
  # cd /dev
  # ./MAKEDEV rz0
3) Make a disklabel for the new disk:
 # /sbin/disklabel -rw -t advfs rz0  RZxx
4) Make the root file domain and fileset
# /sbin/mkfdmn -r /dev/rz0a root_domain
# /sbin/mkfset root_domain root
5) Mount the root_domain
# /sbin/mkdir /new_root
# /sbin/mount root_domain#root /new_root
6) And now I expect you to have your backup tape ready for a vrestore
# /sbin/vrestore -x -D /new_root
7) Finally, shut down the system and boot from the new disk.
Regards, 
Helgi.
>From chandrasek_at_odixie.ENET.dec.com Mon Sep 18 17:45:35 1995
From: Kris Chandrasekhar _at_ALF <chandrasek_at_odixie.ENET.dec.com>
Kent,
   If you look at the Digital UNIX installation guide, chapter 7, there
   is some documentation on how to restore an AdvFS root file system.
   I have an example of how I did the restores; naturally, the device
   names for you may be different. Also, I adjusted the size of partitions
   onf the system disk; you may have no need for that.
Regards, Kris.
Restoring the root and usr file systems
At the console prompt
>>> b dkd500		(console device)
choose 3 for systems management
# cd /dev
# ./MAKEDEV rz0
# ./MAKEDEV tz11		(assuming that the TZ87 is the backup device)
# disklabel -rw -t advfs rz0 rz28d
change the size of the disk partition
# EDITOR=ed
# export EDITOR
# disklabel -e rz0
1,$p				(lists layout)
/131072			(or whatever to go to the line containing partition a)
s/131072/531072/p		(make partition a 264 MB)
/b:				(to go to line containing partition b)
s/orig-size/new-size/p		(reduce size by 400000 or 200 MB)
1,$p				(check that partitions a and b are OK)
w
q
Write new label? [y]  <CR>
#
# disklabel -r rz0		(check that rz0 partition a has 264 MB)
# mkfdmn -t advfs /dev/rz0a root_domain
(heres where the installation guide is wrong, we must use the block device, not
the raw device as the book says)
# mkfset root_domain root
# mount root_domain#root /mnt
# cd /mnt
# vrestore -xf /dev/rmt0h	(MAKEDEV tz11 should have created rmt0h)
Shut down the system
# sync				(not sure if sync are required; do it through
force of habit)
# sync
# halt
Boot system in single-user mode
>>> boot -fl 0,1,0
# mkfdmn /dev/rz1c usr_domain
# mkfset usr_domain usr
# mkdir /usr
# mount usr_domain#usr /usr
# cd /usr
# vrestore -xf /dev/nrmt0h			(first time root gets restored)
# cd /
# rmfdmn usr_domain
# mkfdmn /dev/rz1c usr_domain		(initialize it again)
# mkfset usr_domain usr
# mount usr_domain#usr /usr
# cd /usr
# vrestore -xf /dev/nrmt0h			(restore /usr)
# shutdown -h now
I am not sure whether the mt commands to skip the first backup will work in
single-user mode. Thats why I did the restore from nrmt0h two times. Ill do
some testing to skip the first backup and restore the second one directly.
>>>b
>From chuck.jones_at_citicorp.com Mon Sep 18 18:23:42 1995
Subject: Re: restore of advfs root file system
Hi Kent,
After learning the hard way I have learned from the folks at Digital, that
it is ok to have an advfs file system as long as it is not the root 
filesystem. You will probably have to do a vdump of the file system, 
convert the filesystem to ufs and do a restore.
I'm not sure as to the exact procedure but I have had to reinstall the entire 
OS from the CD after my system crashed because my root filesystem was advfs.  
The documentation is sorely lacking regarding this issue.
Chuck Jones
>From Lucien_Hercaud_at_paribas.com Tue Sep 19 04:32:59 1995
Subject: Re: restore of advfs root file system
     Hello,
     
     You will have to use the distribution CDROM, boot the system from 
     there (as for OSF/1 installation) and then choose SYS ADMIN (3).
     
     You will create the disk and tape devices in /dev.
     # cd /dev
     # ./MAKEDEV rz0 tk5
     
     Will use disklabel with the ADVfs option:
     # disklabel -wr -t advfs /dev/rrz0c RZ28
     and then:
     # mkfdmn -r /dev/rz0a root_domain
     # mkfset root_domain root
     # mount -t adfvs root_domain#root /mnt
     # cd /mnt
     # vrestore -rf /dev/nrmt0h
     
     for more information, see the /isl/install.1 shell script on the DEC 
     OSF/1 distribution CDROM.
     
     Regards
                                        Lucien HERCAUD
Received on Tue Sep 19 1995 - 23:49:31 NZST

This archive was generated by hypermail 2.4.0 : Wed Nov 08 2023 - 11:53:45 NZDT