Solved Remaking ZFS dataset structure on living system

I ordered new VDS with FreeBSD and the default template installs the following ZFS structure
Code:
NAME  USED  AVAIL  REFER  MOUNTPOINT
zroot  800M  1.74T  24.0K  none
zroot/ROOT  800M  1.74T  24.0K  none
zroot/ROOT/default  800M  1.74T  800M  /
zroot/tmp  24.0K  1.74T  24.0K  /tmp

I want to populate a more common dataset structure, similar to this guide: https://wiki.freebsd.org/RootOnZFS/GPTZFSBoot/9.0-RELEASE on a live system.

This means that the system would stay without /usr and /var for a short period of time (I'm thinking to use tar for this) Will FreeBSD allow me to temporarily drop these directories and stay operational? (This is a 10.1 without any userland software).
 
The directories are there anyway, even if they're not on a separate filesystem. So there shouldn't be any problems with this. If you do want to change it it's best to do this from single user mode or booting from a live CD. You can create the filesystems, mount them on a temporary place, copy the files, clean the 'old' directories and mount the filesystem at the correct place. It's going to be tricky but it's definitely possible to do.
 
I made this on a live system. Just make sure that you extracted a copy of the directories before you drop /var and /usr, as tar sits there, and reboot to get your /var/run back.
 
Back
Top