From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <96078609810329.tru64-unix-managers.marc@archive.invalid> From: Matt Mc Namara Date: Wed, 12 Mar 1997 16:51:46 +0000 To: tru64-unix-managers Subject: SUMMARY Creating New Disk Image X-MARC-Message: https://marc.info/?l=tru64-unix-managers&m=96078609810329 Here is a summary of the responses that I got. All are very useful, I used the dd, being it was a utility that i've used many times in the past. The only thing I found, was that I needed to do a disklabel -z /dev/rrz5c before I started the dd. Thank you to all! Alan Rollow writes... The probably failed because the disk drivers make the label read-only. Since it is the first sector of the disk, it fail immediately. If you're going to copy with dd(1) do it before you label the disk. The disadvantage of using dd(1) is that it copies every sector, whether it is used by the file systems or not. It also copies the page/swap space, which doesn't anything useful on it for a copy. Still, if you use a good block size for the copy and the file systems are full enough, dd(1) can be faster than backing up each individual file system. Not using a block size will default to one sector, which will make dd(1) horribly slow. Using a bad block size means you miss data at the end of the disk. Use a reasonably large factor of the capacity. Don't use track or cylinder sizes, unless you *know* these are a multiple of the capacity. To copy the file systems you: 1. Create the corresponding file system on the new device: # newfs /dev/rrz5a or: # mkfdmn /dev/rz5a new_root # mkfset new_root root 2. Mount it: # mount /dev/rz5a /mnt or: # mount -t advfs new_root#root /mnt 3. Copy the data using dump/restore of vdump/vrestore: # dump 0f - / | ( cd /mnt ; restore rf - ) On V4.0 you need the dump patches that fix dumping to a pipe. 4. Unmount the file system and repeat for the next one. If your file systems are AdvFS, check the documentation to if they suggest an alternate procedure for backing up the file systems. Ruben Azzopardi writes... eg for the /usr filesystme mount /dev/rz5g /mnt vdump -0 -f - /usr | (cd /mnt; vrestore -x -f -) you must do this for each filesystem/ disk partition Also if you want the disk to be bootable, when creating the disklabel specify the filesystem type, eg. disklabel -rw -t advfs rz5 John Zawada writes... dd if=/dev/rrz2c of=/dev/rrz1c bs=64k conv=noerror,synch