Hard Drive Issues

David Kelly dkelly at hiwaay.net
Tue Nov 7 23:44:45 UTC 2006


On Tue, Nov 07, 2006 at 04:49:08PM -0500, Richard McIntyre wrote:
> Tom Judge wrote:
> 
> I've put a new disk into the system, The current disk is 200 GB, the new 
> disk is 250 GB.
> If I run the command:
> dd if=/dev/ad2 of=/dev/ad3 conv=noerror
> 
> Will this copy the (changing the appropriate device names of course) the 
> disk as a whole? Will I lose the 50 GB difference?

Yes. Yes.

> Is there another way? (like the dump, tar, or just plain copy command?)

Yes. I would manually use /usr/bin/sysinstall to prepare the new drive
with the desired partitions, sized appropriately. Now is the time to
rethink your previous partitioning. Maybe /home should be a separate
partition? How about /var/mail? Webserver space? Etc.

Manually mount the new drive somewhere, typically /mnt is used. So your
new drive's usr filesystem will be at /mnt/usr, and root at /mnt, and
etc at /mnt/etc, and home at /mnt/home (if you use a /home partition).

Really should be running single user at this point.

Use dump to read the old drive one partition at a time piped thru stdout
into restore. Double check the following as I'm typing off the top of my
head:

# dump -0af - /    | ( cd /mnt; restore -rf - )
# dump -0af - /etc | ( cd /mnt/etc; restore -rf - )
# dump -0af - /var | ( cd /mnt/var; restore -rf - )

If you are splitting /usr/home out into /home make this symbolic link so
that restore puts /usr/home in /mnt/home, otherwise skip this command.
#ln -s ../home /mnt/usr

# dump -0af - /usr | ( cd /mnt/usr; restore -rf - )

You should get the gist of things by now. Repeat for any other
filesystem.

Edit the contents of /mnt/etc/fstab before rebooting.

-- 
David Kelly N4HHE, dkelly at HiWAAY.net
========================================================================
Whom computers would destroy, they must first drive mad.


More information about the freebsd-questions mailing list