Automount block device inside container / fstab not working

fwiw I solved the problem by creating a systemd mount file for my device. The core issue seems to be with systemd-fstab-generator which is in charge of creating necessary mount unit files from fstab and is not working.

In my case I added the following to /etc/systemd/system/nethomes.mount:

[Unit]
Description=Mount NetHomes ZVOL

[Mount]
What=/dev/zd0p1
Where=/nethomes
Type=ext4
Options=defaults,usrquota

[Install]
WantedBy=multi-user.target

I then enabled it with systemctl enable nethomes.mount and after restarting the container the zvol was correctly mounted. Please note, the filename must match your mountpoint to work.

I referred to these two links to figure out systemd stuff (I’m completely new to it):

hope this helps somebody until the bug is fixed