ZFS plugin for unRAID


steini84

826 posts in this topic Last Reply

Recommended Posts

2 hours ago, vanes said:

Can I make a script with "echo 2147483648 >> /sys/module/zfs/parameters/zfs_arc_max" and run it when array start? 

No idea about what you're talking about, but you can run a script at array start via the user scripts plugin

Link to post
  • Replies 825
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Popular Posts

What is this? This plugin is a build of ZFS on Linux for unRAID 6   Installation of the plugin To install you copy the URL below into the install plugin page in your unRAID 6 web g

Built zfs-2.0.0-rc7 for unRAID-6.8.3 & 6.9.0-beta35   Great to see that unRAID is finally adding native ZFS so this might be one of the last builds from me   And yes, i´m alre

Figured it out. No need to mount through /etc/fstab.   What's missing are entries in /etc/mtab,  which are created if mounted from fstab. So a few echo into /etc/mtab is the solution. J

Posted Images

8 minutes ago, Squid said:

No idea about what you're talking about

i need to limit zfs ARC-cache size

I'm trying to do as it is written in the first post, by adding line in go file, but this doesn`t work =(

On 9/21/2015 at 2:03 AM, steini84 said:

limit the ARC to 8GB with these two lines in my go file:

 


#Adjusting ARC memory usage (limit 8GB)
echo 8589934592 >> /sys/module/zfs/parameters/zfs_arc_max
 

 

Edited by vanes
Link to post
5 minutes ago, vanes said:

I'm trying to do as it is written in the first post, by adding line in go file, but this doesn`t work =(

Probably because at the time of "go" execution, the plugin isn't loaded yet.  user scripts should do the trick

Link to post

I posted in the wrong forum earlier in the general support... I read this article  from google and it didn't help me..  but here is what a I wrote

"

I been googling  how to import the zfs  I  installed a zfs plugin  I figured just a plug and play nope 

then I read you  you type 

zpool import -f Poolname

but that did nothing file not found

 

is there exact steps to import the disks so I can copy it to the new hard drives then wipe the zfs format

like detail steps be good"

 

Link to post

I posted in the wrong forum earlier in the general support... I read this article  from google and it didn't help me..  but here is what a I wrote

"

I been googling  how to import the zfs  I  installed a zfs plugin  I figured just a plug and play nope 

then I read you  you type 

zpool import -f Poolname

but that did nothing file not found

 

is there exact steps to import the disks so I can copy it to the new hard drives then wipe the zfs format

like detail steps be good"

 



The plugin should import all zfs pools. But you could try manually: zpool import -a


Sent from my iPhone using Tapatalk
Link to post

well I restarted over reformatted my usb and reinstalled unraid..  and I re ran that plugin  but how you know its working 

I have now showing my 3  freenas drives  under unassigned devices   but I don't see a file share name to access these drives I thought I could just do add share  and point to the drives  but that isn't working..  

if it shows up  in unassigned devices  is it imported?    and how do I access them  whats the next step?

I typed in zpool import -a   but I haven't seen a change  that I can access the files  

and I got this from typing in that code

cannot import 'mediaserver': pool was previously in use from another system.
Last accessed by  (hostid=5267ccb1) at Fri Jul  6 20:11:37 2018
The pool can be imported, use 'zpool import -f' to import the pool.
cannot import 'mediadrive2': pool was previously in use from another system.
Last accessed by  (hostid=5267ccb1) at Fri Jul  6 19:58:31 2018
The pool can be imported, use 'zpool import -f' to import the pool.

 

so do I do that -f    but will that let me access the files

 

Link to post

so I ran the 

zpool import -a 

then 

zpool import -f   

like it told me to

