| Both sides previous revision Previous revision Next revision | Previous revision |
| omv7:omv7_plugins:zfs [2025/06/27 19:06] – [Adding FileSystems] crashtest | omv7:omv7_plugins:zfs [2025/10/25 01:43] (current) – [ZFS - General] crashtest |
|---|
| **ZFS** (the **Z**ettabyte **F**ile **S**ystem) is a high-performance, scalable file system and logical volume manager designed by Sun Microsystems which is now part of Oracle. It was originally developed for the Solaris operating system and it's the granddaddy of **COW** (**C**opy **O**n **W**rite) filesystems. ZFS has since been ported to other platforms, to include Linux and FreeBSD . Having been under constant development since its creation for Sun Solaris server, in 2001, ZFS is very mature. | **ZFS** (the **Z**ettabyte **F**ile **S**ystem) is a high-performance, scalable file system and logical volume manager designed by Sun Microsystems which is now part of Oracle. It was originally developed for the Solaris operating system and it's the granddaddy of **COW** (**C**opy **O**n **W**rite) filesystems. ZFS has since been ported to other platforms, to include Linux and FreeBSD . Having been under constant development since its creation for Sun Solaris server, in 2001, ZFS is very mature. |
| |
| Currently, [[https://zfsonlinux.org/|OPENZFS on Linux]] is sponsored by [[https://computing.llnl.gov/projects/openzfs|Lawrence Livermore Labs]], it's very well-funded and will be fully supported into the foreseeable future and, likely, beyond. | Currently, [[https://zfsonlinux.org/|OPENZFS on Linux]] is sponsored by [[https://computing.llnl.gov/projects/openzfs|Lawrence Livermore Labs]]. OPENZFS it's very well-funded and will be fully supported into the foreseeable future and, likely, beyond. |
| |
| ==== ZFS Features ==== | ==== ZFS Features ==== |
| ===== Prerequisites ===== | ===== Prerequisites ===== |
| |
| * An **amd64 (64 bit) workstation** or equivalent. ZFS on SBC's (Single Board Computers), like the Raspberry PI, Odriods and others, is **NOT supported**. | * An **amd64 (64 bit) workstation** or server. \\ **Note:** ZFS on SBC's (Single Board Computers), like the Raspberry PI, Odriods and others, is **NOT supported**.\\ |
| * PuTTY is a prerequisite for installing OMV-Extras and for working with ZFS on the command line. \\ [[https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html|PuTTY]] is an SSH client that will allow users to connect to their SBC, from a Windows client, to get on the server's command line. PuTTY is installable on a Windows client. Installation and use guidance, for PuTTY, can be found ->[[https://wiki.omv-extras.org/doku.php?id=omv7:utilities_maint_backup#putty|here]]. | |
| | * PuTTY is a prerequisite for installing OMV-Extras and for working with ZFS on the command line. \\ [[https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html|PuTTY]] is an SSH client that will allow users to connect to their server, from a Windows client, to get on the server's command line. PuTTY is installable on a Windows client. Installation and use guidance, for PuTTY, can be found ->[[https://wiki.omv-extras.org/doku.php?id=omv7:utilities_maint_backup#putty|here]]. |
| * [[https://wiki.omv-extras.org/doku.php?id=misc_docs:omv_extras|OMV-Extras]] is a prerequisite for installing the kernel plugin. Installation and use guidance, for the OMV-Extras plugin can be found ->[[https://wiki.omv-extras.org/doku.php?id=misc_docs:omv_extras|here]]. | * [[https://wiki.omv-extras.org/doku.php?id=misc_docs:omv_extras|OMV-Extras]] is a prerequisite for installing the kernel plugin. Installation and use guidance, for the OMV-Extras plugin can be found ->[[https://wiki.omv-extras.org/doku.php?id=misc_docs:omv_extras|here]]. |
| * The **Kernel Plugin** is **required** for ZFS. After OMV-Extras is installed, on OMV's left side menu bar go to **System**, **Plugins**. Find, select, and install the **openmediavault-kernel** 7.x.x plugin.\\ | * The **Kernel Plugin** is **required** for ZFS. After OMV-Extras is installed, on OMV's left side menu bar, go to **System**, **Plugins**. Find, select, and install the **openmediavault-kernel** 7.x.x plugin.\\ |
| |
| |
| |
| With a focus on getting new users started:\\ | With a focus on getting new users started:\\ |
| Most of the documentation at OMV-Extras.org is written with a focus on "How-To" do a specific task. Further, in most cases, topics on this site are geared toward beginners. While getting to a running ZFS installation can be laid out in a "How-To" format, ZFS and its RAID equivalents are NOT beginner topics. Accordingly, this document will support the "How-To" route along with explanations (very brief in nature) to inform beginners of ZFS basics and to prevent users from straying too far from reasonable norms.\\ | Most of the documentation at OMV-Extras.org is written with a focus on "How-To" do a specific task. Further, in most cases, topics on this site are geared toward beginners. While getting to a running ZFS installation can be laid out in a "How-To" format, please note that ZFS and its RAID equivalents are NOT beginner friendly topics. In any case, this document will support the "How-To" route along with explanations (very brief in nature) to inform users of ZFS basics and to prevent beginners from straying too far from reasonable norms.\\ |
| \\ | \\ |
| As the "How-To" path is laid out, overview explanations of key concepts are provided along with links to more extended information. For beginners and others who have had little to no exposure to ZFS, taking a few minutes to read and understand ZFS related concepts will increase understanding and dispel some of the myths and mysticism related to this unique file system.\\ | As the "How-To" path is laid out, overview explanations of key concepts are provided along with links to more extended information. For beginners and others who have had little to no exposure to ZFS, taking a few minutes to read and understand ZFS related concepts will increase understanding and dispel some of the myths and mysticism related to this unique file system.\\ |
| There are a great many misunderstandings with regard to ZFS. This section will go over a few of them: | There are a great many misunderstandings with regard to ZFS. This section will go over a few of them: |
| |
| (**TL;DR** - send me to -> [[https://wiki.omv-extras.org/doku.php?id=docs_in_draft:zfs#kernels_and_their_impact|Kernels and Their Impact]].) | (**TL;DR** - **send me to** -> [[https://wiki.omv-extras.org/doku.php?id=docs_in_draft:zfs#kernels_and_their_impact|Kernels and Their Impact]].) |
| |
| ==== ZFS - The Memory Myth ==== | ==== ZFS - The Memory Myth ==== |
| While all use cases are not the same, for this sake of this discussion, we'll assume that users reading this document are NOT Corporate or Datacenter Admins. The assumption will be that readers are home server users, server admins for small businesses, or other entities that have 25 users or less. In other words, when compared to Enterprise level network traffic, we're talking about relatively "light usage".\\ | While all use cases are not the same, for this sake of this discussion, we'll assume that users reading this document are NOT Corporate or Datacenter Admins. The assumption will be that readers are home server users, server admins for small businesses, or other entities that have 25 users or less. In other words, when compared to Enterprise level network traffic, we're talking about relatively "light usage".\\ |
| \\ | \\ |
| The author of this document, in personal experience with running ZFS, has set up a 4TB pool on a host with 4GB of RAM and an older Atom processor (read, "a weak CPU"). File server performance for a few users, along with streaming data, was fine. Memory might become an issue only if "dedup" (deduplication of data) is turned ON. (This is an Enterprise feature that is __OFF__ by default.) In most home or small business use cases, ZFS' CPU requirements are modest.\\ | The author of this document, in personal experience with running ZFS, has set up a 4TB pool on a host with 4GB of RAM and an older Atom processor (read, "a weak CPU"). File server performance for a few users, along with streaming data, is fine. Memory might become an issue only if "dedup" (deduplication of data) is turned ON. ("Dedup" is an Enterprise feature that is __OFF__ by default and, for home use, it is recommended that dedup remains OFF.) In most home or small business use cases, ZFS' CPU requirements are modest.\\ |
| \\ | \\ |
| **"ECC RAM is required to run ZFS".**\\ | **"ECC RAM is required to run ZFS".**\\ |
| As is the case with most file server and NAS installations, ECC is desirable but not required. ECC is designed to correct randomly "flipped bits" in RAM, notionally caused by cosmic rays. While flipped RAM bits could cause an errored disk write, a more likely outcome would be a kernel or application error. Data stored and checksummed, on a spinning hard drive or an SSD, is another matter altogether. Correcting storage media errors is a task that ZFS handles well.\\ | As is the case with most file server and NAS installations, ECC is desirable but not required. ECC is designed to correct randomly "flipped bits" in RAM, notionally caused by cosmic rays. While flipped RAM bits could cause an errored disk write, a more likely outcome would be a kernel panic or an application error. Data stored and checksummed, on a spinning hard drive or an SSD, is another matter altogether. Maintaining error free data and correcting storage media errors and is a task that ZFS handles well.\\ |
| \\ | \\ |
| **"ZFS is eating all of my RAM!"**\\ | **"ZFS is eating all of my RAM!"**\\ |
| **TL;DR** proceed to -> [[https://wiki.omv-extras.org/doku.php?id=omv7:omv7_plugins:zfs#installing_the_zfs_plugin|Installing the ZFS plugin]].\\ | **TL;DR** proceed to -> [[https://wiki.omv-extras.org/doku.php?id=omv7:omv7_plugins:zfs#installing_the_zfs_plugin|Installing the ZFS plugin]].\\ |
| \\ | \\ |
| Removing non-proxmox kernels is recommended in that, when Openmediavault is updated, the remaining Debian kernels will be updated as well. These updates will also update the grub bootloader with unnecessary entries for the newer Debian Kernels. While rare, occasionally, grub/kernel updates do not go well. Issues with unused Debian Kernels and their grub updates can be prevented by removing non-proxmox kernels.\\ | Removing non-proxmox kernels is recommended in that, when Openmediavault is updated, the remaining but unused Debian kernels will be updated as well. These updates will also update the grub bootloader with unnecessary entries for the newer Debian Kernels. While rare, occasionally, grub/kernel updates do not go well. Issues with unused Debian Kernels and their grub updates can be prevented by removing non-proxmox kernels.\\ |
| \\ | \\ |
| |
| |
| * **Mirror**: | * **Mirror**: |
| Also known as a Zmirror. A Zmirror is a RAID1 equivalent. A mirror requires a 2 disk minimum. In that there are always at least __2 copies__ of all files in a Mirror, data integrity scrubs automatically correct data errors. Further, it's worth noting that more than 2 disks can be added to a single Mirror. Adding more than 2 disks creates additional disk mirrors and more than 2 copies of all files. While the cost is the loss of hard drive space, multiple drives in a mirror configuration provides for **maximum** data integrity and safety. For the reasons stated in this -> [[https://jrs-s.net/2015/02/06/zfs-you-should-use-mirror-vdevs-not-raidz/|reference]], using VDEV(s) comprised of one or more mirrors should be considered and is recommended.\\ | Also known as a Zmirror. A Zmirror is a RAID1 equivalent. A mirror requires a 2 disk minimum. In that there are always at least __2 copies__ of all files in a Mirror, data integrity scrubs automatically correct data errors. Further, it's worth noting that more than 2 disks can be added to a single Mirror. Adding more than 2 disks creates additional disk mirrors and more than 2 copies of all files. While the cost is the loss of hard drive space, multiple drives in a mirror configuration provides for **maximum** data integrity and safety. For the reasons stated in this -> [[https://jrs-s.net/2015/02/06/zfs-you-should-use-mirror-vdevs-not-raidz/|reference]], using VDEV(s) comprised of one or more mirrors should be considered and is recommended. |
| | |
| For RAID-Z implementations, it is generally recommended to run an "**odd**" number of drives. | |
| |
| * **RAID-Z1**: With one striped parity disk, this is the equivalent of RAID5. (RAID-Z1 requires 3 disks minimum. A rule of thumb maximum would be 7 drives.)\\ | * **RAID-Z1**: With one striped parity disk, this is the equivalent of RAID5. (RAID-Z1 requires 3 disks minimum. A rule of thumb maximum would be 7 drives.)\\ |
| * **RAID-Z2**: With two striped parity disks, this is the equivalent of RAID6. (RAID-Z2 requires 4 disks minimum. A rule of thumb maximum would be 11 drives )\\ | * **RAID-Z2**: With two striped parity disks, this is the equivalent of RAID6. (RAID-Z2 requires 4 disks minimum. A rule of thumb maximum would be 11 drives )\\ |
| * **RAID-Z3**: With three striped parity disks, RAID-Z3 has no traditional RAID equivalent but it could, notionally, be called RAID7. (RAID-Z3 requires 5 disks minimum. A rule of thumb maximum would be 15 drives.)\\ | * **RAID-Z3**: With three striped parity disks, RAID-Z3 has no traditional RAID equivalent but it could, notionally, be called RAID7. (RAID-Z3 requires 5 disks minimum. A rule of thumb maximum would be 15 drives.)\\ |
| \\ | |
| | <html> |
| | <body> |
| | <table width="100%" border="0"> |
| | <tr> |
| | <td colspan="2" style="background-color:#69A5FF;height:30px;"> |
| | <strong><span style="color:#FFFFFF;font-size:110%;">  Note</span></strong> |
| | </td> |
| | </tr> |
| | <tr> |
| | <td style="background-color:#E6FEFF;height:25px;width:380px;"> |
| | In RAID-Z implementations, it is generally recommended to run an <b>odd</b> number of drives. |
| | </tr> |
| | </table> |
| | </body> |
| | </html> |
| ---- | ---- |
| |