[comp.unix.ultrix] How to restore to a bigger disk on Ultrix?

alan@shodha.enet.dec.com ( Alan's Home for Wayward Notes File.) (01/21/91)

In article <72740@bu.edu.bu.edu>, jdubb@bucsf.bu.edu (jay dubb) writes:
> I am posting this for a frend of mine, who doesn't have access to
> USENET, so please respond directly to mlevin@jade.tufts.edu.
>
	I'll try.  I'll also post since it might be of general
	interest.
 
>     I have the following weird problem. I have a MicroVax II/RC, with
> a 130 MB hard drive, on which I installed (off another node in a
> network) Ultrix 4.0, and a few optional load sets. I then took the Vax
> home, and discovered that I need a bigger drive. Is there any way for me
> to make a full backup or dump of everything I have on the small disk
> now onto the TK50 tape, then install the big disk, and restore all the
> software onto it?  

	1.  First choice - If you can get both disks on the system
	at the same time, just dump from one to the other across a 
	pipe.  Use newfs to build a file system on the A partition
	of the bigger disk and repeat for each file system.

	Shutdown to single user, unmount everthing and for each
	file system (assuming unit 1 is the new disk):

		# mount /dev/ra1a /mnt
		# dump 0f - / | ( cd /mnt ; restore rf - )
		# umount /mnt

	Replace the '/' with the name of each file system in turn and
	adjust the name of the special device being mounted.

	2.  2nd choice - Shutdown to single user, unmount all the
	file systems and backup them up to tape.  Swap disks then
	boot the standalone system (you'll need the distribution
	on TK50), build a root file system and restore it.  Read
	closely the manual page for mkfs(8) since this is all you
	have.  Some hints:

		Show a preference for using a file system size of
		32768.  

		I don't think mkfs(8) will give you a partition on
		the disk.  It uses the default one in the driver,
		but you may want to put on the disk:

			chpt -a /dev/rra1a

		mkfs(8) doesn't give you a boot block.  Use dd(1)
		to put the file bootblks somewhere in the first 8KB
		the disk:

			dd if=bootblks of=/dev/rra1a bs=8k conv=sync

		Make sure the unit number of the new disk is the same
		as the old one.

	3.  Once you have the root file system restored you can boot
	from it and use newfs(8) to build file systems for /usr.

> Or, wll it get all confused because the disk size
> won't match what it used to be when the operating system was built
> (max partition sizes as given by df, etc.)? 

	Careful use of the mkfs(8) will take care any problem this
	might cause.

>     And, one last question: am I right in assuming that making the
> swap space larger will improve my system performance? 

	Depends.  You either have enough page/swap space or you
	don't.  If you have enough and you have only one there
	aren't many things you can do to get better performance
	out of it.  One the other hand if you have two disks
	splitting the page/swap evenly between the two, might
	provide better performance than one big one, if you're
	paging and swapping.  You might want to experiment with
	"swapfrag" in the configuration file to see if raising
	it makes a difference.

	Of course, try getting more memory first.  The fastest
	page operation is one that doesn't happen.

> If so (DECWrite
> takes ages on some of my bigger documents...), how do I set the size?
> The system never seemed to ask me how big I want it to be during the
> build.

	Left to itself the installation uses the B partition for
	page/swap.  On the typical RD disk you have three partitions:

		A - Root file system.
		B - page/swap
		G - /usr

>    Thanks in advance for the help. 
> 
> 					Mike Levin (mlevin@jade.tufts.edu)
-- 
Alan Rollow				alan@nabeth.cxn.dec.com