From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <96078618110312.tru64-unix-managers.marc@archive.invalid> From: Susan Rodriguez Date: Wed, 08 Oct 1997 04:08:21 +0000 To: tru64-unix-managers Subject: [SUMMARY] - booting from spare root disk X-MARC-Message: https://marc.info/?l=tru64-unix-managers&m=96078618110312 This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. ------ =_NextPart_000_01BCD365.25D49E20 Content-Type: text/plain; charset="iso-8859-1" Managers, Thanks to all who responded. This mailing list is fantastic. I have had over 10 responses in 4 hours. All were very helpful. 1 - How can I get the filesystems to mount to the spare devices? mount -u /dev/rz10a / 2 - Can't seem to lose the swap partition from the original device How to change the default swap partition: Edit rc.config PAGEFILE and PARTITION parameters and set the symlink in /sbin: ln -s /dev/rz10b swapdefault I have included the script I wrote as a result of the multitude of suggestions. It's a little rough, but covers the topic. I tested the script and successfully backed up / and /usr, replaced fstab, rc.config, and the symlink in /sbin and rebooted from the spare disk. The whole thing took about 20 minutes. I was very impressed. (A few of your responses at the end.) Kudos to: Kurt Carlson Craig Makin Ian Mortimer Karim Keshavee Tom Blinn A. Mahendra Rajah Robert McMillin Rob Hamm alan@nabeth.cxo.dec.com Jeff Beck those I've yet to receive >How can I get the filesystems to mount to the spare devices? > try (under b -fl s): # mount -u / # will mount root as writable # ed /etc/fstab # set to new device 1,$s/old/new/ w q # # or, keep a spare fstab available: # mv /etc/fstab /etc/fstab.old # mv /etc/fstab.spare /etc/fstab # # finally: # /sbin/bcheckrc # or 'init 3' >2. Can't seem to lose the swap partition from the original device. What is /sbin/swapdefault set to? If there, relink it as appropriate. If not there, there's an rc.config paramter something like PAGEFILE which can be set | reset. kurt _____________________________________________________________________ Kurt Carlson University of Alaska, ARSC snkac@java.sois.alaska.edu (907)474-5763 910 Yukon Drive #108.84 Fairbanks, AK 99775-6200 susan, to overcome your / update problem in single user mode issue a mount -u / this makes the root filesystem read/write... I do a simlar thing, the way I overcome it is to have two fstabs, one for the booted system as fstab, the other a copy pointing to the right swap for the new boot disk etc....I swap these around as part of my script that builds my other boot disk (ie. /mnt/etc for new boot disk). Also make sure you change /sbin/swapdefault to point to your new swap! Its really handy to have this as i use it as a mechanism to apply patches and upgrades, I have a get out back to the old version.... any more questions send me an email Regards Craig Makin ================================================================= Craig Makin, UNIX Systems Administrator, GE Capital IT Solutions Perth, WA Australia http://www.gecits-ap.com Ph: +61 8 9429 6405 craig.makin@gecits-ap.com ================================================================= Hi Susan > I have created a spare root disk on my Alpha 3000. I used dump -0f - / > > single-user from the spare disk brought / up as a read-only file system. > How can I get the filesystems to mount to the spare devices? When you first boot into single user do this to get the / file system mounted read-write. mount -u /dev/rz3a / Obviusly you should replace /dev/rz3a with the correct device name for your spare root partition. > 2. Can't seem to lose the swap partition from the original device. If you're running in eager swap mode you will have a link in /sbin which looks something like this: lrwxrwxrwx 1 root system 11 Jul 3 1995 swapdefault -> ../dev/rz3b You will need to set this to point to the swap partition on the spare device. Ian _/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/ _/ Ian Mortimer _/ _/ mortimer@physics.uq.edu.au ,-_|\ Department of Physics _/ _/ Tel : +61 7 3365 3436 / *\ University of Queensland _/ _/ Fax : +61 7 3365 1242 \_,-._/ St. Lucia, Brisbane _/ _/ v Queensland, Australia 4072 _/ _/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/ Disclaimer: Any opinions expressed are my own. Hi there, There is another file you will have to edit on your spare disk to move the swap: /etc/rc.config has two swap related entries, PAGEFILE="/dev/rz1b" and PARTITION="rz1b". You need to change both of these entries to say rz10b. Also look out for the swapdefault link in /sbin such as swapdefault -> ../dev/rz1b This link is used as a switch to decide which swap algorithm the system will use. If the link is there it will use immediate mode, if no link is there it will use over-commitment mode. It is probably easiest to just delete the link on your spare disk, unless the swap mode is critical for your system. See man (8) swapon for info about swap methods. Note that this link does not decide WHERE the swap partition is, it just decides which swap method to use on the swap partitions defined in fstab and rc.config. I'm not sure of the effect of pointing the link to a partition which has not been defined as a swap area. Cheers. Karim. -- ------------------------------------------------------------------------ --- Karim Keshavjee |e-mail: keshavje@cwr.uwa.edu.au Network Systems Officer |Room: G11, CWR Atrium Centre for Water Research |phone: +61 08 9380 2408 University of Western Australia |fax: +61 08 9380 1015 ------------------------------------------------------------------------ --- ------ =_NextPart_000_01BCD365.25D49E20 Content-Type: application/octet-stream; name="diskback.sh" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="diskback.sh" #!/bin/sh=0A= =0A= ###################=0A= # declare variables=0A= ###################=0A= =0A= bakrootdir=3D/backup_mounts/root; export bakrootdir=0A= bakusrdir=3D/backup_mounts/usr; export bakusrdir =0A= =0A= ###################=0A= echo " Checking for spare root and usr devices..."=0A= ###################=0A= =0A= rtdev=3D`mount | grep $bakrootdir | cut -d" " -f3`=0A= if [ -z "$rtdev" ]=0A= then=0A= echo " Backup device not mounted... exiting"=0A= exit 1=0A= fi=0A= =0A= usrdev=3D`mount | grep $bakusrdir | cut -d" " -f3`=0A= if [ -z "$usrdev" ]=0A= then=0A= echo " Backup device for /usr not mounted... exiting"=0A= exit 1=0A= fi=0A= =0A= ###################=0A= echo " backup the root filesystem..."=0A= ###################=0A= =0A= rm -rf $bakrootdir/*=0A= rm -rf $bakrootdir/.*=0A= cd /=0A= dump -0f - / | (cd $bakrootdir; restore -xf -)=0A= =0A= ###################=0A= echo " backup the usr filesystem..."=0A= ###################=0A= =0A= rm -rf $bakusrdir/*=0A= rm -rf $bakusrdir/.*=0A= cd /=0A= dump -0f - /usr | (cd $bakusrdir; restore -xf -)=0A= =0A= ###################=0A= echo " swap new fstab with original..."=0A= ###################=0A= =0A= cd $bakrootdir/etc=0A= if test -w fstab.recover=0A= then=0A= mv fstab fstab.orig=0A= cp fstab.recover fstab=0A= else=0A= echo "no fstab.recover found... exiting"=0A= exit 1=0A= fi=0A= =0A= ###################=0A= echo " swap new rc.config with original... "=0A= ###################=0A= =0A= cd $bakrootdir/etc=0A= if test -w rc.config.recover =0A= then=0A= mv rc.config rc.config.orig=0A= cp rc.config.recover rc.config=0A= else=0A= echo "no rc.config.recover found... exiting"=0A= exit 1=0A= fi=0A= =0A= ###################=0A= echo " remove symlink to swapdefault..."=0A= ###################=0A= =0A= cd $bakrootdir/sbin=0A= if test -h swapdefault=0A= then=0A= rm swapdefault=0A= else=0A= echo "no swapdefault link found... skipping symlink creation."=0A= exit 0=0A= fi=0A= =0A= ###################=0A= echo " create new symlink to swapdefault..."=0A= ###################=0A= =0A= ln -s /dev/rz10b swapdefault=0A= ------ =_NextPart_000_01BCD365.25D49E20--