I have two physical drives on the proxmox host. I want to share them with FreeNas and configure them there, then let the other containers access them from there. How would I set that up?
ZFS combines the roles of RAID controller, Volume Manager, and file system, and since it’s all three in one, it wants direct access to your disks in order to work properly. The closer you can get ZFS to your storage hardware, the happier ZFS is, and the better it can do its job of keeping your data safe. Things like native virtual disks or virtual disks on RAID controllers insulate ZFS from the disks, and therefore should be avoided whenever possible. Using a hypervisor, you typically have a disk on a RAID controller presented to a hypervisor which creates a datastore with a disk on it running FreeNAS. This places two layers between ZFS and the physical disks which warrants taking the following precautions.
Precautions
- If you are not using PCI passthrough (more on that below), then you must disable the scrub tasks in ZFS. The hardware can “lie” to ZFS so a scrub can do more damage than good, possibly even permanently destroying your zpool.
- The second precaution is to disable any write caching that is happening on the SAN, NAS, or RAID controller itself. A write cache can easily confuse ZFS about what has or has not been written to disk. This confusion can result in catastrophic pool failures.
- Using a single disk leaves you vulnerable to pool metadata corruption which could cause the loss of the pool. To avoid this, you need a minimum of three vdevs, either striped or in a RAIDZ configuration. Since ZFS pool metadata is mirrored between three vdevs if they are available, using a minimum of three vdevs to build your pool is safer than a single vdev. Ideally vdevs that have their own redundancy are preferred.
I see this Freenas quote all the time that to run ZFS you need to give it direct access to disks, but is this really a requirement of ZFS or a statement from freenas/IXsystems ?
I know that plenty will disagree and tell me this is foolish and ZFS is not designed to function this way, but in a real enterprise environment..... I bet you find this kind of setup more often than not.
Again just speaking from my experience and maybe sparking a little debate Possibly completely wrong and any large organization using ZFS only uses it directly.