[2024-10-16]

ZFS goodies
===========
My wife recently wanted to manage family photos.  They are on
my backup storage with ZFS filesystem.  Normally, ZFS is not
accessible for normal user and I did not want her to manage
images under root account.

What we needed was to change mountpoint to our home directory
and set permissions for normal user.

Mount
-----
When I start storage while my computer is already running,
it is not going to be mounted automatically.  Perhaps it's
possible I just don't know how.  Anyway, following command
will do the job:

   # zpool import -a

To unmount the disk:

   # zfs unmount <my_backup>

Unlike root home directory is accessible to normal user so
let's change the mountpoint

   # zfs set mountpoint=/home/normie/my_backup
   # chown -R normie:normie /home/normie/my_backup

This will make all files and dirs accessible to my wife.
Is it a good idea, though?

Permissions
-----------
After some searching I found the command `zfs allow`.  But
first we need to do this:

   # sysctl vfs.usermount=1
   # zfs allow normie allow,mount,exec my_backup

There is a wide range of options to allow and user (or group)
can have more than one.

That'all.  I am no zfs-mage and these are a few very basic
commands for a specific use case that might be helpful to
somebody.

EOF