Jump to content
steini84

ZFS plugin for unRAID

169 posts in this topic Last Reply

Recommended Posts

I just bought 5(400GB) Enterprise SSD's that I will attempt to setup in RAID-Z2 this week. Will keep you all posted.

Share this post


Link to post

Would you mine sharing your setup on how you compile the drivers/utils?

 

Am curious

 

Myk

 

Share this post


Link to post

Yeah will do tonight. Have to compile for unraid 6.1.7 so I'll write down the steps

Share this post


Link to post

The update is available now.

 

Here is a rough guide on how to compile it your self:

 

First off download this awesome script from gfjardim

wget https://gist.githubusercontent.com/gfjardim/c18d782c3e9aa30837ff/raw/224264b305a56f85f08112a4ca16e3d59d45d6be/build.sh

Change this line from:
LINK="https://www.kernel.org/pub/linux/kernel/v3.x/linux-${KERNEL}.tar.xz"
to 
LINK="https://www.kernel.org/pub/linux/kernel/v4.x/linux-${KERNEL}.tar.xz

using:
nano build.sh
then make it executable
chmod +x build.sh

run it with 
./build.sh

answer 1, 2 & 3 with Y
answer 3.1, 3.2 with N
answer 3.3 with Y
answer 4 and 6 with N

then make the modules that are needed:
cd kernel
make modules

Then we need to build some dependencies

#Libuuid
wget "http://downloads.sourceforge.net/project/libuuid/libuuid-1.0.3.tar.gz?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Flibuuid%2F&ts=1453068148&use_mirror=skylink"
tar -xvf libuuid*
cd libuuid-1.0.3
./configure
make 
make install

#Zlib
wget http://zlib.net/zlib-1.2.8.tar.gz
tar -xvf zlib-1.2.8.tar.gz
cd zlib-1.2.8
./configure
make 
make install

Then we build zfs and spl

First download the latest zfs and spl from zfsonlinux.org

wget http://archive.zfsonlinux.org/downloads/zfsonlinux/spl/spl-0.6.5.4.tar.gz
tar -xvf spl-0.6.5.4.tar.gz
cd spl-0.6.5.4

./configure --prefix=/usr
make
make install DESTDIR=$(pwd)/PACKAGE
cd $(pwd)/PACKAGE
makepkg -l y -c n ../spl.tgz
installpkg ../spl.tgz

load the module

depmod
modprobe spl

Same for zfs
wget http://archive.zfsonlinux.org/downloads/zfsonlinux/zfs/zfs-0.6.5.4.tar.gz
tar -xvf zfs-0.6.5.4.tar.gz
cd zfs-0.6.5.4

./configure --prefix=/usr
make
make install DESTDIR=$(pwd)/PACKAGE
cd $(pwd)/PACKAGE
makepkg -l y -c n ../zfs.tgz
installpkg ../zfs.tgz

depmod
modprobe zfs

Share this post


Link to post

something has changed in unRAID and the zpool command is not found in the path during startup and fails.  Plugin will have to be change to call zpool using a direct path instead.

 

I had to shutdown my array, and do the zpool -a manually to get it to come back up to have access to my dockers/vms.  upon restarting the array everything was working again....

 

 

Another thing I notice is the upgrade part of the script is not removing all the older packages so they are building up on the flash drive

 

Thanks

Myk

 

Share this post


Link to post

something has changed in unRAID and the zpool command is not found in the path during startup and fails.  Plugin will have to be change to call zpool using a direct path instead.

 

I had to shutdown my array, and do the zpool -a manually to get it to come back up to have access to my dockers/vms.  upon restarting the array everything was working again....

 

 

Another thing I notice is the upgrade part of the script is not removing all the older packages so they are building up on the flash drive

 

Thanks

Myk

 

Please test the new version and let me know

Share this post


Link to post

I have been waiting a LONG time for this combo.

 

Seeing this Plug-in with the new features of unRaid 6, I'm now ready to buy a pro key and go to town. I can actually make my storage server (which does pretty much nothing 90% of the time), move all my lower CPU Powered VMs and physical machines (Plex, pfSesnse, ect) and sell my other servers and recoup the costs while having a simpler setup.

 

unRaid6 + ZoL = Profit!

 

Why is BTRFS there but not ZoL!?

 

LimeTech... Give the customer what it wants and they will come.

Share this post


Link to post

In the next Ubuntu release ZFs will be shipped by default and I think that will push a lot of other distros in that direction... Hopefully Limetech will follow that trend.

Share this post


Link to post

any update?  I cant get it to compile on latest unRAID kernel

 

Thanks

Myk

 

Share this post


Link to post

Updated for 6.2.0-beta18 (kernel 4.4.4)

 

I also made the plugin compatible with versions 6.1.2 - 6.2.0-beta18

 

The only downside is that you need to keep every version of the tgz files (around 50mb now).

 

If someone knows how I can make the plugin download files (using the build in plugin downloader+md5 checker) based on a kernel version a PM would be greatly appreciated :) .. if not I guess I could always do everything in bash, but do not have time for that right now

Share this post


Link to post

Updated for 6.2.0-beta18 (kernel 4.4.4)

 

I also made the plugin compatible with versions 6.1.2 - 6.2.0-beta18

 

The only downside is that you need to keep every version of the tgz files (around 50mb now).

 

