Is ZFS and RAID-Z worth using in home made NAS (freeNAS for example)

53,107

Solution 1

Snapshotting a filesystem is an amazing feeling, as geeky as that sounds. Knowing you can roll back in an instant is a relieving thought. Snapshots also take only a few seconds. A colleague and I recently deployed an OpenSolaris NAS for a smallish college (200+ students) for virtual machine iSCSI storage for Citrix XenServer, student file storage and administration files. Files are checksummed so you have the guarantee that if there is a bit error at the harddrive level that you'll find out instead of your files corrupting silently.

Having a bit of a budget we got a server with 9 disks, 2 for the OS mirrored using ZFS, 4 for data, 2 parity (using ZFS RAIDZ2) and 1 hot spare. Each was 1TB which brought it down to about 2.5T+ or thereabouts usable (you lose some space for the 1TB to 1TiB conversion and other overhead like filesystem data). Snapshotting the root storage pool took less than 2 seconds. When you go ZFS, you wonder how you'll ever go back, and why this isn't standard.

Snapshots can also be sent to another computer running the same version of ZFS using 'zfs send' which can be done over SSH. These changes are sent incrementally so there's no wastage there.

The only downside is knowing the right commands, although OpenSolaris has a nice scheduling manager for daily snapshots however I haven't used it. Sharing via iSCSI, CIFS/SMB, or NFS is fairly trivial - but in the latest version using the new framework COMSTAR yields some problems. Make sure you're using the right guide for your release if you go down this path. 2009.06 has a few changes since 2008.11 which I recommend. I wouldn't use it as a desktop either - Gnome and X seem a bit in need of attention.

Last thing: you need 512MB to 1G minimum of memory to let ZFS run smoothly. YMMV though, so give it a shot and see what you think.

Have a read through the docs: http://wikis.sun.com/display/BluePrints/Provisioning+with+iSCSI+and+Solaris+ZFS+in+10+Minutes

And maybe Lesser known Solaris Features http://www.c0t0d0s0.org/pages/lksfbook.html

And if you're feeling like testing some stuff http://www.solarisinternals.com/wiki/index.php/ZFS_Evil_Tuning_Guide

Oh and one last bit of information for anyone reading: make sure if you have a RAID card and you want to utilize the features of ZFS that it can serve up the disks in JBOD as opposed to a predetermined RAID configuration as dictated by the card. Enjoy!

Solution 2

If by NAS you mean (Open)Solaris or FreeBSD on PC hardware acting as a fileserver, then yes, it should be fine.

See this question on building your own NAS. You might find dedicated NAS software such as FreeNAS easier to setup and admin.

Solution 3

ZFS on a home NAS is great. I've have a FreeBSD server running ZFS for years (now upgraded to FreeBSD 8.2 with V15) and the recover aspects are one of the hidden gems.

I have a system that has a pair of 2TB drives in a ZFS mirror that crashed due to environmental reasons, when it came back up, it only took seconds for ZFS to correct the issues with drive. A standard RAID rebuild on 2TB drives takes a long time. I had another die because some of the internal fans died. This system had a 4 drive RAIDZ and it was able to recover all of the data loss in 5 minutes across a 2TB setup.

If you run FreeBSD with Samba and ZFS, you can combine the snapshots from the first answer with Recent Files (found in Vista and Windows 7) and then be able to older file versions using the windows GUI. See http://www.edplese.com/samba-with-zfs.html for details.

Solution 4

It can be worthwhile once you find hardware that works well with Solaris. I ended up using Nexenta for usability - it (mostly) uses familiar GNU command-line and Debian's package manager.

Here's my writeup of how it went.

Solution 5

It should be noted that due to licensing issues, the Linux ZFS implementation is somewhat crippled. It runs as a Userspace program, and has dramatically reduced performance, and iirc, a reduced feature set. Solaris and FreeBSD are the recommended OS choices, although Mac OSX has limited support.

Followup - The OSX port of ZFS has since become somewhat deprecated, I wouldn't recommend it for anything other than testing

Share:
53,107

Related videos on Youtube

JaredM
Author by

JaredM

Updated on September 17, 2022

Comments

  • JaredM
    JaredM almost 2 years

    Features of ZFS and RAID-Z look vary promising. Looks like it is a perfect FS for home NAS solutions, poor man's Drobo things and alike.

    Are there any drawbacks I should be aware of?

  • Rodney Schuler
    Rodney Schuler almost 15 years
    ZFS is also available on FreeBSD wiki.freebsd.org/ZFS. There are home NAS systems available that are FreeBSD based freenas.org
  • Martin
    Martin almost 15 years
    My fault /o\. downvote
  • dlamblin
    dlamblin almost 15 years
    It depends on your definition of NAS. I believe any machine hosting storage to a network is NAS, and Sun invented NFS so Solaris should be perfect for a NAS.
  • Amok
    Amok almost 15 years
    I'm using Solaris with RAIDZ2 for my personal file server and it's been great. It's easy to set up, fast, and reliable. I wouldn't use Solaris as a desktop OS, but as a server OS I haven't found anything better.
  • Brian Knoblauch
    Brian Knoblauch almost 15 years
    I've found Solaris to be a decent work-oriented desktop OS as well, but can't recommend it for home use (where one might need access to more multimedia apps).
  • Brian Knoblauch
    Brian Knoblauch almost 15 years
    Same applies to most hardware RAID out there...
  • Amok
    Amok almost 15 years
    ZFS can be used like RAID0, RAID1, RAID5, or RAID6 since it supports mirroring, striping, and RAID5/6 style parity.
  • Amok
    Amok almost 15 years
    @rschuler I've used FreeBSD and ZFS and found that it's not very stable.
  • Bender
    Bender almost 15 years
    ZFS is somewhat unique. Hardware RAIDs, however fragile they are, have a much simpler on-disk layout. And there are more people capable of recovering data from broken RAID arrays. And there are some data recovery tools for popular filesystems. :)
  • dmitry.tcheban
    dmitry.tcheban about 14 years
    @Amuck, it is stable in FreeBSD 8.0.
  • dmitry.tcheban
    dmitry.tcheban about 13 years
    Doesn't any standard RAID (such as RAID 1 & RAID 5) setup require that all of the drive be the same size? It is xRAID and other custom RAID setups that support things like that. In the given example, create two pools, one with 2 1TB drives and one with 2 1.5TB drives.
  • dmitry.tcheban
    dmitry.tcheban about 13 years
    I've been using it with FreeBSD and have had systems crash due to power outages (UPS crashes, runs out of juice before it is shutdown) and the really slick thing is that when the system comes back up, it recovers all of the data in the background as the system runs (rather than requiring multi-hour RAID rebuilds). The design goal seems to be to prevent every having to get to point were data has to manually recovered by reading raw bytes from the drive.
  • dmitry.tcheban
    dmitry.tcheban almost 10 years
    The kernel mode versions of ZFS on Linux have become much more stable. That is one that you want to use for ZFS on Linux.