How can we cleanly expose native ZFS datasets #2528
|
How can we cleanly expose native ZFS datasets to CasaOS storage management without losing pool features? When adding storage through the CasaOS Web UI, the system expects standard block storage partitions (like ext4 or exfat) mounted under /media/ or /mnt/. If a host system uses a native ZFS pool (zpool) with distinct datasets configured for specific compression or snapshot policies, letting CasaOS handle the disk directly can conflict with ZFS dataset properties or ignore child datasets entirely. What is the recommended approach to expose specific ZFS datasets to the CasaOS Files app and App Management system so containers can utilize them natively without breaking ZFS property inheritance? |
Replies: 1 comment
CasaOS dynamically discovers storage by scanning system mount points. To integrate ZFS datasets seamlessly without letting CasaOS format or alter the disk layout, you should manage the mount points at the ZFS layer and link them into CasaOS's watched directories.1. Configure the ZFS Dataset MountpointInstead of using ZFS's default mounting path, explicitly set the dataset mount point to the directory where CasaOS scans for external storage: sudo zfs set mountpoint=/media/my-zfs-dataset tank/data/storage2. Fix Permissions for CasaOS AccessCasaOS runs services under root or specific user groups. Ensure the ZFS dataset has the correct POSIX permissions so the CasaOS file manager can read and write to it: sudo chmod 775 /media/my-zfs-dataset
sudo chown -R root:root /media/my-zfs-dataset3. Restart CasaOS Local Storage ServiceForce CasaOS to rescan the storage mounts to discover the newly pointed dataset: sudo systemctl restart casaos-local-storage.serviceOnce restarted, the dataset will appear in the CasaOS Files dashboard as a native storage volume, allowing you to safely pass paths like |
CasaOS dynamically discovers storage by scanning system mount points. To integrate ZFS datasets seamlessly without letting CasaOS format or alter the disk layout, you should manage the mount points at the ZFS layer and link them into CasaOS's watched directories.
1. Configure the ZFS Dataset Mountpoint
Instead of using ZFS's default mounting path, explicitly set the dataset mount point to the directory where CasaOS scans for external storage:
sudo zfs set mountpoint=/media/my-zfs-dataset tank/data/storage2. Fix Permissions for CasaOS Access
CasaOS runs services under root or specific user groups. Ensure the ZFS dataset has the correct POSIX permissions so the CasaOS file manager can read…