it printed "

   pool: mediaserver
     id: 7392266675859343005
  state: ONLINE
 status: The pool was last accessed by another system.
 action: The pool can be imported using its name or numeric identifier and
        the '-f' flag.
   see: http://zfsonlinux.org/msg/ZFS-8000-EY
 config:

        mediaserver  ONLINE
          sde        ONLINE
          sdh        ONLINE

   pool: mediadrive2
     id: 11376497011458327039
  state: ONLINE
 status: The pool was last accessed by another system.
 action: The pool can be imported using its name or numeric identifier and
        the '-f' flag.
   see: http://zfsonlinux.org/msg/ZFS-8000-EY
 config:

        mediadrive2  ONLINE
          sdc        ONLINE"

 

 

but I still don't see a file folder share  of the 2 datasets 

nothing I can double click on the network share of the unraid server  I see the isos appdata etc folders but no mediadrive2 or sdc folder

how do I add those  so I can drag and drop the files to unraid

 

Link to post

I dunno  I guess  but I I cant make a unraid share  specifiying  share name "root"  file location "/"   

it doesn't allow me to set where the shares go  

so I don't know how to access it if I cant share the folder

Link to post

This is a console only plugin that does not tie into the unraid shares. If you want the data to be shared over samba you have to manually edit the samba config. You can see the mount point of the data using zfs list


Sent from my iPhone using Tapatalk

Link to post
Quote

 

ok so I tried this in the unraid terminal

zfs set sharesmb=on mediaserver

it then was trying to share all the root folders but it cant

cannot share 'mediaserver': smb add share failed
cannot share 'mediaserver/Christmas': smb add share failed
cannot share 'mediaserver/Install Programs': smb add share failed
cannot share 'mediaserver/Videos': smb add share failed
cannot share 'mediaserver/Videos/CHRISTMAS': smb add share failed
cannot share 'mediaserver/Videos/Movies': smb add share failed
cannot share 'mediaserver/Videos/TV Shows': smb add share failed
cannot share 'mediaserver/jails': smb add share failed
cannot share 'mediaserver/jails/.warden-template-pluginjail-11.0-x64': smb add share failed
cannot share 'mediaserver/jails/.warden-template-pluginjail-11.0-x64-20180308141237': smb add share failed
cannot share 'mediaserver/jails/.warden-template-pluginjail-11.0-x64-20180405114202': smb add share failed
cannot share 'mediaserver/jails/.warden-template-pluginjail-11.0-x64-20180526061450': smb add share failed
cannot share 'mediaserver/jails/.warden-template-pluginjail-11.0-x64-20180611210409': smb add share failed
cannot share 'mediaserver/jails/.warden-template-pluginjail-11.0-x64-20180612145922': smb add share failed
cannot share 'mediaserver/jails/.warden-template-pluginjail-11.0-x64-20180612151208': smb add share failed
cannot share 'mediaserver/jails/.warden-template-pluginjail-11.0-x64-20180612163655': smb add share failed
cannot share 'mediaserver/jails/.warden-template-pluginjail-11.0-x64-20180612212249': smb add share failed
cannot share 'mediaserver/jails/.warden-template-standard': smb add share failed
cannot share 'mediaserver/jails/crashplan_1': smb add share failed
cannot share 'mediaserver/jails/emby_1': smb add share failed
cannot share 'mediaserver/jails/owncloud_1': smb add share failed
cannot share 'mediaserver/jails/plexmediaserver_1': smb add share failed
cannot share 'mediaserver/jails/sickrage_1': smb add share failed
cannot share 'mediaserver/jails/transmission_1': smb add share failed

 

does this for every root folder on the mediaserver

Link to post

I found another article with using  FileZila  with SFTP  what ever SFTP  is   I connected didn't even need a port

but couldn't use my root account..

 

but I see the mediaserver folder

how come I cant see these other folders  in unraid  like disk 1 disk 2 disk 3  of my unraid

 

Link to post

@comet424 go to terminal, then type mc,  you can see your pool there if it is mounted

to see mountpoint use "zfs list" comand

root@unRaid:~# zfs list
NAME      USED  AVAIL  REFER  MOUNTPOINT
zfspool   127G   322G   127G  /mnt/zfspool

 

