Jump to content

ZFS plugin for unRAID


steini84

Recommended Posts

Posted
17 hours ago, cadamwil said:

I'm sure I am moronic and missing something obvious.  But how would I create a share with my ZFS arrays?

symlink on a disk?

 

or should it be

zfs set sharesmb=on POOLNAME

 

If so, I am getting


root@Tower:/mnt/SixteenMirror# zfs set sharesmb=on SixteenMirror
cannot share 'SixteenMirror: system error': smb add share failed
cannot share 'SixteenMirror/Docker: system error': smb add share failed

I have already set permissions & owner for /mnt/SixteenMirror by running the following


root@Tower:/mnt/SixteenMirror# chmod -R 775 /mnt/SixteenMirror
root@Tower:/mnt/SixteenMirror# chown -R nobody:users /mnt/SixteenMirror

 

Also of note, not shares show up at all.  So, not sure what's going on.  I did extend my trial, do you think this has anything to do with my issue?

Posted (edited)

Hey, @steini84I just noticed that I couldn't delete something from a ZFS drive and after multiple attempts decided to look at dmesg, which looked rather alarming.  I don't know if this is the latest zfs or if it's the latest beta 29 kernel.  But posting in here first as we're not likely to get much in the way of ZFS support without a strong case and testing from the unraid guys.

 

I have just recently tested my memory, which would be my first thought and it could still be of course, but because of that I'm thinking new kernel or the zfs update that came to match.

 

I repeatedly get these results by starting a rancherOS vm, with the standard linux64 template.

985337630_ScreenShot2020-10-01at5_29_13PM.thumb.png.57e9db31ffc0b578d4ef770aca6f50e5.png

 

Logs attached, I'm hoping I'm not the only one TBH.

obi-wan-diagnostics-20201001-1724.zip

Edited by Marshalleq
Posted (edited)

Well to be fair you are running a beta version of unRAID with a release candiate of ZFS so things like this are more likely with a combination like that.

 

But just a few hours ago there was a new rc for zfs and i´m building it now. Should be up in 1-2 hours  it´s online now

https://github.com/openzfs/zfs/releases/zfs-2.0.0-rc3

 

The best bet is to run this command and reboot

rm /boot/config/plugins/unRAID6-ZFS/packages/zfs*

 

Edited by steini84
The build is finished
Posted

Would it be possible to get the RC3 for 6.8.3 like you did with 6.8.2?

I'm loving zstd so far! I like the fact that you can tune its level (1-19) until your CPU is working too much to your liking.

Didn't notice any difference regarding my all SSD pool. Should I enable something to take advantage of TRIM?

  • Like 1
Posted
20 hours ago, FLiPoU said:

Would it be possible to get the RC3 for 6.8.3 like you did with 6.8.2?

I'm loving zstd so far! I like the fact that you can tune its level (1-19) until your CPU is working too much to your liking.

Didn't notice any difference regarding my all SSD pool. Should I enable something to take advantage of TRIM?

https://www.dropbox.com/s/wmzxjyzqs9b9fxz/zfs-2.0.0-rc3-unRAID-6.8.3.x86_64.tgz?dl=0
https://www.dropbox.com/s/3onv1qur26yxb7n/zfs-2.0.0-rc3-unRAID-6.8.3.x86_64.tgz.md5?dl=0

 

You turn on trim with zpool set autotrim=on POOLNAME

Then you can run  zpool trim POOLNAME regularly, maybe after a scrub . I do a scrub, then a trim every month via the user scripts plugin.

 

ref: https://github.com/openzfs/zfs/commit/1b939560be5c51deecf875af9dada9d094633bf7

Posted

Hi,

i am new on unraid (previously, i had FreeNAS).

After install ZFS Plugins (2 Plugins) i can create a "pool" with console and commands:

zpool create DATA raidz1........

to this point all ok and the "DATA" Pool are created with raid z1 and status is "online".

