On Wed, Jul 25, 2018 at 3:32 PM Jay Hart <[email protected]> wrote: > /var is a 6.3G partition (wd0e) using 50M of space > /usr is a 2.0G partition (wd0f) using 1.6G of space > > What would the recommended procedure to use to swap these two partitions?
I wouldn't swap them exactly, rather I would make a /usr/local (and perhaps other file systems as well) so that /usr doesn't need to be very large to begin with. The general procedure I would follow is: 1. boot bsd.rd 2. mount your /dev/wd0e on /mnt 3. dump /mnt to a file (or to tape if you prefer). you may first need to mount another file system to store the dumpfile. 4. unmount /mnt, use disklabel to delete the 'e' partition from wd0, then recreate it with a smaller size 5. use newfs to build an empty file system on your new smaller wd0e partition 6. mount /dev/wd0e on /mnt again and restore the contents from the dump file you made in step 3. 7. reboot your system normally. You should then have a big chunk of unused space that you can use to make one or more new file systems for things like /usr/local, etc. If you want to shrink /usr the procedure is similar, just with 'f' instead of 'e'. Consult the man pages for dump(8) and restore(8) for more information about how to use these commands. You will probably want to use dump with the -a option, and you will probably want to use restore with the -r option. -ken

