first of all, first post, so thank you to everyone here who helps others.
I've read the "first read this" posts so hopefully i'll be ok.
I've used unix and linux, debian in particular, for many years (something around 25).
While this allows me to know quite some stuff, i don't know all and especillay some of the newer things.
After the intros, let's come to the problem at hand.
I've been using ZFS (ZoL) for about 5 years on debian. Now it's all fully using systemd and I've always had issues there.
I had fixed them in stretch I believe, but when I upgraded to buster I suppose the systemd files were updated and I'm back to square one.
The issue is that services that use the files on one of the zfs pool/fs are starting before the pool is fully imported and mounted and therefore create file entries which cause the import and mount to not finish fully correctly.
Debian version : Buster 10.7
zfs version : zfs-dkms/buster-backports,now 0.8.6-1~bpo10+1 all [installed]
here's an example of WRONG:
Code: Select all
# df -H /zdocs/*
Filesystem Size Used Avail Use% Mounted on
zdocs 308G 525k 308G 1% /zdocs
zdocs/docker_data 313G 4.3G 308G 2% /zdocs/docker_data
zdocs 308G 525k 308G 1% /zdocs
zdocs 308G 525k 308G 1% /zdocs
zdocs 308G 525k 308G 1% /zdocs
zdocs/server 311G 2.5G 309G 1% /zdocs/server
zdocs 308G 525k 308G 1% /zdocs
zdocs/temp 311G 2.6G 308G 1% /zdocs/temp
zdocs 308G 525k 308G 1% /zdocs
Code: Select all
# zpool export zdocs
# zpool import zdocs
cannot mount '/zdocs/ourcloud': directory is not empty
Code: Select all
# df -H /zdocs/*
Filesystem Size Used Avail Use% Mounted on
zdocs/dev 322G 13G 310G 4% /zdocs/dev
zdocs/docker_data 315G 5.8G 310G 2% /zdocs/docker_data
zdocs/docs 374G 33G 342G 9% /zdocs/docs
zdocs/ourcloud 310G 48M 310G 1% /zdocs/ourcloud
zdocs/photos 594G 285G 310G 48% /zdocs/photos
zdocs/server 312G 2.5G 310G 1% /zdocs/server
zdocs/software 379G 70G 310G 19% /zdocs/software
zdocs/temp 312G 2.6G 310G 1% /zdocs/temp
zdocs/TM_Brice 215G 211G 4.0G 99% /zdocs/TM_Brice
I don't know if a bug should be submitted to some of the maintainers, for now I'd be happy with a fix that means i don't have to manually fix this at every startup or reboot...
Note: I believe the mounts happen during the import, not via the zfs-mount.service and I believe that's because mountpoints are set on the pools:
Code: Select all
# zfs get mountpoint zdocs
NAME PROPERTY VALUE SOURCE
zdocs mountpoint /zdocs local
# zfs get mountpoint zdocs/docs
NAME PROPERTY VALUE SOURCE
zdocs/docs mountpoint /zdocs/docs inherited from zdocs