Partitions on the SSD disk mounted twice

I just installed a mSATA SSD disk in my Turris Omnia. I created a partition table, and formatted two partitions. Then, I configured /etc/config/fstab to mount them:

config global
	option anon_swap '0'
	option anon_mount '0'
	option auto_swap '1'
	option auto_mount '1'
	option delay_root '5'
	option check_fs '0'

config mount
	option target '/srv'
	option enabled '1'
	option uuid 'cb35ae3d-78f8-49f9-bbbb-efbab97b4a81'

config mount
	option enabled '1'
	option uuid 'df1c2ed7-5728-4629-9d72-263bbf2b5939'
	option target '/var'

What is strange is that the disks are now mounted twice:

# mount | grep sda
/dev/sda1 on /srv type ext4 (rw,relatime,data=ordered)
/dev/sda2 on /var type ext4 (rw,relatime,data=ordered)
/dev/sda2 on /tmp/run/mountd/sda2 type ext4 (rw,relatime,data=ordered)
/dev/sda1 on /tmp/run/mountd/sda1 type ext4 (rw,relatime,data=ordered)

Changing “option enabled ‘1’” by 0 in the disk config changes nothing.

Here is the LuCI screenshot:

This problem is similar to the one described in Vfat partition always mounts to /tmp/run/mountd/sda1 - #13 by fansari - SW help - Turris forum but 1) it is not VFAT-specific 2) I do not want to disable automatic mounting, which is useful for USB keys.

1 Like

This is controlled by mountd in OpenWRT. Unfortunately it has very little in terms of options, just timeout and path to mount to. No way to ignore paths. It’s pretty un-developed and doesn’t seem to be high-priority with the OpenWRT team.

If you want to keep automount for USB, you’re going to have to deal with auto-mounting of your drives. You could always disable mountd and hand-mount usb drives when you need to use them.

The double mount doesn’t pose any serious issues, just annoying.

1 Like

Appears to be the case indeed:

https://wiki.openwrt.org/doc/uci/mountd

Sadly only two config options at present. So seems only way to stop that second mount is to turn of mountd. Oh well.