How to Automount NAS Shares

I am new to Tumbleweed and KDE and want to set it up so that my NAS share folders automount when I start up my computer. Any help would be greatly appreciated. thanks!

Welcome on the forum.

What you want is quite possible but how to do it (best) depends on how the NAS is connected. Can you share how you connect the NAS by hand? Please share the commands you issue or if you do it via the GUI give a detailed description.

automount can be done with /etc/fstab, network drives via auto.master en for more exotic things a script can work.

1 Like

You’ve posted to the wrong subforum. This is ‘Forums Feedback’. I will move it to ‘Network/Internet’.

Hello @pgjersvik ,

The easiest and most common way to do this to create the appropriate entry in /etc/fstab. Type “man fstab” from the cli for more detail.

A basic fstab entry that mounts a local resource, such as “/home” or “/boot” looks like:

/dev/mapper/cr_home /home ext4 data=ordered,discard 0 2

OR

UUID=d366b622-ad5b-43c5-837a-59f2bbfc8d42 /boot ext4 data=ordered 0 2

Basically, you want to do the same thing for your network resource. Assuming that your NAS uses SMB (aka cifs, aka windows networking), your entry will look something like:

//NAS_NAME/SHARED_FOLDER_NAME /mnt/SHARED_FOLDER_MOUNT_POINT cifs,user=NAME,password=PASSWD,nofail 0 0

The exact mount options (the comma separated list beginning with cifs) you need will depend on the box that is sharing the folder.

For network mounts, I highly recommend using either the “nofail” or “noauto” option. With “nofail”, your computer will still boot even if the network resource is unavailable at boot time. With “noauto”, the resource will not be mounted until you need it. You might want to use “x-gvfs-show”, which will clearly show the mount in a graphical file managers side bar. Not all file managers will respect this option.

With out knowing more about your setup, that is the best I can do for quick answer. Hopefully, it will get you started.

Cheers!

Note: each “fstab” entry must be on 1 line, in spite of how the examples look with word wrap.

Shouldn’t you first ask the the OP what the NAS serves as protocol before you elaborate on something that might be off topic? :wink:

@hcvv, I agree with you in spirit, but that assumes that the OP knows. When I am trying to figure out something, I always find examples helpful, even bad examples … a little something to point me in the right direction when I don’t have a clue where to begin.

A difficult aspect of being “new” to anything is that you might not yet know enough to ask the right question, or to ask the question correctly.

From what little I know from some NAS shopping I did a while back, it seems most NAS boxes cater primarily to windows users. For example, I don’t think I looked at a singe device that advertised support for NFS, which is what I would prefer.

You may be right, but my experience here is that often on vague problem descriptions, people do not try to find out what the real problem is, but they pick on one (half) sentence of the first post and then hang on there a long answer to what they think the problem is. When you then have three or four of those complete different helpful answer to three or four different assumed problems, I guess the OP will only be very confused. And I mostly then leave the thread because I guess it is ir-repairable. :frowning:

1 Like

@hcvv, I really don’t mind just throwing spaghetti at the wall to see what sticks … in some sense … it is the essence of happy hacking :smile:

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.