Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

ZFS compression on, but disk usage is same?!

Featured Replies

Hi,

 

i have turned on ZFS compression on a new array with 1 3tb hdd without parity disk. After turning on, I copied about 2,5 tb data from another identical 3tb disk (unassigned, xfs, without compression)

 

When looking on the compression rate, its abaou 1.7. But when looking on the disk usage, its exactly the same for the zfs disk in the array and the xfs disk unassigned.

 

In my expectation the used disk space should differ in relation to the compression rate. Whats wrong? :)

Edited by nicx

  • Community Expert
25 minutes ago, nicx said:

When looking on the compression rate, its abaou 1.7. But when looking on the disk usage, its exactly the same for the zfs disk in the array and the xfs disk unassigned.

That doesn't make much sense, are you sure there isn't any other data on the disk?

 

Post the output of:

 

zfs get all <pool name>/<dataset> | grep compress

and

zfs list -t all

 

  • Author

here it comes:

 

root@nas:~# zfs get all disk1/backup | grep compress
disk1/backup  compressratio         1.63x                  -
disk1/backup  compression           on                     inherited from disk1
disk1/backup  refcompressratio      1.63x                  -
root@nas:~# 
root@nas:~# zfs list -t all
NAME            USED  AVAIL     REFER  MOUNTPOINT
cache           545G   377G      248K  /mnt/cache
cache/appdata  70.8G   377G     70.8G  /mnt/cache/appdata
cache/domains  56.3G   377G     56.3G  /mnt/cache/domains
cache/icloud    378G   377G      378G  /mnt/cache/icloud
cache/isos     14.3G   377G     14.3G  /mnt/cache/isos
cache/share    1.97G   377G     1.97G  /mnt/cache/share
cache/system   23.7G   377G     23.7G  /mnt/cache/system
disk1          2.30T   341G      184K  /mnt/disk1
disk1/backup   2.30T   341G     2.30T  /mnt/disk1/backup
root@nas:~# 

 

and yes, there is no other data on the disk:

 

root@nas:~# ls -la /mnt/disk1/
total 17
drwxrwxrwx  3 nobody users   3 Feb 23 04:40 ./
drwxr-xr-x 10 root   root  200 Feb 22 13:46 ../
drwxrwxrwx  5 nobody users   5 Feb 22 19:50 backup/
root@nas:~# 
root@nas:~# 

Edited by nicx

  • Community Expert

Can't explain that, but something must be going on.

  • Author

oh shit... I think I found my mistake by myself: I copied the data via the webgui of unraid (Dynamic File Manager). The source data includes a lot of symlinks. I think all symlinks are now "real data" and no more just links. That is why the data is now a lot bigger on the destination disk. Funny coincidence that the compressed data has an identical size as the source uncompressed data with symlinks :D

 

Edited by nicx

  • Author

ok, next question: how should I copy the data preserving the symlinks? and because its a lot of data, how to do it in a way that the process survives even. when quitting the ssh shell for example?

  • Community Expert
15 minutes ago, nicx said:

ok, next question: how should I copy the data preserving the symlinks?

Sorry, can't help with that, never used them.

  • Author

ok just in case someone encounters the same "problem", I now use a user script and run it in the background:

 

rsync -av /mnt/disks/backup/* /mnt/user/backup/

 

seems to work so far as expected.

  • 8 months later...

Hi, What approach did you take to enable the compression, is there a UI option, or did you drop to the CLI?

  • Community Expert
2 hours ago, johner said:

What approach did you take to enable the compression, is there a UI option

You can enable it in the GUI, click on the pool:

 

image.png

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.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.