reorganizing partitions

Robin Smith rasmith at
Tue Aug 23 19:33:33 GMT 2005

In 4.11, I currently have a vinum volume mounted as /usr, with /usr/src
and /usr/ports also on separate partitions (so these are just mount points
on the actual /usr partition).  /usr/src and /usr/ports are currently each
given half a G, which is quite wasteful in the case of /usr/src (this didn't
really belong on its own partition).  However, I'd rather have things set
up so that the system can get up and running even without the vinum
drive.  So, I want to take the existing /usr/src, put everything in /usr on
it except for /usr/ports, /usr/local, and /usr/home, and mount it as /usr;
move the contents of /usr/local to the top level on the current /usr (i.e. the
vinum drive); remount the vinum drive as /usr/local; and symlink /usr/home
onto /usr/local/home (/usr/home is already on the vinum drive as /home at its
top level, so mounting it as /usr/local/ will give me /usr/local/home).

I intend to do this by the appropriate ugly mess of cp -pRP commands
and all the needed dismounting and mounting (in single-user mode,
obviously).  Apart from worries about getting all symlinks right,
are there obvious fatal objections to doing all this (rather than the
long slow way of filling up the new partitions by restoring what I
want from tape)?  

Robin Smith

More information about the freebsd-questions mailing list