In zfs list shows me, the DATA.

 

Now i wont to create in this pool "DATA" any Datasets (in FreeNAS speak). In this "Datasets" (folders) i need various access authorizations (ACL).

Here is my problem, i don´t know, how..

Gives there an manual?

with "chmod 777 /DATA" i have full access, but not with ACL (name and password) and not for selected folders...

 

Thanks a lot, and sry. english is not my main language.

Greetings from germany...

Posted
Hi,

i am new on unraid (previously, i had FreeNAS).

After install ZFS Plugins (2 Plugins) i can create a "pool" with console and commands:

zpool create DATA raidz1........

to this point all ok and the "DATA" Pool are created with raid z1 and status is "online".

In zfs list shows me, the DATA.

 

Now i wont to create in this pool "DATA" any Datasets (in FreeNAS speak). In this "Datasets" (folders) i need various access authorizations (ACL).

Here is my problem, i don´t know, how..

Gives there an manual?

with "chmod 777 /DATA" i have full access, but not with ACL (name and password) and not for selected folders...

 

Thanks a lot, and sry. english is not my main language.

Greetings from germany...

This is where the target market of the two products you mention is slightly different. Unraid doesn’t do ACLs instead it uses share based security. Granted you could probably Jerry rig something but it’s going to be on you. By default everything is set to be nobody.users for this reason because it’s targeted at the home user as a primary market.

 

 

Sent from my iPhone using Tapatalk

Posted (edited)
11 hours ago, Marshalleq said:

This is where the target market of the two products you mention is slightly different. Unraid doesn’t do ACLs instead it uses share based security. Granted you could probably Jerry rig something but it’s going to be on you. By default everything is set to be nobody.users for this reason because it’s targeted at the home user as a primary market.

 

 

Sent from my iPhone using Tapatalk

thanks for your fast replay.

i am use my server privately, but i dont like, when anyone is in my Network and have full rights for see and open my files 😃.

Only with name and password the user (my wife, my kids), have access to the folders in the pool and can change or create anything in the folder.

This users i have create in Unraid, and under this User i see the "Share" and the security status.

So, i need to create Share folders in the ZFS raidz1 pool, where can see unraid and put them in the Share list.

Is this possible?

Or must be, all this things with acces control, do in the SMB extra configuration?

Sry. for the misunderstanding, i don´t need the function ACL, this share based security is good enough for my privat project 🙂

Hopefully it works somehow with an access for an created share folder in the zfs pool....

Thanks a lot.

 

Edit 1: i hope i have create a share folder "Fotos" with command:

zfs create DATA/Fotos -o casesensitivity=insensitive -o compression=off -o atime=off -o sync=standard

the "zfs list" command see it 🙂

 

Edit 2: OK, i think step for step i learn 😃

Now i have put in the smb extra configuration:

 

[Fotos]
path = /DATA/Fotos

writeable = yes  
write list = high-tower

create mask = 0775
directory mask = 0775

 

but i have no full access on this folder...

I hope i am on the correct way...

Edited by High-Tower
found a command for create a Folder in the pool
Posted

Make sure the folder has permissions of nobody.users.  Then set the share in smb extras like you have done with user permissions that you want.  You've left out who has access to the share.  Sorry, I would post you an example, but I'm about to leave for first day on a new job.

Posted

So, following the guide off of Level 1 techs, I am sure I have messed something up or missed a step.  I was setting up automatic snapshots, and I was able to make the install, but I don't know what command to run to install the zfs-auto-snapshots.  I honestly assumed it installed, but now I am doubting that.  I am getting a message frequently of

Oct  5 07:11:11 Beast crond[3324]: failed parsing crontab for user root: PATH="/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin"

I am also emailed 

Console and webGui login account
	
	Oct 4, 2020, 7:15 PM (14 hours ago)
/bin/sh: root: command not found

I do show as zfs-auto-snapshot* in /usr/local/sbin

