I have a machine with 3 2TB SSD drives, I want to configure openzfs
at least on two of them. The root partition has ext4
and if possible I would like to avoid reinstalling everything, so I am wondering if it makes sense to create a large file in root ext4
partition, and mount it as virtual block device strictly for parity storage.
Is the above configuration possible? or would be preferrable to take the extra-effort to resize the root partition and create another dedicated zfs partition from the main SSD?
Generally speaking, ZFS behaves best when it's allowed to take full control of its block devices. I strongly recommend running two of your drives as a ZFS mirror instead, if you want to avoid the potential complications of running root-on-ZFS, or even purchasing a fourth SSD if you insist on wanting to run RAIDZ1 with a separate boot volume.
It would be possible to partition (at least) one of the drives and dedicate one partition to ZFS for a RAIDZ1 setup, but you would lose some space doing so (the space available for data + parity information would be 3 times the smallest disk in the set), and it would net you worse performance than running on the entire disks.
I would strongly recommend against using a file on a disk as one of the members in a RAIDZ1 set. It's fine for learning the ropes, but it will bite you once you take your training wheels off.