From 580ef19a73ec77e52cbc74f456c307e4faa7a1b5 Mon Sep 17 00:00:00 2001 From: cyteen Date: Tue, 17 Mar 2026 11:11:45 +0000 Subject: [PATCH] Simplify `create bpool` and create rpool/DATA for docker-volumes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ✅ Add -o autotrim=on: Enables continuous TRIM support for SSDs, improving long-term performance. -O recordsize=128K: Ensures boot filesystem stays within GRUB's block size limit (critical when using large_blocks). 🔁 Remove Individual -o feature@...=enabled lines: Since compatibility=grub2 automatically enables them, listing them is redundant. --- blend_helpers | 46 +++++++++++++++++++++------------------------- 1 file changed, 21 insertions(+), 25 deletions(-) diff --git a/blend_helpers b/blend_helpers index a5f60b7..612a652 100644 --- a/blend_helpers +++ b/blend_helpers @@ -488,31 +488,21 @@ image_format_partitions_zfs() { act "create the zfs boot pool" #zpool create -f -m none \ - zpool create -f \ - -o cachefile=${zpool_cache_dir}/zpool.cache \ - -o ashift=${ashift} -d \ - -o feature@async_destroy=enabled \ - -o feature@bookmarks=enabled \ - -o feature@embedded_data=enabled \ - -o feature@empty_bpobj=enabled \ - -o feature@enabled_txg=enabled \ - -o feature@extensible_dataset=enabled \ - -o feature@filesystem_limits=enabled \ - -o feature@hole_birth=enabled \ - -o feature@large_blocks=enabled \ - -o feature@lz4_compress=enabled \ - -o feature@spacemap_histogram=enabled \ - -o feature@zpool_checkpoint=enabled \ - -O acltype=posixacl \ - -O canmount=off \ - -O compression=lz4 \ - -O devices=off \ - -O normalization=formD \ - -O relatime=on \ - -O xattr=sa \ - -O mountpoint=legacy -o altroot=${strapdir} \ - ${bpool_name} ${raid} /dev/disk/by-id/${disk_name}-part${boot_part_number} /dev/disk/by-id/${mirror_disk}-part${boot_part_number} - + zpool create -f \ + -o cachefile=${zpool_cache_dir}/zpool.cache \ + -o ashift=${ashift} \ + -o autotrim=on \ + -o compatibility=grub2 \ + -O acltype=posixacl \ + -O canmount=off \ + -O compression=lz4 \ + -O devices=off \ + -O normalization=formD \ + -O relatime=on \ + -O xattr=sa \ + -O mountpoint=legacy -o altroot=${strapdir} \ + -O recordsize=128K \ + ${bpool_name} ${raid} /dev/disk/by-id/${disk_name}-part${boot_part_number} /dev/disk/by-id/${mirror_disk}-part${boot_part_number} act "create the zfs root pool" @@ -545,6 +535,7 @@ image_format_partitions_zfs() { notice "zfs system installation" act "create filesystem datasets to act as containers" zfs create -o canmount=off -o mountpoint=none ${rpool_name}/ROOT + zfs create -o canmount=off -o mountpoint=none ${rpool_name}/DATA zfs create -o canmount=off -o mountpoint=none ${bpool_name}/BOOT act "create filesystem datasets for the root and boot filesystems" @@ -600,11 +591,16 @@ image_format_partitions_zfs() { -o com.sun:auto-snapshot=false \ ${rpool_name}/var/cache + # Split docker data from images zfs create \ -o mountpoint=/var/lib/docker \ -o com.sun:autosnapshot=false \ ${rpool_name}/docker + zfs create \ + -o mountpoint=/var/lib/docker/volumes \ + ${rpool_name}/DATA/docker-volumes + zfs create -o mountpoint=/var/log ${rpool_name}/var/log zfs create -o mountpoint=/var/snap ${rpool_name}/var/snap zfs create -o mountpoint=/var/spool ${rpool_name}/var/spool