to add share go to Settings - SMB and add something like this to SMB Extras

[Backup]
      path = /mnt/zfspool/Backup
      comment =
      browseable = yes
      # Public
      writeable = yes
      read list = 
      write list = 
      valid users = 
      vfs objects =

this worked for me, i am new to zfs. Some days ago i created my first usb mirror pool for backups. will see how it go....

Edited by vanes
Link to post

that MC program is cool  I could see the files   I couldn't get the File Options on top  I thought ALT would do but nope

and the SMB share  in unraid I looked I cant add all those features   I cant choose a path.. heck cant even uncheck  off samba …   all I can do is add shares under shares but u cant specifiy a specific location..

unless I need to turn something on or off to get that feature

 

I tired of ZFS  when I delete files or move them... ZFS  uses more data so even though I moved say 300gig off the freenas zfs  it still increased the used data  so  it didn't minus 300gb  just kept addng up  so got fed up with that  and the crap of plex with it doesn't work right..  rsync  didn't work way I was hoping number of things

 

Link to post

 

37 minutes ago, comet424 said:

  I couldn't get the File Options on top  I thought ALT would do but nope

 

MC full features don`t work in browser. Try use ssh client like Putty

 

to share my Backup folder on my pool ( mounted /mnt/zfspool )i added

 

[Backup]
      path = /mnt/zfspool/Backup
      comment =
      browseable = yes
      # Public
      writeable = yes
      read list = 
      write list = 
      valid users = 
      vfs objects =

To Settings>SMB>SMB Extras

smb.thumb.jpg.7f0b1d13c9ba8970478f5aac9beb2646.jpg

 

Edited by vanes
Link to post
  • 2 months later...

Hey all, anything I should be aware of regarding folder permissions when using ZFS on UnRAID?

 

I've moved my docker's appdata folder from /mnt/user/docker to /zfs/docker (using the ZFS plugin to create a zpool outside my array):

root@NAS01:~# zfs list
NAME     USED  AVAIL  REFER  MOUNTPOINT
docker  20.1G   518G  20.1G  /zfs/docker

root@NAS01:~# zpool status
  pool: docker
 state: ONLINE
  scan: none requested
config:

        NAME                        STATE     READ WRITE CKSUM
        docker                      ONLINE       0     0     0
          mirror-0                  ONLINE       0     0     0
            scsi-350000393a819195c  ONLINE       0     0     0
            scsi-350000393a8195a74  ONLINE       0     0     0
          mirror-1                  ONLINE       0     0     0
            scsi-350000393b82b5d94  ONLINE       0     0     0
            scsi-350000393b82b6a2c  ONLINE       0     0     0

errors: No known data errors

 

I restored my CA Backup of my docker appdata folder, and it seem to have kept all my permissions in place:

 

root@NAS01:~# ls -ln /zfs/docker
total 4267660
drwxrwxrwx 8    0    0          19 Jul 27 16:14 Community_Applications_USB_Backup/
drwxrwxrwx 3    0    0           3 Jul 27 16:14 appdata/
drwxrwxrwx 3    0    0           7 Sep 12 00:11 1/
drwxr-xr-x 3    0    0           4 Aug  9 13:59 2/
drwxrwxrwx 3    0    0           3 Aug  8 14:51 3/
drwxrwxrwx 3    0    0           4 Jul 27 16:14 4/
-rw-rw-rw- 1   99  100 53687091200 Sep 12 11:23 docker.img
drwxr-xr-x 4  911  911           4 Jul 27 16:14 5/
drwxrwxrwx 6  911  911           6 Jul 27 16:14 6/
drwxrwxrwx 7 1000 1000          18 Sep 11 10:10 7/
drwxr-xr-x 6    0    0          15 Jul 27 16:14 8/
drwxr-xr-x 2 1000  100           3 Jul 27 16:14 9/
drwxrwxrwx 3 1000  100           6 Sep 12 03:07 10/
drwx------ 6 1000  100          10 Jul 27 16:38 11/
drwxrwxrwx 4    0    0           4 Jul 27 16:38 12/
drwxrwxrwx 7 1000  100          15 Sep 12 02:19 13/
drwxr-xr-x 2  911  911           4 Jul 27 16:38 14/
drwxrwxr-x 7 1000  100          15 Sep 12 02:36 15/
drwxr-xr-x 2 1000  100           2 Jul 27 16:39 16/
drwxrwxrwx 8 1000  100          13 Sep 12 03:07 17/
drwx------ 4    0    0           6 Jul 27 16:39 18/
drwxr-xr-x 5 1000  100          10 Jul 27 16:39 19/
drwxrwxrwx 5 1000  100           5 Jul 27 16:39 20/
drwx------ 7  911  911           7 Jul 27 16:40 21/

root@NAS01:~# ls -ln /mnt/user/docker
total 8357876
drwxrwxrwx 1    0    0         328 Jul 27 16:14 Community_Applications_USB_Backup/
drwxrwxrwx 1    0    0          20 Jul 27 16:14 appdata/
drwxrwxrwx 1    0    0         147 Sep 12 11:11 1/
drwxr-xr-x 1    0    0          47 Aug  9 13:59 2/
drwxrwxrwx 1    0    0          38 Aug  8 14:51 3/
drwxrwxrwx 1    0    0          37 Jul 27 16:14 4/
-rw-rw-rw- 1   99  100 53687091200 Sep 12 10:50 docker.img
drwxr-xr-x 1  911  911          34 Jul 27 16:14 5/
drwxrwxrwx 1  911  911          57 Jul 27 16:14 6/
drwxrwxrwx 1 1000 1000        4096 Sep 11 10:10 7/
drwxr-xr-x 1    0    0         212 Jul 27 16:14 8/
drwxr-xr-x 1 1000  100          25 Jul 27 16:14 9/
drwxrwxrwx 1 1000  100          53 Sep 12 11:23 10/
drwx------ 1 1000  100         191 Jul 27 16:38 11/
drwxrwxrwx 1    0    0          40 Jul 27 16:38 12/
drwxrwxrwx 1 1000  100         238 Sep 12 11:11 13/
drwxr-xr-x 1  911  911          44 Jul 27 16:38 14/
drwxrwxr-x 1 1000  100         232 Sep 12 11:12 15/
drwxr-xr-x 1 1000  100           6 Jul 27 16:39 16/
drwxrwxrwx 1 1000  100         208 Sep 12 11:11 17/
drwx------ 1    0    0          66 Jul 27 16:39 18/
drwxr-xr-x 1 1000  100         184 Jul 27 16:39 19/
drwxrwxrwx 1 1000  100          41 Jul 27 16:39 20/
drwx------ 1  911  911          71 Jul 27 16:40 21/

(obfuscated the folder names)

 

Yet when I move my docker volumes from /mnt/user/docker/xyz to /zfs/docker/xyz, the containers have all sorts of permissions issues writing to their config folders. For example, Plex won't start, UNMS throws permissions errors on its config folder, etc. I can't find any differences in UID/GIDs between the two docker folders, but every container I've tried so far has the same issue.

 

Any thoughts on what I'm missing?

Link to post

No dice :( set it to /mnt/docker as my ZFS mountpoint, and I still get permissions issues.

 

Here's my zpool setup and transfer of CA Backup to the new pool - maybe something I need to add/change in this? I stop docker prior to the configuration, change where my docker.img file is located in unraid settings, then start it up after the process.

 

zpool create docker -m /mnt/docker mirror scsi-350000393a819195c scsi-350000393a8195a74 mirror scsi-350000393b82b5d94 scsi-350000393b82b6a2c

zfs set compression=lz4 docker
zfs set atime=off docker

tar xzvf /mnt/user/backups/docker/2018-09-12\@03.01/CA_backup.tar.gz -C /mnt/docker/
cp /mnt/user/docker/docker.img /mnt/docker/

 

Link to post

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.