PSA: if your ubuntu VM's wont automount CIFS on cold boot, disable spanning-tree on the bridge

This is mainly going to be for the search engines for people that come across a similar issue in the future.

I spent HOURS messing with this. trying to get CIFS shares to auto mount in the /etc/fstab. mounting shares would work fine if I did ‘mount -av’, they would also auto mount correctly if I started a VM then rebooted it … but auto mount would fail 100% of the time on a cold boot of the VM.

Long story short, the problem is spanning-tree on the truenas bridge.

errors you might get on the auto mount just indicate network problems.
“failed to mount”. You might see return code -4, you might see 113, you might see 112.
They are all the same problem. Trust me, I replicated this with vanilla ubuntu installs on 22.04 and 24.04.

Following this guide: Configure Advanced Bridge Options (spanning tree, etc) | TrueNAS Community

run this command in the truenas shell

midclt call interface.update <your-bridge-name-here> '{"stp": false}'

your bridge name is very likely going to be br0, but it could be something else.
And don’t forget to reboot truenas.

As soon as I implemented this change and reboot, all my VM’s would auto mount on cold boot 100% of the time. Hope this helps someone else and saves them the 4+ hours I spend chasing this down.

1 Like