Any help would be greatly appreciated.  I am not the best in Linux.

Posted (edited)
20 hours ago, Marshalleq said:

Make sure the folder has permissions of nobody.users.  Then set the share in smb extras like you have done with user permissions that you want.  You've left out who has access to the share.  Sorry, I would post you an example, but I'm about to leave for first day on a new job.

ok, i think i have it.

i have put in the console:

chmod -R 775 /DATA

chown -R nobody:users /DATA

 

the "chmod" change the access for the first default folger "/DATA". Theoretically i can change the number in 770, no "others" can see anything (first 7 is the owner, second 7 is the group and the 5 or 0 are "others).

the "chown" change the owner of the "pool" /DATA. The Owner ist "nobody" and only the "users" have the 7 (chmod) rights (7=full).

The user, where have the full access, is the write list user what i have put in the SMB extra config.

The -R stand for all folders in this pool "DATA". This means DATA/Fotos etc...

 

is this correct?

 

 

Edit1: now tested any conditions.

at first add a second person in unraid name called "wife" and a password.

now i have add the user "wife" behind high-tower in the smb extra conf.:

 

write list = high-tower,wife

 

now my wife can go to the folder... but high-tower no more....

manman... this is a heavy duty project...

gives there a trick or must be there a ; between high-tower and wife or a . ore a / .... ?

Edited by High-Tower
Posted
So, following the guide off of Level 1 techs, I am sure I have messed something up or missed a step.  I was setting up automatic snapshots, and I was able to make the install, but I don't know what command to run to install the zfs-auto-snapshots.  I honestly assumed it installed, but now I am doubting that.  I am getting a message frequently of
Oct  5 07:11:11 Beast crond[3324]: failed parsing crontab for user root: PATH="/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin"

I am also emailed 

Console and webGui login accountOct 4, 2020, 7:15 PM (14 hours ago)/bin/sh: root: command not found

I do show as zfs-auto-snapshot* in /usr/local/sbin
Any help would be greatly appreciated.  I am not the best in Linux.


I World reccomend checking out:

https://forums.unraid.net/topic/94549-sanoidsyncoid-zfs-snapshots-and-replication/

Or

https://forums.unraid.net/topic/84442-znapzend-plugin-for-unraid/


Sent from my iPhone using Tapatalk
  • Thanks 1
Posted

 

3 hours ago, High-Tower said:

ok, i think i have it.

i have put in the console:

chmod -R 775 /DATA

chown -R nobody:users /DATA

 

the "chmod" change the access for the first default folger "/DATA". Theoretically i can change the number in 770, no "others" can see anything (first 7 is the owner, second 7 is the group and the 5 or 0 are "others).

the "chown" change the owner of the "pool" /DATA. The Owner ist "nobody" and only the "users" have the 7 (chmod) rights (7=full).

The user, where have the full access, is the write list user what i have put in the SMB extra config.

The -R stand for all folders in this pool "DATA". This means DATA/Fotos etc...

 

is this correct?

 

 

Edit1: now tested any conditions.

at first add a second person in unraid name called "wife" and a password.

now i have add the user "wife" behind high-tower in the smb extra conf.:

 

write list = high-tower,wife

 

now my wife can go to the folder... but high-tower no more....

manman... this is a heavy duty project...

gives there a trick or must be there a ; between high-tower and wife or a . ore a / .... ?

Yes it sounds about right.  I don't think you will have issues like that, though I'm actually not sure what the default mode is for file permissions in unraid now that I think about it.  There is actually a plugin that fixes permissions automatically which I forgot to mention, I'm sorry I'm rushing out to work again, but it might be part of the fix common problems plugin.  Just don't run it on your dockers unless you're sure, sometimes those can be a little different I'm told - though I think that's perfectly resolvable.

 

Not sure why one is working and not the other, seems like everything is the same.  Make sure they've both got user accounts created through the gui.  Make sure they're both in the write list and you are connecting via smb.  Sorry gotta run.

Posted

Built zfs-0.8.5 for unRAID-6.8.3

 

I also built zfs-0.8.5 for unRAID-6.9.0-beta30 for those who want to try the unRAID beta but stay on the latest stable ZFS version. To install 0.8.5 on beta30 you have to run these commands and reboot:

rm /boot/config/plugins/unRAID6-ZFS/packages/zfs*
wget -P /boot/config/plugins/unRAID6-ZFS/packages/ https://github.com/Steini1984/unRAID6-ZFS/raw/master/packages/zfs-0.8.5-unRAID-6.9.0-beta30.x86_64.tgz
wget -P /boot/config/plugins/unRAID6-ZFS/packages/ https://raw.githubusercontent.com/Steini1984/unRAID6-ZFS/master/packages/zfs-0.8.5-unRAID-6.9.0-beta30.x86_64.tgz.md5

 

Posted

Hey using from a couple of weeks ZFS on unraid with gaming VM as primary desktop pc (nas + desktop pc all in one), it works fine but sometimes unraid decides to kill my VM because "out of memory" i assigned 16gb of ram to the VM and the host have 64gb of ram, I think zfs is not cleaning enough fast the arc memory when other containers reclaim memory and then kernel decides to kill my VM :(

i can fix it using hugepages but i don't like it because then its memory that ZFS can not use it when the VM is shutted down (that at the end is the 90% of the time), I tried to limit ZFS arc with echo 12884901888 >> /sys/module/zfs/parameters/zfs_arc_max but same :(

 

Posted
55 minutes ago, segator said:

Hey using from a couple of weeks ZFS on unraid with gaming VM as primary desktop pc (nas + desktop pc all in one), it works fine but sometimes unraid decides to kill my VM because "out of memory" i assigned 16gb of ram to the VM and the host have 64gb of ram, I think zfs is not cleaning enough fast the arc memory when other containers reclaim memory and then kernel decides to kill my VM :(

i can fix it using hugepages but i don't like it because then its memory that ZFS can not use it when the VM is shutted down (that at the end is the 90% of the time), I tried to limit ZFS arc with echo 12884901888 >> /sys/module/zfs/parameters/zfs_arc_max but same :(

 

can you paste the output of arcstat

Posted
5 hours ago, segator said:

 time  read  miss  miss%  dmis  dm%  pmis  pm%  mmis  mm%  size     c  avail
11:24:21     0     0      0     0    0     0    0     0    0   12G   12G   3.3G

 

Ok so the limit is working, but what about: free -g

Posted

You are using almost all of your memory. You can either use a smaller arc or add swap... maybe both

 

Adding swap:

#first create a 8gb zvol where <pool> is the name of your pool:
zfs create -V 8G -b $(getconf PAGESIZE) \
              -o primarycache=metadata \
              -o com.sun:auto-snapshot=false <pool>/swap

#then make it a swap partition
mkswap -f /dev/zvol/<pool>/swap
swapon /dev/zvol/<pool>/swap

#to make it persistent you need to add this to your go file:
swapon /dev/zvol/<pool>/swap

 

Posted

how is this possible?

i have 24gb for the VM

10GB for ARC cache

and running nextcloud with redis and mysql and some rubish dockers.

 

how can I see the real ram usage of ZFS? (arc + metadata cache + dedup.. )

I have 10.4TB on my zfs vol btw

Posted (edited)

in my case have a lot of benefits because the type of data I store on my volume.

I build code and archive all the builds so the deduplication ratio is so high as the diference between build are a couple of kb.

 

Anyway as far as I understood, teorically when linux need memory, ZFS free some memory of the arc cache, but its seems its not doing this, could be?

 

also, do you know how this parameters affect when using ZFS on unraid?

reccommended values in tip & tweak unraid plugin are:

vm.dirty_background_ratio = 2 %
vm.dirty_ratio = 3 %

 

Edited by segator

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...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...