Can not mount from to nfs server

Asked by Gerlof Brinck

My computer worked under Ubuntu 16.04 with a HDD (500GB). I also used this computer as NFS-server for my other Ubuntu computers. So far so good. To speed up my computer I installed on my computer (the one I also use as a nfs-server) a SSD formatted in Ext4 in the with Ubuntu 18.04, with a root / mounting point on the SSD.

The HDD with used to be my master disk, in de BIOS I changed it in the second disk. On that disk I changed the mounting point / into /home. The computer self changed the name mountingpoint from home into: 9a6d5dc8-ca20-410f-b750-fcf0a1ae0f3b

In the old situation the script was:

sudo mount 192.168.178.49:/home/ media/nfsserver

Worked fine.

Now I have the two disks sda1 (the HDD) and sdb1 (the SSD).
I have changed nothing on the HDD except to ad the mounting point as described here above. I just want to connect to the home et cetera.

The HDD is now mounted to /media/gerlof/9a6d5dc8-ca20-410f-b750-fcf0a1ae0f3b

When I try to mount my other Dell Ubuntu computer as a client to the NFS server I have changed the script from

sudo mount 192.168.178.49:/home/ media/nfsserver

to:

sudo mount 192.168.178.49:/dev/sda1/home /media/nfsser

When I try to mount up I get:
mount.nfs: access denied by server while mounting 192.168.178.49:/dev/sda1/home

When I change home into the 9a6d5dc8-ca20-410f-b750-fcf0a1ae0f3b
The reaction is the same, access denied by server.

I hope someone can help me out in this one.

Many thanks beforehand.

Gerlof.

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
Manfred Hampl
Solved:
Last query:
Last reply:
Revision history for this message
Gerlof Brinck (brinck) said :
#1

I have found out that I have to make a mountingpoint in the fstab so I did.
Under dev/sda1:
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc nodev,noexec,nosuid 0 0
# / was on /dev/sda1 during installation
UUID=9a6d5dc8-ca20-410f-b750-fcf0a1ae0f3b /media/9a6d5dc8-ca20-410f-b750-fcf0a1ae0f3b ext4 errors=remount-ro,auto,exec,rw,user 0 0
# swap was on /dev/sda5 during installation
UUID=f18ad6a5-711d-4191-aaa9-bff09e3d42fb none swap sw 0 0

On the client I have made the directory: /media/9a6d5dc8-ca20-410f-b750-fcf0a1ae0f3b

When I try to make contact from the client to the server I got:
gerlof@gerlof-Inspiron-15-3552:~$ sudo mount 192.168.178.49:/dev/sda1/media/9a6d5dc8-ca20-410f-b750-fcf0a1ae0f3b
mount: 192.168.178.49:/dev/sda1/media/9a6d5dc8-ca20-410f-b750-fcf0a1ae0f3b: can't find in /etc/fstab.

Where do I go wrong?

Many thanks for your help beforehand

Gerlof.

Revision history for this message
ealthuis (ealthuis) said :
#2

Take a look at question 676091.
I told about my setup and if you like that, send me an email, then I will help you set up a simple and easy way to mount your partitions and/or folders.

Revision history for this message
Gerlof Brinck (brinck) said :
#3

First of all a happy New Year!!
Thank for your answer. I have looked for question 676091, sorry to say but I can not find it.

But if you will help me to set up a simple and easy way to mount to my partitions it will be very much appreciated!

Many thanks beforehand!!

Gerlof

Revision history for this message
Best Manfred Hampl (m-hampl) said :
#4

If you have created a mount point on the server (e.g. in the /media directory)
(/etc/fstab entry: UUID=9a6d5dc8-ca20-... /media/9a6d5dc8-ca20-...)
then you have to use that mount point as nfs export and refer to the same name from the clients.

i.e
sudo mount 192.168.178.49:/dev/sda1/media/9a6d5dc8-ca20-...
is wrong and probably has to be changed into
sudo mount 192.168.178.49:/media/9a6d5dc8-ca20-...

(You cannot access the contents of a file system by addressing it as /dev/sda1/whatevername)

Revision history for this message
Gerlof Brinck (brinck) said :
#5

Thanks Manfred Hampl, that solved my question.