[Your opinions wanted] EXT4 vs ZFS

    • OMV 2.x
    • [Your opinions wanted] EXT4 vs ZFS

      Hello,

      I know there are many articles on the Internet that cover this but I just wanted to open up some discussion as I will probably have additional follow up questions.

      I'm in the process of getting my homeserver set up.

      The server will act as a file server and media server. I'll mostly be storing data on my server but I'll also be occasionally streaming video.

      I currently have Open Media Vault running for my OS and I'll most likely end up setting up the disks in a RAID1 configuration.

      My ultimate goal is to never lose my data.

      I understand there are benefits and drawbacks to both EXT4 and ZFS

      So for I understand,
      • XFS - provides protection against 'bit rot' but has high RAM overheads.

      • EXT4 - I know nothing about this file system.

      Which file system would you consider the best for my needs and what should I be aware of when considering the filesystem you recommend?

      Please add your thoughts and comment below.

      Thanks in advance!

      TL:DR Should I use EXT4 or ZFS for my file server / media server. Please explain the reasons for your choice.
    • ZFS requires ECC RAM, and supported-motherboard.
      If you have those elements, then you can use it to protect from data loss.
      Otherwise, use RAID or un-RAID for your ext4.
      Regardless the method you chose, you still need to backup your daily on often.

      en.wikipedia.org/wiki/ZFS

      RAID[edit]ZFS and hardware RAID[edit]If the disks are connected to a RAID controller, it is most efficient to configure it as a HBA in JBOD mode (i.e. turn off RAID functionality). If a hardware RAID card is used, ZFS always detects all data corruption but cannot always repair data corruption because the hardware RAID card will interfere. Therefore, the recommendation is to not use a hardware RAID card, or to flash a hardware RAID card into JBOD/IT mode. For ZFS to be able to guarantee data integrity, it needs to either have access to a RAID set (so all data is copied to at least two disks), or if one single disk is used, ZFS needs to enable redundancy (copies) which duplicates the data on the same logical drive. Using ZFS copies is a good feature to use on notebooks and desktop computers, since the disks are large and it at least provides some limited redundancy with just a single drive.

      There are several reasons as to why it is better to rely solely on ZFS by using several independent disks and RAID-Z or mirroring.

      When using hardware RAID, the controller usually adds controller-dependent data to the drives which prevents software RAID from accessing the user data. While it is possible to read the data with a compatible hardware RAID controller, this inconveniences consumers as a compatible controller usually isn't readily available. Using the JBOD/RAID-Z combination, any disk controller can be used to resume operation after a controller failure.

      Note that hardware RAID configured as JBOD may still detach drives that do not respond in time (as has been seen with many energy-efficient consumer-grade hard drives), and as such, may requireTLER/CCTL/ERC-enabled drives to prevent drive dropouts.[21]

      Software RAID using ZFS[edit]ZFS offers software RAID through its RAID-Z and mirroring organization schemes.

      RAID-Z is a data/parity distribution scheme like RAID-5, but uses dynamic stripe width: every block is its own RAID stripe, regardless of blocksize, resulting in every RAID-Z write being a full-stripe write. This, when combined with the copy-on-write transactional semantics of ZFS, eliminates the write hole error. RAID-Z is also faster than traditional RAID 5 because it does not need to perform the usual read-modify-writesequence.[22]

      As all stripes are of different sizes, RAID-Z reconstruction has to traverse the filesystem metadata to determine the actual RAID-Z geometry. This would be impossible if the filesystem and the RAID array were separate products, whereas it becomes feasible when there is an integrated view of the logical and physical structure of the data. Going through the metadata means that ZFS can validate every block against its 256-bit checksum as it goes, whereas traditional RAID products usually cannot do this.[22]

      In addition to handling whole-disk failures, RAID-Z can also detect and correct silent data corruption, offering "self-healing data": when reading a RAID-Z block, ZFS compares it against its checksum, and if the data disks did not return the right answer, ZFS reads the parity and then figures out which disk returned bad data. Then, it repairs the damaged data and returns good data to the requestor.[22]

      RAID-Z does not require any special hardware: it does not need NVRAM for reliability, and it does not need write buffering for good performance. With RAID-Z, ZFS provides fast, reliable storage using cheap, commodity disks.[22]

      There are three different RAID-Z modes: RAID-Z1 (similar to RAID 5, allows one disk to fail), RAID-Z2 (similar to RAID 6, allows two disks to fail), and RAID-Z3 (allows three disks to fail). The need for RAID-Z3 arose recently because RAID configurations with future disks (say, 6–10 TB) may take a long time to repair, the worst case being weeks. During those weeks, the rest of the disks in the RAID are stressed more because of the additional intensive repair process and might subsequently fail, too. By using RAID-Z3, the risk involved with disk replacement is reduced.[23]

      Mirroring, the other ZFS RAID option, is essentially the same as RAID 1, allowing any number of disks to be mirrored.[24]



      OMV v4.0
      Asus Z97-A/3.1; i3-4370
      32GB RAM Corsair Vengeance Pro
      4x3TB RAID10

      The post was edited 2 times, last by tinh_x7 ().

    • Unless you need realtime mirroring, I would use ext4 and rsnapshot instead of zfs/raid 1/etc. rsnapshot will run hourly to sync drive 1 to drive 2 and create multiple changes. This is the most reliable setup in my opinion.

      zfs doesn't have high ram overhead unless you are doing deduplication and maybe compression.
      omv 4.1.6 arrakis | 64 bit | 4.16 backports kernel | omvextrasorg 4.1.6
      omv-extras.org plugins source code and issue tracker - github.com/OpenMediaVault-Plugin-Developers

      Please read this before posting a question.
      Please don't PM for support... Too many PMs!
    • any reason why not snapRaid run sync hourly?
      omv 3.0.56 erasmus | 64 bit | 4.7 backport kernel
      SM-SC846(24 bay)| H8DME-2 |2x AMD Opteron Hex Core 2431 @ 2.4Ghz |49GB RAM
      PSU: Silencer 760 Watt ATX Power Supply
      IPMI |3xSAT2-MV8 PCI-X |4 NIC : 2x Realteck + 1 Intel Pro Dual port PCI-e card
      OS on 2×120 SSD in RAID-1 |
      DATA: 3x3T| 4x2T | 2x1T
    • SnapRAID is supposed to be good for large media files, but not too good for files that change frequently. Running it on an hourly basis seems a bit overkill.

      RAID1 is good for system drives, because it's all about high availability.

      Even with appropriate hardware, I wouldn't go with ZFS. If your system breaks, you can pull out your ext4 drive and read it on pretty much any computer.
    • vl1969 wrote:

      any reason why not snapRaid run sync hourly?

      If he is thinking raid1, I would be more inclined to use rsync with the --checksum flag than snapraid.
      omv 4.1.6 arrakis | 64 bit | 4.16 backports kernel | omvextrasorg 4.1.6
      omv-extras.org plugins source code and issue tracker - github.com/OpenMediaVault-Plugin-Developers

      Please read this before posting a question.
      Please don't PM for support... Too many PMs!
    • 1uke_ wrote:

      Hello,

      I know there are many articles on the Internet that cover this but I just wanted to open up some discussion as I will probably have additional follow up questions.

      I'm in the process of getting my homeserver set up.

      The server will act as a file server and media server. I'll mostly be storing data on my server but I'll also be occasionally streaming video.

      I currently have Open Media Vault running for my OS and I'll most likely end up setting up the disks in a RAID1 configuration.

      My ultimate goal is to never lose my data.

      I understand there are benefits and drawbacks to both EXT4 and ZFS

      So for I understand,
      • XFS - provides protection against 'bit rot' but has high RAM overheads.

      • EXT4 - I know nothing about this file system.

      Which file system would you consider the best for my needs and what should I be aware of when considering the filesystem you recommend?

      Please add your thoughts and comment below.

      Thanks in advance!

      TL:DR Should I use EXT4 or ZFS for my file server / media server. Please explain the reasons for your choice.


      The only true way to not lose data, is have a backup (IE, Raid1 is NOT A BACKUP).

      I'm a big fan of rsync over Raid1. I don't have my rsync job set to delete on the "backup".. then every so often when I know there's nothing I've accidentally deleted.. I set the job to delete everything on the target that isn't on the host drive.. and then run the job manually. When it's done, I turn the delete option off until the next time I decide to make sure the drives exactly mirror each other.
      Air Conditioners are a lot like PC's... They work great until you open Windows.

    • Nibb31 wrote:



      Even with appropriate hardware, I wouldn't go with ZFS. If your system breaks, you can pull out your ext4 drive and read it on pretty much any computer.
      you can do the same with ZFS.

      I create my pool on Nas4Free then change my mainboard ( and the sata controller) and import ZFS pool with no lost of data, the I move to OMV and import my pool from CLI and use
      with ZFSPluging, works fine, but plugging do not cover all the power of ZFS so finally export the pool and import in other NAS with FreeNAS, so you can see, no data lost on all this moves.
      OMV 3.0.96 x64 on a HP T510, 16GB CF as Boot Disk & 32GB SSD 2,5" disk for Data, 4 GB RAM, CPU VIA EDEN X2 U4200 is x64 at 1GHz

      Post: HPT510 SlimNAS ; HOWTO Install Pi-Hole ; HOWTO install MLDonkey ; HOHTO Install ZFS-Plugin ; OMV_OldGUI ; ShellinaBOX ;
      Dockers: MLDonkey ; PiHole ;