srivo said:

Code: zpool create -o altroot=/mnt -o cachefile=/var/tmp/zpool.cache zroot /dev/gpt/disk0 zpool export zroot zpool import -o altroot=/mnt -o cachefile=/var/tmp/zpool.cache zroot zpool set bootfs=zroot zroot [*]We will create the zfs pool mount on /mnt: Click to expand...

/var

/var

/usr/ports

/usr/local

/home

/var/tmp

FBSD

/usr

Code: (before the above '[I]zpool export zroot[/I]') mkdir /mnt/usr zfs create -o compression=lzjb -o setuid=off -o mountpoint=/usr/ports zroot/ports zfs create -o compression=off -o exec=off -o setuid=off zroot/ports/distfiles zfs create -o compression=off -o exec=off -o setuid=off zroot/ports/packages zfs create -o mountpoint=/usr/local zroot/local zfs create zroot/var zfs create -o exec=off -o setuid=off zroot/var/db zfs create -o compression=lzjb -o exec=on -o setuid=off zroot/var/db/pkg zfs create -o compression=on -o exec=off -o setuid=off zroot/var/mail zfs create -o compression=lzjb -o exec=off -o setuid=off zroot/var/log zfs create -o exec=off -o setuid=off zroot/var/run zfs create -o compression=lzjb -o exec=on -o setuid=off zroot/var/tmp chmod 1777 /mnt/var/tmp zfs create zroot/home zfs create zroot/tmp chmod 1777 /mnt/tmp

zroot/ports

/usr/ports

/mnt/usr/ports

/mnt

/

/usr/ports

/usr/local

/var

/home

/usr/ports

/

/usr

First a quick thanks for posting, even after one year extremely helpful. One small addition if I may..This is very good but a downside for me was that one huge ZFS filesystem can be hard to manage later; for example if you decide that you wanton a separate filesystem. Not a problem on a separate PC, it becomes an issue if you're on a VPS or a remote server (with KVM access yet no peripheral access for example).So, after I set up the main pool I wantedas well as some sub directories () to be separated.To that end I mixed directions of your tutorial with those from the mainFreeBSD manual, and added my own touch (I didn't wantto be separate), hope this can help others as well:The twist should be obvious; by pointing the mount point fortoit will still initially end up onbecauseis the root for the zroot filesystem, which sits at the top of the hierarchy. After the installation is done otoh, zroot will end up on(obviously) and thus automatically make sure that your ports filesystem also ends up on the right place ().The reason I like this so far (disclaimer: with plenty of Unix experience but little specific FreeBSD experience at the time of writing) is this separates my user data () and additional or dynamic data () from the system data (, etc.).Hope this can give others some ideas as well.