r/zfs

▲ 80 r/zfs+3 crossposts

>Integrated by Design
Why the Best Systems Are the Ones You Don't Notice

FreeBSD, from philosophy to practice.

https://vivianvoss.net/print/integrated-by-design

From Integrated by Design — Launch Day (23rd April):

>… Five months of writing. Three weeks of final proofs. Then the last 72 hours, dedicated entirely to problems one does not anticipate. In the interest of transparency, and in the hope that it spares somebody else a week of the same, here are the four of them. …

https://news.ycombinator.com/item?id=47928554 – please note the author's comments.

Vivian Voss — System Architect & Software Developer

https://www.linkedin.com/in/vvoss/

u/grahamperrin — 1 day ago
▲ 2 r/zfs

Help on boot (Read text, it hás details)

My first time building a homelab, using:

- Machine: HP Proliant ML310e G8 (2013)

- OS: Gentoo (OpenRC)

- Initramfs generator: Ugrd (Loading the ZFS module)

- Bootloader: Limine

- Partition layout: GPT + BIOS (Machine doesnt have UEFI)

- Boot partition: In a SD card

- zpool config: 4 3TB SAS disks in RAIDZ1 using device names (/dev/sdx)

- Disks: disks uses 512byte sectors, used ashift=9 (following the Handbook)

So, i installed the system following the Gentoo Handbook, they have a specific entry related to ZFS. Only thing done different is by being a RAIDZ1 pool

And when booting, the system isnt importing the pools (zfs import and mount services are enable and in the sysinit level)

At the moment from what i searched and tracked from the files

Some possibilities to fix (gonna try tomorrow)

  1. Generate zfs.cache in /etc/zfs. It doesnt exist, and from what i understood from the zfs-import service in the init.d. Its needed?

  2. Delay the service startup by 30 seconds using sleep. Saw some people doing that for HDDs that take some time to spin

  3. Change the zpool disks, from device names (/dev/sdx) to device IDs (ata-xxxxxxxxx...) (Arch Wiki has a warning)

I dont know if they will work, since im gonna try tomorrow after i arrive from work

Forgot to say that to mount the disks in the live CD, i can only import the pools by generating a hostid with the same one from when it was created for the first time.

so, first zgenhostid -f xxxxxxxx then zpool import -N -R mount pool. then mount with zfs mount

If someone have more ideas, i appreciate that and leave in the comments

u/I7sReact_Return — 2 days ago
▲ 25 r/zfs

Upgraded to U26.04 and you're missing /dev/disk/by-id links?

I just upgraded a couple of my fileservers as a test, and `sg3-utils-udev` stopped working! Suddenly all my physical devices were wwn-* or scsi-35* instead of their proper names.

It appears to be a regression. I spotted this Ubuntu bug which seems to be the closest to the cause, and posted a simple fix on it.

Put this in /etc/udev/rules.d/00-scsi-sg3_config.rules

ACTION!="add|change", GOTO="scsi_identify_end"
SUBSYSTEMS=="scsi", GOTO="scsi_identify"
GOTO="scsi_identify_end"
LABEL="scsi_identify"
ENV{ID_SCSI_INQUIRY}="0"
ENV{.SCSI_SYMLINK_SRC}="TLVS"
LABEL="scsi_identify_end"

Then udevadm control -R and udevadm trigger and you'll have all your device links back.

You then have to do the mildly annoying fix of

cd /dev/disk/by-id
rm -f wwn* scsi-35* nvme-eui*
zpool export -a
zpool import -d /dev/disk/by-id -a
zpool status

That should re-import all your zpools with the correctly named volumes.

u/xrobau — 3 days ago
▲ 10 r/zfs+1 crossposts

Help with errors in storage pool

Obligatory "I'm still fairly new to this", but hoping to get some help. I have a raidz1 pool with 3x8 TB drives in it. One of them went bad due to a brief power outage (running a UPS with it now) and so I replaced it. However, I now have some permanent errors in the pool and don't know how best to deal with them. Best I can tell, the three up top look like log files, but I'm not sure. The ones in the "truenas_catalog" folder look like app files, but I don't even have those installed. Is there something I'm missing?

