Fix: Minio refuses to start with mounted ZFS sub filesystems

If you’re having the issues like this, or this, or this, you can work around it using UnionFS.
For me, I have a /home/minio folder, and I run an older version of minio in FS mode, on ZFS. When I moved to a new zpool, I setup sub filesystems for different projects in my minio fs, causing it not to start.
The fix is easy:
# assuming /home/minio is the location of your minio data and sub-filesystems
apt-get install unionfs-fuse
# make somewhere to mount the unionfs
mkdir /home/minio-unionfs
# stop anything actually writing in this folder if it's not yet mounted
chattr +i /home/minio-unionfs
# mount the /home/minio folder RW /home/minio-unionfs
unionfs-fuse /home/minio=RW /home/minio-unionfs
# make the mount survive reboots - add to /etc/fstab
echo "/home/minio=RW /home/minio-unionfs fuse.unionfs options 0 0" >> /etc/fstabThat is it. Just don’t forget to change your minio config for the data dir to /home/minio-unionfs.






