December 30, 20241 yr Hi everyone, Maybe I'm daft, but I'm not able to set zstd-5 compression on my zpool, or the datasets contained within the zpool. I run "zfs set compression=zstd-5 mypool" and it runs without error. I then run "zfs get compression" and it shows "zstd-5" After reboot, I get a mixed bag. I've seen "zfs get compression" return "on", and "off" seemingly without a repeatable pattern. I checked and Unraid 6.12.14 is running > version 2 of zfs, so zstd-5 should be supported. zfs -V zfs-2.1.15-1 zfs-kmod-2.1.15-1 What am I missing here? Thanks everyone, Cal. Edited December 30, 20241 yr by calvados
December 30, 20241 yr Community Expert ? need pool name. But yes this compression is possible. Usually done with the zfs master plugin at the main screen when making a data set. commands zfs set compression=zstd-5 mypool zfs set compression=zstd-5 mypool/dataset Check Dataset-Level Compression If your pool contains datasets, ensure they are inheriting or explicitly set to zstd-5: zfs get compression mypool zfs get compression mypool/dataset Persist the Setting Across Reboots ZFS should persist settings automatically, but to confirm, verify your /etc/zfs/zpool.cache file is being updated correctly (this is typically handled automatically by ZFS). Ensure this cache file exists and is not corrupted: ls -l /etc/zfs/zpool.cache Other troubleshooting as if i recal correctly, I think this needs done at creation... Troubleshooting zstd-5 Resetting to on or off: Unsupported Compression Level: Even though ZFS 2.1+ supports zstd-5, some distributions might have limited support or restrictions in their builds. Run this command to check available compression options: zfs get all | grep compression modinfo zfs otherwise you may need a go file / first array start script to set the compression. Edited December 30, 20241 yr by bmartino1 Data - typo
December 30, 20241 yr Author 7 minutes ago, bmartino1 said: But yes this compression is possible. Usually done with the zfs master plugin at the main screen when making a data set. Where do you see this page? I'm not seeing it. I have ZFS master installed, and I see the following: I got here by hitting "Add Pool" (below). I didn't see any options under ZFS Master to create a new pool, so I did it via command line. zpool create -O casesensitivity=insensitive -m /mnt/ur2pool ur2pool raidz1 ata-HUH721212ALE601_8DJ2S4ZH ata-HUH721212ALE601_8HKS73MY ata-HUH721212ALE601_AAGAX74H ata-HUH721212ALE601_AAGHK6WH zfs set compression=zstd-5 ur2pool zfs set atime=off ur2pool zfs create ur2pool/hotBackup The zpool then showed up under ZFS Master: What am I missing? Thanks again @bmartino1, Cal.
December 30, 20241 yr Community Expert under the main tab. its a plugin review: Edited December 30, 20241 yr by bmartino1 data
December 30, 20241 yr Author Ahh thanks again @bmartino1. I'll delete the dataset I created via terminal, then recreate it via the GUI. I only see the basic zstd, but no option to set zstd-5. Is there a way to set zstd-5? Edited December 30, 20241 yr by calvados
December 30, 20241 yr Community Expert so the compression is zstd the quota is 5 MiB per the zfs plugin to set that option. you may also need to set each disk in the unraid web ui for the zfs pool for compression on: then in the dataset creation: its been a while.
December 30, 20241 yr Author 3 minutes ago, bmartino1 said: so the compression is zstd the quota is 5 MiB per the zfs plugin to set that option. you may also need to set each disk in the unraid web ui for the zfs pool for compression on: then in the dataset creation: its been a while. Getting closer. I followed these steps and now I'm getting: zfs get compression NAME PROPERTY VALUE SOURCE ur2pool compression on local ur2pool/hotBackup compression zstd local Any other thought as to how can I get zstd-5 or another zstd-# compression? Thanks again @bmartino1, Cal.
December 30, 20241 yr Community Expert Solution at this step I think this is when you run the terminal commands for zfs set compression=zstd-5 mypool zfs set compression=zstd-5 mypool/dataset I honestly don't remember as I went though this with chatgpt/AI and others in the past. that may be better asked here. if running betat 7 rc2 i do know that pool needs to be upgraded. zpool status zpool upgrade mypool
December 30, 20241 yr Author 9 minutes ago, bmartino1 said: at this step I think this is when you run the terminal commands for zfs set compression=zstd-5 mypool zfs set compression=zstd-5 mypool/dataset I honestly don't remember as I went though this with chatgpt/AI and others in the past. that may be better asked here. if running betat 7 rc2 i do know that pool needs to be upgraded. zpool status zpool upgrade mypool Thanks again @bmartino1. Setting the compression again after reboot, then rebooting again has me at the closest point yet, that is probably good enough. Ideally I'd have the same zstd-5 at the pool level, but I guess this will work. zfs get compression NAME PROPERTY VALUE SOURCE ur2pool compression on local ur2pool/hotBackup compression zstd-5 local
December 30, 20241 yr Author 2 hours ago, bmartino1 said: Persist the Setting Across Reboots ZFS should persist settings automatically, but to confirm, verify your /etc/zfs/zpool.cache file is being updated correctly (this is typically handled automatically by ZFS). Ensure this cache file exists and is not corrupted: ls -l /etc/zfs/zpool.cache Other troubleshooting as if i recal correctly, I think this needs done at creation... Troubleshooting zstd-5 Resetting to on or off: Unsupported Compression Level: Even though ZFS 2.1+ supports zstd-5, some distributions might have limited support or restrictions in their builds. Run this command to check available compression options: zfs get all | grep compression modinfo zfs otherwise you may need a go file / first array start script to set the compression. Looks like I overlooked this part of your post. I checked the zpool.cache file and it does exist, and looks like it has a timestamp that means it's been updated this eve. When I Nano it, it looks like a binary file that I cannot read. Is there something I should be doing to ensure it's not corrupted, and that is being updated correctly as you note? On the second part, I ran "zfs get all | grep compression" and I see: zfs get all | grep compression ur2pool compression off local ur2pool/hotBackup compression zstd-5 local When I run "modinfo zfs" I get a few pages of text. Changing the command to be "modinfo zfs | grep comp" gets me: modinfo zfs | grep comp parm: zio_slow_io_ms:Max I/O completion time (milliseconds) before marking it as slow (int) parm: zfs_sync_pass_dont_compress:Don't compress starting in this pass (int) parm: zfs_rebuild_scrub_enabled:Automatically scrub after sequential resilver completes (int) parm: zfs_compressed_arc_enabled:Disable compressed arc buffers (int) If I try grep zstd, or grep lz4 I get no results. Is there something specific I should be verifying or looking for here? EDIT: Can you explain what you mean by "otherwise you may need a go file / first array start script to set the compression."? EDIT2: I placed "zfs set compression=zstd-5 ur2pool" into my go file, but it had no impact: zfs get compression NAME PROPERTY VALUE SOURCE ur2pool compression on local ur2pool/hotBackup compression zstd-5 local Thanks again @bmartino1, Cal. Edited December 30, 20241 yr by calvados
December 30, 20241 yr Author Turns out this value "5" should not be set, as it is the quota for the dataset:
December 30, 20241 yr Community Expert 4 hours ago, calvados said: Turns out this value "5" should not be set, as it is the quota for the dataset: Thanks, Its been awhile, I didn't think that was right as trying to set a compression level. as there were issues in the past with improting a zfspool from truenas to set some settings there that are hard to do on unraid. ZFS Basic Terminal Commands for compression https://www.unixtutorial.org/zfs-basics-enable-or-disable-compression/ in terms of the zfs.cache file if time is updated its fine. it's a more check if exist to confirm changes... the pool compression is more or less contorted via unraids web ui. per your output, the datasets compression is leve5 zstd as you may need to run the set compression levels via a user script at first array start. The go file is to early in the boot processes. this is why that failed.. So install and use the user script plugin. Edited December 30, 20241 yr by bmartino1 Data - Typo
December 30, 20241 yr Author Thank again @bmartino1. I'll give this a try and let you know how it goes.
December 30, 20241 yr Community Expert fyi unriad uses openzfs for its zfs stack adn disk management. Due to kernel 6 and other software stack. opezfs isn't at lattest kernel 6 Some feature may not be avable until openzfs supports that kerneal. example. Similar with known issues in the release not on v7 rc1 not sure, but beta may have some things disabled. https://docs.unraid.net/unraid-os/release-notes/7.0.0/#known-issues thought I'd share. As this compression level should be working...
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.