Edit because I forgot to add:

I also see increasing numbers of checksum errors on all my drives. Same amount across each one. I had them connected through an HBA card with a breakout cable, so I swapped the cable. Errors still come. I reseated the card, still errors. I pulled the card out and plugged them into the onboard sata ports, but I am still getting errors. The drives themselves are in good shape. Two are new, one is less than a year old. Could this be related to the errors in the pool?

Thanks to any who read and comment.

u/onelargeracoon — 5 days ago
▲ 5 r/zfs

In-place migration to /home on ZFS: dangerous but ultimately beautiful

Background

After setting up a syncoid backup on my main zpool, I realized rsyncing my desktop to a zpool is janky and horrible. Instead of reinstalling Void with zfsbootmenu, I decided to do it in-place; /home already has backups, so worst consequence is I reinstall anyway.

File-level backups give me the heebie-jeebies. Several years ago I trusted Deja-Dup/Duplicity, and it couldn't handle the sheer size of my backup when I needed a full restore. rsync is leagues better but still an extremely slow, potentially imperfect copy that can fail.

Here's what I did:


  • Original state: 80 GiB / and 300 GiB /home on a single 1 TB ext4 partition

  • Boot into hrmpf and install ZFS to the livecd environment

  • Shrink the ext4; e2fsck; create a full-size partition for a single-vdev pool with -o mountpoint=none and a /home dataset with -o mountpoint=/home

  • Mount the / partition to e.g. /mnt/root

  • rsync -aHAXP --numeric-ids /mnt/root/home/ /home/

  • (ideally verify transfer); rm -rf /mnt/root/home

  • umount /mnt/root

  • Shrink the ext4 to file size + buffer; 150 GiB in my case; e2fsck

  • Make a third partition; zpool add

  • Create child datasets with syncoid:no-sync=true for cache/junk files

  • Chroot into /mnt/root to ensure ZFS is installed (don't have 30 old kernels like me or it'll take hours!), and to add zpool import -a and zfs mount -a to rc.local or whatever systemd uses.

  • Set and verify UID/perms on all the mountpoints


Results

It was quite a slow and dangerous operation, and there was one instance of metadata corruption after the second shrink, which e2fsck fixed. Also nearly fat-fingered the new partition overtop the others. However, it worked out in the end. Striping across the two vdevs should be safe because they're partitions on the same NVMe anyways. If I did reinstall, the transfer still would've taken at least 12 hours because AT&T Fiber LAN is limited to 10/100.


Killer App: syncoid

If you haven't tried syncoid (which comes with sanoid), you should. It's a fancy script wrapper around zfs send | zfs receive. By default, it replicates a dataset (+ child datasets with -r) to a dataset on another pool along with snapshots; by default it creates a temporary snapshot to synchronize and resume interrupted transfers.

The big advantage is that I can create exact copies of my pools without any configuration, and use the same command in reverse to restore the pool if necessary. It does NOT copy pool attributes because that would interfere with the target dataset's needed attributes.

In my case, my workstation can now run

syncoid pool/home glados:slab/home-backup

In turn, GLaDOS has an @hourly crontab to run

syncoid -r slab backup/slab

When you need to recover a pool/dataset, simply zfs destroy pool/home if necessary and run syncoid in reverse

syncoid glados:slab/home-backup pool/home

reddit.com
u/Dakota-Batterlation — 6 days ago
▲ 0 r/zfs+1 crossposts

Am I cooked?

Kind of in disbelief right now, can yall let me know? am i fully cooked? any way to rescue the pool? If not, someone might give me some insights on why this happened or what even happened exactly? Logs and Problem summary below. Thanks for everyone looking into this issue.

