Subject: Re: adding disk space
To: Guy Santiglia <fredfl2@guy.chonju21.net>
From: Frederick Bruckman <fb@enteract.com>
List: port-mac68k
Date: 07/17/1999 02:42:56
On Sat, 17 Jul 1999, Guy Santiglia wrote:

> I want to mount /usr/pkgsrc on this partion and I don't want to screw this
> up like I did with my var partion.  What would you do next to get 
> /usr/pkgsrc over on to the new partion /dev/sd1g and of course change
> the name of /usr/test to /usr/pkgsrc?  Does anyone have any tips?

cd /usr/pkgsrc; pax -r -w -pe -v * /usr/test/
umount /usr/test; fsck -f /usr/test
cat /etc/fstab | sed "s/test/pkgsrc/" >/etc/fstab~; \
  mv /etc/fstab~ /etc/fstab
rm -r /usr/pkgsrc; mkdir /usr/pkgsrc; mount /usr/pkgsrc

or (safer)

cd /; tar --exclude work -cvf - /usr/pkgsrc | gzip -9 -c - > \
  pkgsrc.tar.gz
umount /usr/test
cat /etc/fstab | sed "s/test/pkgsrc/" >/etc/fstab~
mv /etc/fstab~ /etc/fstab
rm -r /usr/pkgsrc; mkdir /usr/pkgsrc; mount /usr/pkgsrc
tar -xzvpf pkgsrc.tar.gz
umount /usr/pkgsrc; fsck -f /usr/pkgsrc; mount /usr/pkgsrc

The variations are endless. Caveat Lector! Don't run any commands
unless you understand what they do.