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.

Unraid 7.0.1 - zfs datasets not spread accross disks on creation of a share after reboot or restart of the array.

Featured Replies

Hi guys,

when creating a zfs share for the first time on a main array as zfs encrypted single disks it will create all datasets named after the share correctly spreaded over all disks (disk1/share, disk2/share etc.). Once the array is restarted only disk1/share remains active. somehow all the others are lost.

 

I think there is a bug in unraids logic of handling shares, since the share is not a folder of the main disk but its own dataset that needs to be created first to spread data across all shares with the buildin mergefs.

After mounting it via NFS share it will only show the space of "disk1". When creating all datasets manually after this it will properly show space.

Do you think that could be fixed in a future release? At the moment it wont affect me since creation is only done once.

 

The current approach one dataset per share is okay instead using the main dataset and just creating a subfolder as share folder.


Version: Unraid 7.0.1
 

How to reproduce:

zfs encrypted single disk array with >= 2 disks (with or without parity disks). creating a share named "share" . Probably same issue on not encrypted.

Create share named "share" "select all disks or leave all".

login to shell and see if datasets of the share name are created by using zfs list or df.

Stop array or reboot and start it again. Only Disk1 remains active dataset for the share.

 

~# zfs list
NAME           USED  AVAIL  REFER  MOUNTPOINT
cache          840K  1.76T    96K  /mnt/cache
disk1         26.5G  16.2T    96K  /mnt/disk1
disk1/share   26.5G  16.2T  26.5G  /mnt/disk1/share
disk2         1.21M  16.2T    96K  /mnt/disk2
disk2         1.07M  16.2T    96K  /mnt/disk2
disk3         1.04M  16.2T    96K  /mnt/disk3
disk4         1.07M  16.2T    96K  /mnt/disk4

 

Expected result:

Each disk gets its own sub dataset named after the share.

~# zfs list
NAME           USED  AVAIL  REFER  MOUNTPOINT
disk1         26.5G  16.2T    96K  /mnt/disk1
disk1/share   26.5G  16.2T  26.5G  /mnt/disk1/share
disk2         1.21M  16.2T    96K  /mnt/disk2
disk2/share     96K  16.2T    96K  /mnt/disk2/share
disk3         1.24M  16.2T    96K  /mnt/disk3
disk3/share     96K  16.2T    96K  /mnt/disk3/share
disk4         1.23M  16.2T    96K  /mnt/disk4
disk4/share     96K  16.2T    96K  /mnt/disk4/share

 

How to fix temporarily:
Login to shell, replace number of disks {1..[Nr. of Disks]}

~# for i in {1..4}; do zfs create -o compression=on disk$i/share && echo "Created dataset 'share' with compression on disk$i" || echo "Error creating dataset on disk$i"; done

It fixed my share and space issue.

thanks!

  • Community Expert
7 hours ago, senpai88 said:

when creating a zfs share for the first time on a main array as zfs encrypted single disks it will create all datasets named after the share correctly spreaded over all disks (disk1/share, disk2/share etc.).

This should not happen, it will only create the dataset on the first disk the share is going to, it will create on the other ones once it starts writing to them according to the allocation mode for that share.

  • Author

Hi,

 

I see. I set allocation mode to auto split at first try then it was done once I watched it in the shell (now i have set it to manual), so maybe it was removed because of that?

In my opinion when using ZFS on arrays unraid should create the "share" datasets on all drives I selected no matter which mode of distribution I select and keep them (unless share is deleted).

 

Since a dataset isn't a folder but more like a root directory of a new filesystem, from there on the distribution method should be relevant, top level would be "/mnt/disk<x>/share" and not "/mnt/disk<x>". I hope I got that part right, since XFS doesn't have filesystems inside subfolders.


Sadly ZFS is not really well supported on unraid array/pool side yet, so I have to rely on the shell scripts I wrote, there could also be more bugs or bad design choices inside the GUI, but I haven't looked into that yet.

(e.g. snapshots, native encryption usage instead cryptsetup (keyfiles), deduplication, checksum/bitrot detection, L2ARC, log, zfs send).

 

Lets hope ZFS will get pushed more in the future and maybe one day it might be the default filesystem of choice. 

When I look back to ReiserFS or XFS it is on the same level as ext4 no real benefits and btrfs is not production ready yet and probably will never be.


I only bought unraid because of the parity method it uses and that I can power off single hdds. With my big zfs pools before spindown wasn't possible and I can still keep some benefits of single zfs pools and datasets.

 

I am a more a professional user working via CLI only (un-get, fish shell, vim installed),
so it is not an issue for me, I just want to help to improve the product on the GUI/System side.

 

thanks!

  • Community Expert
28 minutes ago, senpai88 said:

In my opinion when using ZFS on arrays unraid should create the "share" datasets on all drives I selected no matter which mode of distribution I select and keep them

Can you explain why this matters? They will still be created as needed when the share spans more than one disk, and after it creates the dataset, it will remain there.

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.