The Pool in question is named 'Speznas'. After using the NAS and therefor the pool, i woke up to the message on my screen seen above. Rebooted - issue persisted. Tried manually importing the pool via zpool - no success. Pool is stated as online as well as the 2 HDDs within. Ran SMART Test on both - no issues found. Tried manually importing again - no success. Tried rolling back to the last successful transaction - no success "device in use / busy". That's when I tried force importing - no success. Something somehow seems to have severly corrupted the pools metadata at 07:00am Eastern causing the pool to go offline. That's my current state.

---

root@truenas[~]# zpool import
  pool: Speznas
    id: 4904614166775644449
 state: ONLINE
action: The pool can be imported using its name or numeric identifier.
config:

        Speznas                                 ONLINE
          74fcf1fd-9e85-455f-8ff0-21f8e5f02621  ONLINE
          1caf2f6c-4a41-49a0-819a-a05e9ba0b9e1  ONLINE
root@truenas[~]# 

Welcome to TrueNAS
truenas_admin@truenas[~]$ sudo -i
[sudo] password for truenas_admin: 
root@truenas[~]# zpool status -v Speznas
cannot open 'Speznas': no such pool
root@truenas[~]# zpool status           
  pool: boot-pool
 state: ONLINE
  scan: scrub repaired 0B in 00:00:08 with 0 errors on Mon Aug  3 03:45:10 2026
config:

        NAME         STATE     READ WRITE CKSUM
        boot-pool    ONLINE       0     0     0
          nvme1n1p3  ONLINE       0     0     0

errors: No known data errors

  pool: nvme-pool
 state: ONLINE
  scan: scrub repaired 0B in 00:00:40 with 0 errors on Sun Jul 12 00:00:41 2026
config:

        NAME                                    STATE     READ WRITE CKSUM
        nvme-pool                               ONLINE       0     0     0
          1a27d877-087d-4dad-9810-19a4972e6a5b  ONLINE       0     0     0

errors: No known data errors
root@truenas[~]# zpool import -f -F Speznas
cannot import 'Speznas': I/O error
        Destroy and re-create the pool from
        a backup source.
root@truenas[~]# zpool import -f -F -X Speznas
cannot import 'Speznas': one or more devices is currently unavailable
root@truenas[~]# dmesg -T | grep -iE "ata|sata|reset|error|drop" | tail -n 20
[Sat Aug  8 17:00:36 2026] ata1: SATA link up 6.0 Gbps (SStatus 133 SControl 300)
[Sat Aug  8 17:00:36 2026] ata2: SATA link up 6.0 Gbps (SStatus 133 SControl 300)
[Sat Aug  8 17:00:36 2026] ata2.00: ATA-11: ST20000NM007D-3DJ103, SN06, max UDMA/133
[Sat Aug  8 17:00:36 2026] ata1.00: ATA-11: ST20000NE000-3G5101, EN01, max UDMA/133
[Sat Aug  8 17:00:36 2026] ata1.00: 39063650304 sectors, multi 16: LBA48 NCQ (depth 32), AA
[Sat Aug  8 17:00:36 2026] ata2.00: 39063650304 sectors, multi 16: LBA48 NCQ (depth 32), AA
[Sat Aug  8 17:00:36 2026] ata1.00: Features: DIPM NCQ-sndrcv
[Sat Aug  8 17:00:36 2026] ata2.00: Features: DIPM NCQ-sndrcv
[Sat Aug  8 17:00:36 2026] ata1.00: configured for UDMA/133
[Sat Aug  8 17:00:36 2026] ata2.00: configured for UDMA/133
[Sat Aug  8 17:00:36 2026] scsi 0:0:0:0: Direct-Access     ATA      ST20000NE000-3G5 EN01 PQ: 0 ANSI: 5
[Sat Aug  8 17:00:36 2026] scsi 1:0:0:0: Direct-Access     ATA      ST20000NM007D-3D SN06 PQ: 0 ANSI: 5
[Sat Aug  8 17:00:39 2026] systemd[1]: systemd-hwdb-update.service - Rebuild Hardware Database was skipped because of an unmet condition check (ConditionNeedsUpdate=/etc).
[Sat Aug  8 17:00:40 2026] Error: Driver 'pcspkr' is already registered, aborting...
[Sat Aug  8 17:01:16 2026]  prefetch_dnode_metadata+0x11b/0x130 [zfs]
[Sat Aug  8 17:01:16 2026]  ? traverse_prefetch_metadata+0x130/0x170 [zfs]
[Sat Aug  8 17:01:16 2026]  spa_ld_verify_pool_data+0x28/0x60 [zfs]
[Sat Aug  8 17:01:16 2026]  ? __do_sys_newfstatat+0x4a/0x80
[Sat Aug  8 17:01:48 2026] ioatdma: Intel(R) QuickData Technology Driver 5.00
[Sat Aug  8 17:02:01 2026] nvme nvme0: using unchecked data buffer
root@truenas[~]# zdb -l /dev/sda
failed to unpack label 0
failed to unpack label 1
failed to unpack label 2
failed to unpack label 3
root@truenas[~]# zdb -l /dev/sdb
failed to unpack label 0
failed to unpack label 1
failed to unpack label 2
failed to unpack label 3
root@truenas[~]# 

