Changes to FSTAB mounting, now uses systemd?

James Crook

Well-Known Member
Jul 28, 2017
146
4
58
so i had a nice fstab which depended on a few things being mounted before the next. I'm using mergerfs and then using bind to make the location a bit easyier to remember. After a new install of proxmox 7 it seems that everything is being mounted at once, which can then cause an issue with my mergerfs and bind not working as the underlieing disks were not mounted

Code:
# <file system> <mount point> <type> <options> <dump> <pass>
/dev/pve/root / ext4 errors=remount-ro 0 1
/dev/pve/swap none swap sw 0 0
proc /proc proc defaults 0 0
/dev/disk/by-id/ata-CT1000MX500SSD1_2025E2ADEC1E-part1 /mnt/CT1000 ext4 errors=remount-ro,noatime 0 1
/dev/disk/by-label/SDA /srv/dev-disk-by-label-SDA ext4 defaults,nofail,user_xattr,noexec,usrjquota=aquota.user,grpjquota=aquota.group,jqfmt=vfsv0,acl 0 2
/dev/disk/by-label/SDB /srv/dev-disk-by-label-SDB ext4 defaults,nofail,user_xattr,noexec,usrjquota=aquota.user,grpjquota=aquota.group,jqfmt=vfsv0,acl 0 2
/dev/disk/by-label/SDF /srv/dev-disk-by-label-SDF ext4 defaults,nofail,user_xattr,noexec,usrjquota=aquota.user,grpjquota=aquota.group,jqfmt=vfsv0,acl 0 2
/dev/disk/by-label/SDE /srv/dev-disk-by-label-SDE ext4 defaults,nofail,user_xattr,noexec,usrjquota=aquota.user,grpjquota=aquota.group,jqfmt=vfsv0,acl 0 2
/dev/disk/by-label/SDG /srv/dev-disk-by-label-SDG ext4 defaults,nofail,user_xattr,noexec,usrjquota=aquota.user,grpjquota=aquota.group,jqfmt=vfsv0,acl 0 2
#bind mount points together and export below here
/srv/dev-disk-by-label-SDG:/srv/dev-disk-by-label-SDB:/srv/dev-disk-by-label-SDA:/srv/dev-disk-by-label-SDF /srv/33014de0-1b1b-49f9-8d6a-39bf0c16ea88 fuse.mergerfs defaults,allow_other,direct_io,use_ino,category.create=epmfs,minfreespace=700G 0 0
/srv/33014de0-1b1b-49f9-8d6a-39bf0c16ea88/Share /export/Share none bind,nofail 0 0

I get the following errors from syslog

Code:
Jan 27 10:51:13 pve1 systemd[1]: Mounted /srv/33014de0-1b1b-49f9-8d6a-39bf0c16ea88.
Jan 27 10:51:13 pve1 systemd[1]: export-Share.mount: Failed to make bind mount source '/srv/33014de0-1b1b-49f9-8d6a-39bf0c16ea88/Share': No space left on device
Jan 27 10:51:13 pve1 systemd[1]: Mounting /export/Share...
Jan 27 10:51:13 pve1 mount[895]: mount: /export/Share: special device /srv/33014de0-1b1b-49f9-8d6a-39bf0c16ea88/Share does not exist.
Jan 27 10:51:13 pve1 systemd[1]: export-Share.mount: Mount process exited, code=exited, status=32/n/a
Jan 27 10:51:13 pve1 systemd[1]: export-Share.mount: Failed with result 'exit-code'.
Jan 27 10:51:13 pve1 systemd[1]: Failed to mount /export/Share.

I've read a little bit about "x-systemd.requires=" but it still fails with the same message, when setting on the last entry
https://github.com/systemd/systemd/commit/3519d230c8bafe834b2dac26ace49fcfba139823

Do i need to add each disk as an entry for the fuse.mergerfs mount before, and keep the last mount with it as well ?
 
yeah, you likely need to encode those dependencies (you can take a look at the generated units with systemctl show ... to see what gets autodetected and what you need to add). man systemd-fstab-generator / man systemd.mount has all the options (but of course - using mount units directly instead of generating them via /etc/fstab is also an option ;))
 
yeah, you likely need to encode those dependencies (you can take a look at the generated units with systemctl show ... to see what gets autodetected and what you need to add). man systemd-fstab-generator / man systemd.mount has all the options (but of course - using mount units directly instead of generating them via /etc/fstab is also an option ;))
Am i showing my age then, using fstab
:teehee:
 
no, fstab is totally fine to use for things like this - just make sure to give systemd all the info it needs to properly order/.. the mounts :)
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!