Partitioning and ZFS pool layout considerations when installing FreeBSD on large-capacity 3.5-inch SAS drives

Hi everyone,

I am preparing a fresh FreeBSD installation on a storage-focused machine and wanted to get a sanity check on disk layout, boot behavior, and ZFS pool alignment before committing data to the array.

One specific point I want to ask about here is whether people prefer keeping the root OS installation on a separate small boot mirror while leaving large-capacity bulk drives strictly dedicated to a data zpool, or if installing Root-on-ZFS directly onto large enterprise drives has worked out cleanly for you across major release upgrades. With modern drive capacities climbing well past the multi-terabyte mark, an early layout decision during bsdinstall tends to stick around for years, and reshaping a pool later is rarely fun once terabytes of files are sitting on it.

In my own experience setting up and testing storage hardware—including 12TB 7.2K RPM 3.5-inch SAS 12Gbps hard drives—proper sector alignment (ashift=12), HBA pass-through (IT mode) visibility during early boot, and predictable device enumeration (da0, da1, etc. versus GPT labels) make a huge difference when you later run freebsd-update or replace a drive. In my own builds, using explicit GPT labels from day one and keeping the OS footprint cleanly separated from the main bulk storage pool has saved me plenty of second-guessing during kernel upgrades and controller swaps. At the same time, I know plenty of folks run single-pool Root-on-ZFS setups with boot environments and swear by how clean bectl rollbacks are when updating.

For those of you installing FreeBSD on systems with large 12Gbps SAS drives and HBAs, do you isolate the OS onto dedicated boot media, or do you put Root-on-ZFS directly on the big storage drives and rely on boot environments for upgrades?
 
people prefer keeping the root OS installation on a separate small boot mirror
I like doing this because the larger drives I set up will have encryption (either GELI or ZFS).

At least with the boot device I know the system will get to an ssh prompt without needing BMC access for entering encryption passphrases.

Plus I've got an easy-to-access OS "platform" for investigating any issues with the main storage - won't need rescue media or anything like that.

But sure there are many ways to do this.
 
I want to ask about here is whether people prefer keeping the root OS installation on a separate small boot mirror while leaving large-capacity bulk drives strictly dedicated to a data zpool, or if installing Root-on-ZFS directly onto large enterprise drives has worked out cleanly for you across major release upgrades.
I would recommend to add a small extra drive for boot, swap, and system, and keep the large drives in a separated pool of its own for the data you want to store.
Chosing a fast 128G or perhaps even 256G drive was by far way more than enough. My small headless (no X/Wayland, DE/WM) NAS uses less than 11G disk space plus 8G swap, so even a 32G drive could be enough.
This way: easier, less complicated, less trouble, no partitioning, more benefits, since the pool and machine/system are independent from each other.
 
Unless the idiot controller has size restrictions for boot in its BIOS there is no reason to partition.
One thing mandatorily to be needed to consider:
If an extra drive for boot purpose only is NOT prepared, partitioning for ESP (in cases of UEFI) or freebsd-boot (in cases GPT scheme on legacy BIOS) is needed to be partitioned, so ZFS pool(s) is/are needed to be in partition(s), too.

Another optional thing to be considered would be:
Drives (regardless SSD or spinning rust) stating the same capacity are NOT always have exactly same capacity, depending on models, manufacturers and at worst the lot it is manufactured could cause differences.
So researching possible minimum capacity and partitioning with the size could help when all spare drives purchased at the same time in same manufacturer, model and lot are consumed. You can partition it in same size with others already running to replace (approaching to be) dead drive(s).
 
This way: easier, less complicated, less trouble, no partitioning, more benefits, since the pool and machine/system are independent from each other.

The problem with that is that the flash device provides hardy any performance improvement beyond speeding up the boot time. L2ARC is better value for money IMO and a failed L2ARC wont stop you booting.

People cite the risk of losing data when upgrading software in a single pool, but it seems to me that the chief risk there is in reinstalling with the installer; for those of us who never do that, the risk is very low.
 
whether people prefer keeping the root OS installation on a separate small boot mirror while leaving large-capacity bulk drives strictly dedicated to a data zpool,
yes. this is the way to go for storage servers - keep the user data separated from the OS.
Use a pair of small SSD/NVMe for the OS and the whole spinning rust disks for the storage pool and add mirrored "special" devices also on SSD/NVMe if that pool needs to serve e.g. network file shares that require somewhat reasonable IOPS.
As for disk naming: *always* use labels as the raw device names can always change. IMHO a good naming convention includes the last few digits of a drives serial number, so there is a direct correlation between the name and whan can be physically found on the disk (e.g. to double-check when replacing a failed disk).


Using a distinct storage pool also makes it trivial to transfer a pool to another server e.g. in case of hardware failure or upgrade/migration - you can prepare the new machine with a new installation (or from backup/via snapshots from the old server) and after verifying everything works, move the user data by physically moving the disks during your maintenance window.
 
yes. this is the way to go for storage servers - keep the user data separated from the OS.

I can see two reason for separating data and OS. One is where you have multiple OSs on the boot disk, the other is where the OS is updated with images files. In the case where the OS is updated with pkg, freebsd-update etc, what do you see as the advantage?
 
Back
Top