copying A/UX

n paul at unisoft.UUCP
Wed Oct 12 03:01:11 AEST 1988


In article <4392 at polya.Stanford.EDU> kaufman at polya.Stanford.EDU (Marc T. Kaufman) writes:
>
>Assuming that the file system on the larger drive is mounted on /mnt   :
>
>	find /dev -depth -print | cpio -pdm /mnt
>
>works properly (when invoked from /).
>
>Marc Kaufman (kaufman at polya.stanford.edu)

	find /dev -depth -print | cpio -puldm /mnt

	If you want to keep user ids and links (there are links in /dev
	and owners are important for security) correct.

	Actually I copy volumes to LARGER volumes by:

		1)	sync
		2)	dd if=<raw input disk> of=<raw output disk> bs=500k
		3)	adb -w <output disk>
		4)	202?W <new disk size in logical blocks ie divide
				by 2 if it's a 1k file system>
		5)	^D
		6)	fsck -y <raw output disk>

	You can get away with this when copying to a smaller volume IF YOU KNOW
	THAT THE LAST PART OF THE FREE LIST IS EMPTY.

	Obviously don't try this if you are unsure of what you are doing,
	the scope for disaster is LARGE.

	If you are copying one disk to another where neither one is root
	then cpio is the way to go, you can do everything in one fell
	swoop:

		To copy /fred to /mike

		cd fred;find . -print | cpio -puldm /mike

	One last rather unrelated tip:

		to keep a file system's free block list sorted (which
		encourages all the blocks on a file to live near each
		other) every so often unmount your file systems and

			fsck -S <raw disk>

		then remount them. For the root volume go to single
		user mode then run in on the block disk ie

			fsck -S /dev/dsk/c0d0s0

		this will cause the system to reboot when it is done.

		Doing this is NOT required it just makes things run a little
		faster over the long run. It is an especially good idea to
		do BEFORE you add a large number of related files (or a small
		number of large files) that will stay on your disk for a long
		period of time.
	

	Paul
	
-- 
Paul Campbell, UniSoft Corp. 6121 Hollis, Emeryville, Ca
	E-mail:		..!{ucbvax,hoptoad}!unisoft!paul  
Nothing here represents the opinions of UniSoft or its employees (except me)
"Nuclear war doesn't prove who's Right, just who's Left" (ABC news 10/13/87)



More information about the Comp.unix.aux mailing list