If someone knows how I can make the plugin download files (using the build in plugin downloader+md5 checker) based on a kernel version a PM would be greatly appreciated :) .. if not I guess I could always do everything in bash, but do not have time for that right now

 

# source unRAID version
. /etc/unraid-version

download_install() {
  local dest="&plugin;/packages/${1}"
  local src="&repo;/packages/${1}"
  local md5=$2
  if [ ! -f "${dest}" ]; then
    curl --location --silent --fail "${src}" --output "${dest}"
  fi
  file_md5=$(/usr/bin/md5sum ${dest})
  if [ "${file_md5:0:32}" != "${md5:0:32}" ]; then
    echo "Wrong '${1}' package md5 hash."
    rm "${dest}"
    exit 1
  else
    /sbin/installpkg "$dest"
  fi
}

if [ "$version" == "6.2.0-beta18" ]; then
  spl_pkg="spl-0.6.5.5-unRAID6.2.0-beta18.x86_64.tgz"
  spl_md5="6bab826e24b0c3ccc08b962e8a64058c"
  zfs_pkg="zfs-0.6.5.5-unRAID6.2.0-beta18.x86_64.tgz"
  zfs_md5="1ee9e5c1d85155ef87138aaee78aefb6"

elif [ "$version" == "6.1.9" ]; then
  spl_pkg="spl-0.6.5.4-unRAID6.1.9.x86_64.tgz"
  spl_md5="ef09a51f6fcc069ad4897b5e06088d00"
  zfs_pkg="zfs-0.6.5.4-unRAID6.1.9.x86_64.tgz"
  zfs_md5="74ee8f3698cd6f64839bcdf09abe5534"

elif [ "$version" == "6.1.8" ]; then
  spl_pkg="spl-0.6.5.4-unRAID6.1.8.x86_64.tgz"
  spl_md5="3ef7a7eb63bac07475dc7e9eee5132c5"
  zfs_pkg="zfs-0.6.5.4-unRAID6.1.8.x86_64.tgz"
  zfs_md5="ae2c5bd933f1376b52a73a07862db2bc"

elif [ "$version" == "6.1.7" ]; then
  spl_pkg="spl-0.6.5.4-unRAID6.1.7.x86_64.tgz"
  spl_md5="288b0b4c242fe947f41a2a4a1f731982"
  zfs_pkg="zfs-0.6.5.4-unRAID.1.7.x86_64.tgz"
  zfs_md5="57e386538e4726dd222c8bd682975705"

elif [ "$version" == "6.1.4" ]; then
  spl_pkg="spl-0.6.5.3-unRAID6.1.4.x86_64.tgz"
  spl_md5="41700aaec22f70d2ae257544d6f53695"
  zfs_pkg="zfs-0.6.5.3-unRAID6.1.4.x86_64.tgz"
  zfs_md5="31b8ee8c406f211a78c7dbf56ba2609e"

elif [ "$version" == "6.1.3" ]; then
  spl_pkg="spl-0.6.5.3-unRAID6.1.3.x86_64.tgz"
  spl_md5="8b0c880280b722fb1948dd9d0e3362b9"
  zfs_pkg="zfs-0.6.5.3-unRAID6.1.3.x86_64.tgz"
  zfs_md5="33401b97ae99a5f17aef4524bd5122cc"

elif [ "$version" == "6.1.2" ]; then
  spl_pkg="spl-0.6.5.1-unRAID6.1.2.x86_64.tgz"
  spl_md5="644f7c6a682b6b9d607f5a7337205d16"
  zfs_pkg="zfs-0.6.5.1-unRAID6.1.2.x86_64.tgz"
  zfs_md5="cdefbb81f0de70cdb876a4625abb4c88"
else
  exit 1
fi

download_install "${spl_pkg}" "${spl_md5}"
download_install "${zfs_pkg}" "${zfs_md5}"

 

 

Share this post


Link to post

Awesome. Thanks for that! I updated the plugin based on your code.

 

The plugin will continue to work for the later betas/rc while the kernel does not change from 4.4.4

Share this post


Link to post

Awesome. Thanks for that! I updated the plugin based on your code.

 

The plugin will continue to work for the later betas/rc while the kernel does not change from 4.4.4

 

You're welcome!

Share this post


Link to post

I really really want this. Hows the performance compared to BTRFS and is anyone having any issues with unRAID updating and not having support for your shares until the next update of the driver?

Share this post


Link to post

There are really good performance tests over at http://www.phoronix.com/ but for me it's more about stability and usability (snapshots replication etc that fits my workflow)

 

When unRaid is updated you have to wait for a plugin update. I try to update the plugin as fast as I can, but sometimes it can be a couple of days. If you accidentally update the worst thing that happens is that your Zfs pool won't be imported and the data the won't be accessible until a plugin update is pushed. In my setup that would mean all my dockers and vms.

 

I wanted to wait for 6.1 final before writing a complete how to for Zfs on unRaid, but if there was any interest I could get on that right away.

 

 

Sent from my iPhone using Tapatalk

Share this post


Link to post

 

I wanted to wait for 6.1 final before writing a complete how to for Zfs on unRaid, but if there was any interest I could get on that right away.

 

 

Sent from my iPhone using Tapatalk

6.1.9 final was released many moons ago  ;)

Share this post


Link to post

It was early. I meant 6.2

 

 

Sent from my iPhone using Tapatalk

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now