root@truenas[~]# dmesg | grep -iE "sata|ata|nvme|error|i/o" | tail -n 20
[    1.838732] ata1.00: 39063650304 sectors, multi 16: LBA48 NCQ (depth 32), AA
[    1.842202] ata1.00: Features: DIPM NCQ-sndrcv
[    1.883271] ata1.00: configured for UDMA/133
[    1.892350] ata2.00: 39063650304 sectors, multi 16: LBA48 NCQ (depth 32), AA
[    1.895162] ata2.00: Features: DIPM NCQ-sndrcv
[    1.918782] scsi 0:0:0:0: Direct-Access     ATA      ST20000NE000-3G5 EN01 PQ: 0 ANSI: 5
[    1.936964] ata2.00: configured for UDMA/133
[    1.972118] scsi 1:0:0:0: Direct-Access     ATA      ST20000NM007D-3D SN06 PQ: 0 ANSI: 5
[    1.986177] sd 0:0:0:0: [sda] Preferred minimum I/O size 4096 bytes
[    1.986370] sd 1:0:0:0: [sdb] Preferred minimum I/O size 4096 bytes
[    4.612132] systemd[1]: Starting modprobe@nvme_fabrics.service - Load Kernel Module nvme_fabrics...
[    4.658302] systemd[1]: modprobe@nvme_fabrics.service: Deactivated successfully.
[    4.658445] systemd[1]: Finished modprobe@nvme_fabrics.service - Load Kernel Module nvme_fabrics.
[    4.672116] systemd[1]: systemd-hwdb-update.service - Rebuild Hardware Database was skipped because of an unmet condition check (ConditionNeedsUpdate=/etc).
[    5.108436] Error: Driver 'pcspkr' is already registered, aborting...
[   42.872043]  prefetch_dnode_metadata+0x11b/0x130 [zfs]
[   42.873608]  ? traverse_prefetch_metadata+0x130/0x170 [zfs]
[   42.877663]  spa_ld_verify_pool_data+0x28/0x60 [zfs]
[   71.479932] ioatdma: Intel(R) QuickData Technology Driver 5.00
[   81.344659] nvme nvme0: using unchecked data buffer
root@truenas[~]# 
u/West-Beautiful1249 — 8 days ago
▲ 0 r/zfs

Permission denied

Im trying to get it working

Im at this point in the guide

By default ZFS kernel modules are loaded upon detecting a pool. To always load the modules at boot:

echo zfs > /etc/modules-load.d/zfs.conf
By default ZFS kernel modules are loaded upon detecting a pool.
To always load the modules at boot:
echo zfs > /etc/modules-load.d/zfs.conf

I dissabled secure boot to get the previous step to work, this is my input:

~$ sudo echo zfs > /etc/modules-load.d/zfs.conf
-bash: /etc/modules-load.d/zfs.conf: Permission denied

openzfs.github.io
u/curzman — 7 days ago
▲ 7 r/zfs

Requesting guidance on replacing a failing drive

