![]() |
Unable to Mount NAS on New Kubuntu 20.04.1 LTS System
Hello,
I'm new to the site and excited to connect with such a resource. My system is somewhat unique. I have 2 SSDs that I can switch on using a Kingwin power panel depending on which I want to boot into. I also have a "spinner" for data. One SSD is now 18.04.5LTS and the one that is the subject of this post is my new 20.04.1LTS drive. I also have a Network Attached Storage (NAS) server in the same rack (27U scratch built, in my home office). I just upgraded my system hardware (mobo, CPU, and RAM) the OS is Kubuntu 20.04.1 LTS. As I am working through configuring the system, I find that I am unable to mount my NAS. I can ssh into the NAS, but it will not mount: Here is my /etc/fstab file for your review: Code:
# /etc/fstab: static file system information. Code:
#fstab_Mount NAS Code:
$ ./fstab-mount-nas $sudo mount -av which gets me: Code:
$ sudo mount -av |
Did you install the nfs-common package on the 20.04 system?
|
Thank you for the quick reply. To answer your question, yes i did install nfs-common after this issue showed up. Nothing changed from my perspective.
|
What about a nfs-utils package?
|
Quote:
Maybe you could try changing the script and put the full path on the mount command and try that. You also should make your shebang line " #!/bin/bash " the first line in your script. Its purpose is to execute the script with the proper interpretor and where it is located it becomes just a comment. Have you tried manually mounting the media Code:
sudo mount -t nfs 192.168.1.105:/nas /media/NAS Code:
192.168.1.105:/nas /media/NAS nfs rw,hard,noexec,noauto,user,retrans=1,retry=0 0 0 You might try removing/changing each of those mount options one at a time to see when/if the error disappears. I looked at the man pages for both fstab and nfs, and I do not see the "noexec" option anywhere in either man page. |
Quote:
Manually trying to mount the nfs share is a good suggestion. Since the error is a associated with mount it isn't a path problem i.e. versus file not found. |
Quote:
|
Is this solved then? If so, please mark this thread as solved.
|
Quote:
Okay, 1. I changed the script to put line 2 in the line 1 position. Good catch and good explanation. Thank you. 2. I removed noexec from the fstab line for /media/NAS mounting. 3. Attempting to install nfs-utils did not work. "E: Unable to locate package nfs-utils". nfs-common is installed which I already answered. So what's up with nfs-utils? Is it possible it's not in the new 20.04.1 repository yet? I booted up both systems. I can ping the NAS and I can ssh into the NAS. When I run the fstab-mount-nas script I get the following: $ sudo ./fstab-mount-nas mount.nfs: Failed to resolve server //192.168.1.105: Name or service not known. I almost forgot: As I mentioned in my original post, I maintain two SSD drives that are bootable. One is what I call the "current" version of Kubuntu which is 18.04.5LTS and the other drive, I call "New" LTS version, which is 20.04.1LTS. It's the latter I'm currently in the process of configuring. I think it's also important to understand that the fstab I'm using in 20.04 came from 18.04. I was also able to find the fstab noexec, but the definition is not applicable so I did delete it from fstab. |
Okay, I've been trying to get this issue resolved searching for a direction to take. I did remove all the options in the mount nas line except rw and I tried to mount -av with the following results:
/ : ignored /media/Data : already mounted mount.nfs: timeout set for Sun Nov 1 02:47:08 2020 mount.nfs: Failed to resolve server //192.168.1.105: Name or service not known /media/tmpdisk : already mounted Does this result shed any light on the issue? I also configured my network-manager yaml file to add nameserver addresses, but it apparently didn't make any difference. It seems that there are two parts to the problem: 1. mount.nfs fails to resolve the NAS IP address. 2. "Name or service not known" what service should be running, but isn't? I don't understand why this fstab runs perfectly on my 18.04.5 LTS system and fails so badly on a new 20.04.1 LTS system. Again, remember this 20.04.1 is a new system. I just started configuring it. I'm thinking there's some missing configuration that's causing this problem. Any ideas? |
Quote:
I now see another issue in the script that may be the real culprit. The if statement should be in the form Code:
if [ something to be tested ] ; then Your if statement posted does not include the test Code:
if ping -c1 -w3 192.168.1.105 >/dev/null 2>&1 Code:
if [ ping -c1 -w3 192.168.1.105 >/dev/null 2>&1 ] |
On my system I use nofail instead of retrans and retry. I use defaults,nofail,exec on all 3 drives I have exported as nfs and they all work. The nofail option allows the system to boot if the nfs drive isn't available, thus no need for a script. I do have an alias to mount just the nfs drives if necessary.
Code:
sudo mount -a -t nfs4 I also use nfs4 for the filesystem type instead of the plain nfs. At one time I had to use nfs3, but that went away recently with updates. I'm on Debian though, and I have no idea what Ubuntu uses. |
Quote:
BTW, for my own learning, what exactly is the test doing? If a single ping (-c1), that can take no more than 3 seconds (-w3) of the nas (what value is returned?) is that value > 0 (/dev/null/) (then 2>&1, variable 1 (&1) which, I assume is the whatever is returned from the -c1 -w3 ping). It seems to me that there's 2 tests being performed and I don't understand why. 1. is the ping > 0 [nas online = 1 (true), nas offline = 0 (false)] 2. 2>&1 ??? And why does this work perfectly when I boot the 18.04 SSD? |
Quote:
Here's the results: I changed fstab to nfs4 then I attempted your mount command (I added the v options for verbosity): $ sudo mount -av -t nfs4 / : ignored /media/Data : ignored /media/NAS : ignored /media/tmpdisk : ignored Then I changed fstab file system back to nfs and the line options to your suggested ones. Now my return message is different: $ sudo mount -av / : ignored /media/Data : already mounted mount.nfs: timeout set for Sun Nov 1 14:31:13 2020 mount.nfs: Failed to resolve server //192.168.1.105: Name or service not known /media/tmpdisk : already mounted Then I added the -t option and filesystem of nfs: $ sudo mount -av -t nfs / : ignored /media/Data : ignored mount.nfs: timeout set for Sun Nov 1 14:35:16 2020 mount.nfs: Failed to resolve server //192.168.1.105: Name or service not known /media/tmpdisk : ignored I never thought this would be such a difficult issue to solve. Thank you for the suggestions and please don't stop "swinging", I really need to get this fixed. |
Do the directories /media/Data, /media/NAS, and /media/tmpdisk exist? Can you post the exports file for the nfs server? And the present fstab for both the server and client? Things are looking somewhat strange from the error messages.
|
All times are GMT -5. The time now is 01:23 PM. |