using zfs for poudriere

Shane Ambler FreeBSD at ShaneWare.Biz
Wed Sep 26 02:34:32 UTC 2018


On 25/9/18 3:27 pm, Matthias Apitz wrote:
> 
> Hello,
> 
> I do use for some years a zpool for poudriere(8) ports building. I just

> But I have to say, that I really don't know how poudriere makes use of
> it because I have never worked, a part of this poudriere usage, with
> ZFS.

When you start a build in poudriere, a jail is setup to perform the
build, dependant packages are installed and the desired port/s are built.

Using zfs snapshots, every file created during a build can be removed
with a quick rollback, using UFS, each file needs to be deleted, which
also leaves room for leaving something behind, a snapshot can be rolled
back to the exact state each time.

> Can someone pleas explain me *what* do I see with the commands below?
> For me the mountpoints (when I use 'ls') always look somewhat empty, but
> when poudriere is running (see below) it creates a lot of things there.

Poudriere uses zfs features a lot, so you get a zfs for each jail, this
lets it quickly delete all files for a jail. As poudriere is running it
uses mounts for each jail as well as shared fs like ports tree and
distfiles, you also get a zfs for working and installed files, this lets
the same jail be used and cleaned up with a rollback between building
each port.

> And one additional question: Can I store some own data below /poudriere
> (because I'm running out of space in my UFS /dev/da0 partition) without
> disturbing poudriere in its work?
> 

Yes you can use the space in your pool, I would say most people run
poudriere on the same pool that runs their whole system.

Create a new zfs to hold your data, set the mountpoint to where you want
it.

zfs create -o mountpoint=/home/me/zdata poudriere/mydata

if you then zfs create poudriere/mydata/videos
it will mount as /home/me/zdata/videos unless you specify a new
mountpoint.


-- 
FreeBSD - the place to B...Software Developing

Shane Ambler



More information about the freebsd-questions mailing list