I hesitate to write a lengthy reply - my knowledge is too limited to count as a reliable reference...Since none of the ZFS utilities/kernel module are a component of the container, I am a little unsure exactly what ZFS has to do with this project? Please enlighten me.
It isn't a disk image, it is a ZFS dataset. (Which is different from a ZVOL.)The install.sh script did create a perfectly working, AD integrated Samba share at /tank/share on top of my underlying ZFS filesystem, but as a disk image
You are correct, snapshotting can only happen on the host as it has ultimate access to the data sets (and the pool). Inside of the container there are no ZFS tools/commands available. And yes, any "normal" tool should be fine.it has no hooks into the host filesystem itself, unless i am mistaken. Given that, how is snapshotting supposed to work without exposing the host filesystem to the container?
There are few details on how to fully implement this, such as host filesystem integration and the actual snapshotting mechanism but logic holds that all of that has to occur on the host itself where I would install a host snapshotting tool of my choice (such aszfs-auto-snapshot
) and then expose the host filesystem using something like this:pct set nnn -mp0 /tank/share,mp=/container/mount/point
.
But please note that the naming convention must fit to the line "shadow: snapprefix = ^zfs-auto-snap_\(frequent\)\{0,1\}\(hourly\)\{0,1\}\(daily\)\{0,1\}\(monthly\)\{0,1\}" inside the
smb.conf
. There are some more important configuration values set. Try to understand each and every line.Generally a ZFS snapshot is not visible at all but nevertheless accessible via mydataset/.zfs/snapshot. (The "." makes it "hidden", as usual in Linux.) Knowing this allows me to access those snapshots inside a share named "temp" (which is implemented as separate ZFS dataset on the host) this way:
Code:
..../temp/.zfs# ls -Al snapshot/ | head -n 4
insgesamt 0
drwxrwxrwx 1 root root 0 Jan 16 18:04 auto-d-250116180402
drwxrwxrwx 1 root root 0 Jan 17 08:04 auto-d-250117080402
drwxrwxrwx 1 root root 0 Jan 17 18:04 auto-d-250117180402
In Windows those directories/files shall appear as "Previous Versions" in the file explorer. (I had used this successfully two years ago but now it does not work for me anymore as something broke. Windows is irrelevant for me, so it is just not important.)
Best regards