From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <96079067215809.tru64-unix-managers.marc@archive.invalid> From: Dirk Bergl Date: Thu, 05 Aug 1999 05:29:17 +0000 To: tru64-unix-managers Subject: SUMMARY: Increasing root domain size for 4.0D Upgrade X-MARC-Message: https://marc.info/?l=tru64-unix-managers&m=96079067215809 Hi all, Sorry for the delay. The original post was: I am doing an upgrade from 4.0B to 4.0D on an Alpha 2100, but first must increase the root file system size. What is the quickest and safest way to do this. (I have a spare disk that may be used in the process for backup). The disk that has to be re-sized has on it: - root - usr - swap (1 of 3) Thanks for the many replies, among who were.... Steve Timm alan@nabeth.cxo.dec.com Paul Crittenden David Hull Rajesh A R Bevan Broun Wolf Dieter Brandt Mike D Cross Phil Farrell Yasir M. Tahir (Apologies if I left anyone out) All went well. I basically followed the guidelines from a previous post I found: http://www.ornl.gov/its/archives/mailing-lists/alpha-osf-managers/1998/0 6/msg00059.html http://www.ornl.gov/its/archives/mailing-lists/alpha-osf-managers/1998/0 6/msg00060.html The steps were: - Label spare disk, and partition. Make sure it's bootable - Create usr2 and root2 partitions on spare disk - Drop down to single user mode - Backup / and /usr to tape. - Copy / and /usr to spare disk - Boot off spare disk. - Re-label root with new partition sizes. - Copy spare disk (with / and /usr) back to newly re-sized disk - Boot as normal Some space was taken from /usr , and used for root. Before: / = 64M /usr = 3.9Gb After: / = 400M /usr = 3.5Gb (Probably overkill for root, but see sizing notes at end of doco.) Note: Both / and /usr are Advfs types. Details as follows..... 1). Use disklabel to create partitions for the spare disk. In this case, 2 partitions, one for root, and one for usr. I did this through the gui tool, it was easier. Make sure you mark the disk as bootable, as you want to be able to boot from it later on. Alternativly, use disklabel from the command line to label the spare disk: eg. disklabel -w -r -t advfs re10 swxcr (swxcr is disk type- In our case swxcr; jbod on a raid controller) You may have to edit this next, to ensure the partition sizes are acceptable for the domains you are about to create. 2) Next, create the usr2 and root2 domains on the spare disk. These will be used to backup / and usr, and we will then boot from this spare disk. mkfdmn -r /dev/re10a root2_domain mkfset root2_domain root mkdir /root2 mount root2_domain#root /root2 mkfdmn /dev/re10b usr2_domain mkfset usr2_domain usr mkdir /usr2 mount usr2_domain#usr /usr2 3) Now, shutdown to single user mode, and do two things. Backup / and /usr to tape, and then copy / and /usr to the new domains on the spare disk... (You'll probably have to re-mount /usr, /root2, and /usr2 in single user) Tape: vdump -0u -f /dev/rmt0h / vdump -0u -f /dev/rmt0h /usr Copy / and /usr to spare disk: vdump 0f - / | vrestore -xf - -D /root2 vdump 0f - /usr | vrestore -xf - -D /usr2 4) Now, you want to make it so that you can start the system off the spare disk. So edit the /etc/fstab file on /root2 (spare disk) Change the / filesystem: Change root_domain#root to root2_domain#root Change usr_domain#usr to usr2_domain#usr If there's a swap entry for the device (disk) you are going to resize, comment it out. You *might* want to stop the other file systems from comming up, depends. We chose to mount all the file systems - Figured it would be a good test to see if the spare disk booted everything as normal. One more thing. Check for the existance of the file /sbin/swapdefault. It's a link that points to the default swap area. If it effects your disk, delete this link. (Create it again when you are finished) via... ln -s /dev/rzxy /sbin/swapdefault I found that when trying to re-partition the original disk (as described shortly) the gui disk utility complained it couldn't resize partition B. It ended up being that this link was active, and stopping B from being re-sized. 5) Shutdown, and boot off the spare disk. >From the Chevron prompt... P00>> boot dka2 Hopefully the spare should boot, and the system will come up. If something go's wrong at this stage, you should hopefully just be able to re-boot as normal, and have your original system return. Do a df -k, and you should see "root2_domain" and "usr2_domain" for your / and /usr. 6) Delete the old / and /usr Now delete the old domains, so you can resize the original boot disk... rmfset root_domain root rmfdmn root_domain rmfset usr_domain usr rmfdmn usr_domain 7) Re-label the original boot disk. I did this through the gui scrren, as it was much easier. Once again, when re-sizing make sure you check the option that makes the disk bootable. If you don't have gui, you can use the disklabel command from the command line...... disklabel re1 > disklabel.re1 cp disklabel.re1 disklabel.re1.new Edit the *.new file, and change the partitions as wanted. Also check the offsets. Then , write the new disklabel?. disklabel -R -t advfs re1 disklabel.re1.new You should now have an original boot disk with new partitions. Sizing? Well I recieved a few responses. Most people suggest that 128M for root is a good size. We set the following: root - a partition - 400Mb swap - b partition - 250Mb usr - g partition - 3.4Gb 8) Re-Create the new / and /usr domains mkfdmn -r /dev/re1a root_domain mkfset root_domain root mkfdmn /dev/re1g usr_domain mkfset usr_domain usr mount root_domain#root /newroot mount usr_domain#usr /newusr 9) Copy / and /usr back to original disk Drop down to single user mode if you're not there. (Make sure /newroot and /newusr are mounted) Copy / and /usr to the original boot disk.... vdump 0f - / | vrestore -xf - -D /newroot vdump 0f - /usr | vrestore -xf - -D /newusr 10) Now, change things back so you can boot off your original disk.... Edit the /newroot/etc/fstab file so that / is back to root_domain#root and re1b is once again swap. Also , usr is once again usr_domain. 11) Boot as normal Now, shutdown, and reboot as normal. You should boot off you original boot disk, and when it comes up, usr and / should have their new sizings. If it doesn't come up, the failsafe we had was to boot off the spare, and run with this until we could fix the original disk. Then you can tidy up, like deleting root2_domain and usr2_domain. ------------------------------ Other Points: ------------------------------ SIZING FOR / >From the general replies I recieved, 128M for root was what most people suggested. ALthough Alan did tell me that although 128M was the standard, a XP1000 he'd recently recieved installed with V4.0F used 256 MB. So I admit 400M was probably overkill, but at least I won't have to worry about re-sizing root again for a while ;) Plus, I had a fair bit of disk space to play with. If free space was tighter, I probably would have made root 128M. /root Accross multiple volumes You CANNOT use multiple volumes to expand the root domain size. As Rajesh and Bevan Broun pointed out, the man pages of addvol state " AdvFS does not support a multivolume root file system. You cannot use the addvol utility to expand root_domain. " ADVfs or Not? We used Advfs for / and /usr. But as Bevan informed me, there are pro's and con's for this. More info at: http://www.ornl.gov/its/archives/mailing-lists/alpha-osf-managers/1996/1 2/msg00196.html http://www.ornl.gov/its/archives/mailing-lists/alpha-osf-managers/1999/0 5/msg00182.html Thanks again to all who provided help. Reg. Dirk.