Mount smb shares at once like in Gnome Files (in fstab?)

Hi,
when I open Files in Gnome and go to network, I see my truenas there:
smb://truenas.local:445/ and when I connect with samba user credentials I see basically all my shares under the root dataset in truenas. E.g. I have /videos or /data and then I can go in each share like its local filesystem.
But I don’t know how to mount this via fstab so that I can do the same. If I try the url above (truenas.local) it doesn’t work (CIFS: VFS: Malformed UNC in devname) because the root is not a share. I also tried with ip (//192.168.1.50) but that also doesn’t work I would have to add all shares separately (//192.168.1.50/videos, …etc) which is not very convenient to do each time I will add another share.
Can I somehow do what the Files app does in fstab? Thank you

Best way to do this is not to have separate datasets and instead have one dataset to rule them all and simply use directories to segment your data. You can nest datasets within a single share but it’s generally discouraged unless absolutely needed.

1 Like

No. Because share enumeration response is not a share. What the gnome client is doing behind the scenes is it’s sending a remote procedure call to the SMB server to list out all of its shares and then it’s presenting the list like it’s a filesystem path (when it’s not).

I see, the thing is that I have datasets for applications like jellyfin and then general dataset for data. I will then add each separately, because I want to keep the structure. Thank you :slight_smile:

Ahaa, got it. Thank you at least now I understand it better :slight_smile: