Linux – How to use ZFS on linux easily (without paths like /var/run/zfs) or as non-root


When I asked about filesystems with compression I got recommendation to try ZFS. Looks like it worth trying, however I find tools that manage ZFS (zfs, zpool) quite overcomplexified – you need to create some volume, then add it, then create filesystem on it. And finally it suddenly created things in root directory like /qqq/test and it uses /var/run/zfs/zfs_socket (strange for a filesystem).

How to use ZFS (with FUSE) without it's complicated things with volumes, just as good filesystem with compression, something like mount -o loop image.zfs /mnt/qqq -t zfs-fuse?

How to setup ZFS as non-root? FUSE usually means "user can use it too" (example: ntfs-3g). I expect something like this:

$ dd if=/dev/zero of=/home/user/qqq.zfs bs=1M count=100
$ mkfs.zfs /home/user/qqq.zfs -o compress=gzip
$ zfs-fuse /home/user/qqq.zfs /home/user/mnt

Can ZFS be more usual FUSE filesystem that I can add to /etc/fstab and user can install and use on its own?

Best Answer

  • Here is something close to what you are looking for, although you would need to be root to achieve it:

    $ dd if=/dev/zero of=/home/user/qqq.zfs bs=1M count=100
    # zpool create -O compression=gzip -m /home/user/mnt qqq /home/user/qqq.zfs
    # chown user /home/user/mnt

    ZFS supports non root operations (i.e. delegation) but ZFS-FUSE doesn't implement them.

  • Related Question