Hello. I'm not too knowledgeable on ZFS as my use case is relatively straightforward. I have 3 18TB drives in raidz1. I recently setup Scrutiny and noticed one of the drives is failing. 'zpool status' still looks fine, no issues there. But I'd rather not wait for the drive to fail completely. Thankfully the drive is still under warranty, and I have already begun an RMA. However, my concern is over the process of actually replacing the drive. I've been searching online and the more I look the more unsure I am about the process.
Is it better to get the new drive first, and connect that to my server while the failing drive is also still connected? And then do 'zpool replace'? Or should I do 'zpool offline' for the failing drive and remove it before I get the new one? I have 4 SATA ports on my motherboard so connecting the new one with the other 3 wouldn't be an issue.
For the failed drive, should I be concerned about privacy? I only have TV shows and movies on the array, but I'd still rather the vendor not be able to look at the data. What's generally recommended here? If it's recommended to wipe the drive, how should I do that? I'd rather not wipe it while it's still connected to the server.
Thanks.
Edit - well the vendor already got back to me and send they're not able to ship a new drive until the old one is returned. In that case I guess my only option is to 'zpool offline' and then 'zpool replace' correct?

reddit.com
u/b3ararms — 9 days ago
▲ 8 r/zfs

Dell PowerVault ME5 and ZFS?

So I have 2 severs with a PowerVault ME5 each. Both servers are in different locations, so no FC connection between both ME5212s.

My idea was to use ZFS as filesystem to be able to use ZFS replication over ethernet for specific datasets.

Now the ME5 itself has builtin raid functionallity I have to use.
So I will have one big disk represented to my servers each backed by a hardware raid.

My main features I want to use is replication of datasets / subvolumes over ethernet and the possibility to enable compression to some subvolumes.

Should I give ZFS a chance in this setting or better go for BTRFS in this case?

reddit.com
u/Flat-One-7577 — 9 days ago
▲ 10 r/zfs

Is there a recommended maximum utilization for an individual vdev in a striped mirror pool?

Should I consider 80% on mirror-0 a concern even though the overall pool is only 32% full? And would there be a meaningful performance/reliability disadvantage (fragmentation on mirror0?) to a situation such as:

mirror-0: 90–100% used
mirror-1: 10–20% used

while the overall pool still has plenty of free space?

I'm particularly interested to know if there is a "vdev-level utilization threshold" that you guys recommend for striped mirrors, as opposed to the usual "keep the pool below 80%" advice.

The workload is mostly cold/immutable data, but new data is continuously added over time.

reddit.com
u/BluePulasky1 — 12 days ago
▲ 9 r/zfs

ZFS root or only home on ubuntu?

I'm installing ubuntu 26.04.01 end of month with ZFS.

AI is leaning towards only putting /home and other such parts on ZFS and having the boot stuff on ext4 [even ext4 preferred to btrfs].

Would you agree?

reddit.com
u/stvaccount — 12 days ago
▲ 0 r/zfs

tricky zfs situation, little help?

this file server has been sitting for a few years since I let TrueNas try to migrate from bsd to linux and the pool got broken. went back to BSD version, so it's TrueNAS bsd 13.1 now. there may have also been some additional bungling.

[root@micro /tmp]# zpool import    pool: cargo      id: 16478687762405515984   state: UNAVAIL status: The pool was last accessed by another system.  action: The pool cannot be imported due to damaged devices or data.    see: https://openzfs.github.io/openzfs-docs/msg/ZFS-8000-EY  config: cargo                                                      UNAVAIL  insufficient replicas   mirror-0                                                 UNAVAIL  insufficient replicas     disk/by-partuuid/d0e0014d-59c7-11ea-9d20-3cecef102d24  UNAVAIL  cannot open     1005513936371914804                                    OFFLINE   mirror-1                                                 DEGRADED     16411949616967839104                                   OFFLINE     ada0                                                   ONLINE

There is a bad label. I find the issue a bit overwhelming and today I engaged with gemini pro AI to help, and it did some exploration and recommended a low level disk write to fix the issue. I stopped short of writing the disk

