

Fortunately ZFS come with a great solution for these kind of problems: snapshots.Ī snapshot is the state of the filesystem at a certain point in time. It can still fail and it will not protect against someone just deleting or overwriting data. Depending on how long you waited you should already see some of them that look like you run it the Ansible playbook for the server setup your output should look something like this.įirst run of the Ansible installation playbook for the ZFS home server ZFS snapshotsĪs I already said above, a RAID is not enough to keep your data safe. It should look like this.įinally zfs list will show you the file systems in the pool too and if you run zfs list -rtall you should also see your snapshots. You can also check if the filesystems have been created via ls or tree. Checking if the ZFS pool is up and readyĪfter you ran this Ansible scripts or manually created the pool you can check if it all worked by using the status command and should see something like this (missing the cache disk here). Zpool create -o ashift=12 dataPool raidz /docker

#Openzfs hardware requirements install
install needed packagesĪpt install zfsutils-linux zfs-auto-snapshot With these IDs we can start creating the pool by using these commands. So /sdf belongs to /dev/disk/by-id/ata-SAMSUNG_SSD_830_Series_S0WJNEAC301096 which is the ID. Those can be found by using ls -l /dev/disk/by-id or /dev/disk/by-uuid.įor the IDs you will see something like this ata-SAMSUNG_SSD_830_Series_S0WJNEAC301096 ->. Instead go with the ID or UUID of the disk. sudo lshw -class disk -short can be very helpful in this regard as well as sudo fdisk -l I would avoid using the /dev/sda like identifiers as those might change. Next you need to find out which disk is mounted where. I chose to live with this risk as there is also an external backup. Be warned though that the the increased write rates when you rebuild the RAID after a failure might lead too more disks failing. RAID Z can use two out of three disks and is safe against one disk failure. I chose to go with an inbetween solution. The other end of the spectrum would be mirroring, where you need two (or three/four/…) times the actual data capacity but you can ignore a single disk failure. No RAID at all means you can just buy the capacity you need but you will have to restore everything from backup if any disks die. Raid is no backup but it can safe you a lot of time when one disk dies. I would suggest to start by figuring our how you storage space you need and secure it has to be. I personally used 3 hard disks at 3 Terrabytes each in a RAID Z (more or less equal to RAID 5) configuration with an added SSD as a read cache. This is where you should think about what those should be for a second. Setting up the main storage pool & file systemsĪfter the hardware is ready and you have installed your favorite operating system (I used Ubuntu Server) you are ready to set up a storage pool containing the disks you have available. Finally on top of all of this ZFS implements snapshots: old version of you files that you can always go back to.

On top of a pool you can then create one or several new file systems where you can again control some settings like the quota of available disk space. Once this is set up you do not really need to touch this anymore unless you want to extend your setup of need to swap a disk. On this level you can define features like RAID or mirroring, caches and data deduplication. This pool can consist of one or multiple disks or even files on a disk and combines them into one based on the settings you provide.

The version I use is developed by openZFS and available for most of the major Linux distributions. It is a great system for a home server with many many useful features. It is made in way that makes it very hard to loose data with checksums and a copy-on-write approach.
#Openzfs hardware requirements full
It is a full storage solution ranging from the management of the physical disks, to RAID functionality, to partitioning and the creation of snapshots. The Zettabyte File System ZFS is actually a bit more than a conventional file system.