If anyone's game to help me out with this I'd appreciate if you looked over the diagnostic process I did with the AI and let me know if you think the solution it produced is well supported.

here is the chat:

https://share.gemini.google/6OJMBfe434MF

and here is the output of those last commands:

------------------------------------

LABEL 0

------------------------------------

version: 5000

name: 'cargo'

state: 0

txg: 28352142

pool_guid: 16478687762405515984

errata: 0

hostid: 808464432

hostname: 'micro'

top_guid: 11704010057385088391

guid: 1005513936371914804

vdev_children: 2

vdev_tree:

type: 'mirror'

id: 0

guid: 11704010057385088391

metaslab_array: 38

metaslab_shift: 34

ashift: 12

asize: 5999022833664

is_log: 0

create_txg: 4

children[0]:

type: 'disk'

id: 0

guid: 17375504288854665353

path: '/dev/disk/by-partuuid/d0e0014d-59c7-11ea-9d20-3cecef102d24'

phys_path: 'id1,enc@n3061686369656d30/type@0/slot@4/elmdesc@Slot_03/p2'

vdev_enc_sysfs_path: '/sys/class/enclosure/6:0:0:0/Slot 03'

DTL: 410

create_txg: 4

children[1]:

type: 'disk'

id: 1

guid: 1005513936371914804

path: '/dev/disk/by-partuuid/31953669-59f2-11ea-9d20-3cecef102d24'

phys_path: 'id1,enc@n3061686369656d30/type@0/slot@3/elmdesc@Slot_02/p2'

vdev_enc_sysfs_path: '/sys/class/enclosure/6:0:0:0/Slot 02'

DTL: 442

create_txg: 4

features_for_read:

com.delphix:hole_birth

com.delphix:embedded_data

labels = 0 1 2 3 

reddit.com
u/Ok-Ganache1023 — 13 days ago
▲ 3 r/zfs

OpenZFS on Linux

I'm looking at installing GhostBSD along side Linux. Linux is using BTRFS for its root partition and I have a subvolume for data that I'd like GhostBSD to have access to. BTRFS isn't going to work for BSD so I'm thinking of moving just the data volume to ZFS. How sensitive is Linux these days to updates with kernel changes and compatibility with OpenZFS? Should I just create an EXT4 volume for the share between them rather than ZFS?

reddit.com
u/mlcarson — 13 days ago
▲ 24 r/zfs

Free OpenZFS Webinar: Build a Strong Foundation in ZFS

Hey r/ZFS! We’re the team at 45Drives, and we’re hosting a free educational webinar on Wednesday, August 12, covering the fundamentals of OpenZFS.

If you’re new to ZFS, looking to strengthen your understanding, or just want a refresher, our Educational Team will walk through:

  • RAID types and storage pools
  • How ZFS combines a volume manager and file system
  • The ZFS storage hierarchy
  • Managing ZFS through the 45Drives Houston UI
  • Live Q&A with our technical team

📅 Wednesday, August 12, 2026
🕒 3:00–4:00 PM ADT

Register for the free webinar:
https://attendee.gotowebinar.com/register/88845394642749791

reddit.com
u/45drives — 13 days ago
▲ 6 r/zfs

metaslabs and spacemaps

Making inroads into ZFS recently reading what I can get my hands on, but still pretty new.

I have an experimental OpenZFS zpool with a single HDD as sole vdev. It so happens, I have to return the drive for book-keeping reasons. The pool is early days and every metaslab 126 or larger shows up in zdb -mmmm as

    metaslab    126   offset  1f800000000   spacemap      0   free      16G
                      segments          1   maxsize     16G   freepct  100%
    In-memory histogram:
                     34:      1 *
    Flush data:
    unflushed txg=0

Now, I could just leave the drive be and call it a day, encryption being enabled from the get-go. But since I'm learning about ZFS I was wondering: Could I zero out the device up to the aforementioned offset 1f800000000 and all data would be gone? Instead of going through it all.

reddit.com
u/sepen_ — 14 days ago