LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 03-15-2020, 01:53 AM   #1
Thomas Korimort
Member
 
Registered: Jul 2016
Location: 2640 Enzenreith, Austria
Distribution: Debian/Raspbian
Posts: 63

Rep: Reputation: Disabled
NFS server/client issue between desktop Debian and RPi raspbian server


Hi!

I have a Raspbian Raspberry Pi 4 nfs server running with the following exports:

Quote:
/mnt/hd 192.168.1.XX(rw,no_root_squash,sync,subtree_check) 192.168.1.0/24(ro,sync,subtree_check)
/mnt/D01 192.168.1.XX(rw,no_root_squash,sync,subtree_check) 192.168.1.0/24(ro,sync,subtree_check)
/mnt/D02 192.168.1.XX(rw,no_root_squash,sync,subtree_check)
/mnt/D03 192.168.1.XX(rw,no_root_squash,sync,subtree_check)
/mnt/D04 192.168.1.XX(rw,no_root_squash,sync,subtree_check)
showmount -e 192.168.1.YY lists
Quote:
/mnt/D04 192.168.1.XX
/mnt/D03 192.168.1.XX
/mnt/D02 192.168.1.XX
/mnt/D01 192.168.1.0/24,192.168.1.XX
/mnt/hd 192.168.1.0/24,192.168.1.XX
I have a 4 disk harddisk case with currently 3 disks inside since one broke and i am waiting for the replacement. On my 192.168.1.XX Linux desktop i mount the disks in fstab via

Quote:
192.168.1.YY:/mnt/hd /mnt/hd nfs rw,auto,nofail,_netdev 0 2
192.168.1.YY:/mnt/D01 /mnt/D01 nfs rw,auto,nofail,_netdev 0 2
192.168.1.YY:/mnt/D02 /mnt/D02 nfs rw,auto,nofail,_netdev 0 2
192.168.1.YY:/mnt/D03 /mnt/D03 nfs rw,auto,nofail,_netdev 0 2
#192.168.1.YY:/mnt/D04 /mnt/D04 nfs rw,auto,nofail,_netdev 0 2
The idea is to have hd and D01 as read-only disks for my media library available on the whole network and to have all exports available rw on my desktop 192.168.1.XX. It works except one strange phenomenon: On my desktop hd,D01,D02 are mounted correctly, but D03 is simply a remount of D01. How could this have happened? As i mentioned D04 is currently out of my 4-disk-case-JBOD. On my 192.168.1.YY nfs server the drives are mounted completely correctly. On my desktop both the terminal and the GNOME file explorer show the wrong assigment, so i guess something went wrong while mounting the nfs share or while advertising and exporting it in the network.

Last edited by Thomas Korimort; 03-15-2020 at 02:02 AM.
 
Old 03-22-2020, 01:39 PM   #2
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 22,040

Rep: Reputation: 7347Reputation: 7347Reputation: 7347Reputation: 7347Reputation: 7347Reputation: 7347Reputation: 7347Reputation: 7347Reputation: 7347Reputation: 7347Reputation: 7347
I do not understand fully, but I think you have just mistyped something, somewhere...
 
Old 03-23-2020, 12:44 AM   #3
Thomas Korimort
Member
 
Registered: Jul 2016
Location: 2640 Enzenreith, Austria
Distribution: Debian/Raspbian
Posts: 63

Original Poster
Rep: Reputation: Disabled
I don't think so. I have cross-checked. The drives are actually mounted in a wrong way over the network.
 
Old 03-23-2020, 02:24 AM   #4
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 22,040

Rep: Reputation: 7347Reputation: 7347Reputation: 7347Reputation: 7347Reputation: 7347Reputation: 7347Reputation: 7347Reputation: 7347Reputation: 7347Reputation: 7347Reputation: 7347
How can it happen? You may need to mount them one by one (and by hand) to see what's happening. And I'm sure you will find something suspicious (sooner or later).
 
Old 03-23-2020, 03:34 AM   #5
Thomas Korimort
Member
 
Registered: Jul 2016
Location: 2640 Enzenreith, Austria
Distribution: Debian/Raspbian
Posts: 63

Original Poster
Rep: Reputation: Disabled
I checked /etc/mtab on my NFS client desktop and indeed for D03 it lists two mounts in a row, the D01 remount being the more bottom one and the correct D03 mount being before it. So it seems the correct /etc/fstab mount is somehow overridden. But why i do not understand. The only place that i ever mounted the disks were /etc/fstab, though once one disk broke and i placed another one into the slot instead. On the machine where the disks are attached the mounts are completely correct. So i do not understand why the client mounts are mingled up now.
 
Old 03-23-2020, 03:43 AM   #6
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 22,040

Rep: Reputation: 7347Reputation: 7347Reputation: 7347Reputation: 7347Reputation: 7347Reputation: 7347Reputation: 7347Reputation: 7347Reputation: 7347Reputation: 7347Reputation: 7347
for me 2 lines in mtab means 2 mounts. You might want to comment out it in /etc/fstab and check what's happening at the next boot. It looks like automounter is running (or ??)
 
Old 03-23-2020, 07:35 AM   #7
Thomas Korimort
Member
 
Registered: Jul 2016
Location: 2640 Enzenreith, Austria
Distribution: Debian/Raspbian
Posts: 63

Original Poster
Rep: Reputation: Disabled
Hi! I commented out in /etc/fstab the entry for D03 and after a reboot /etc/mtab had neither the correct mount line nor the other one with D01 mounted to /mnt/D03. So commenting out the mount line in fstab of D03 removed both entries from mtab after a reboot. Then i uncommented the line again and after a new reboot, again both mount lines for D03 were there again.

If i do a manual umount of D03 both lines vanish. If i do a manual mount of D03 ("mount /mnt/D03" or "mount 192.168.1.YY:/mnt/D03 /mnt/D03") only the wrong mount appears (i.e. D01 gets mounted to /mnt/D03). I guess that the data structures of the mount procedure got messed up in a completely intransparent way or maybe something is wrong on the server side?
 
Old 03-30-2020, 02:48 AM   #8
Thomas Korimort
Member
 
Registered: Jul 2016
Location: 2640 Enzenreith, Austria
Distribution: Debian/Raspbian
Posts: 63

Original Poster
Rep: Reputation: Disabled
I think i have an idea about the problem. Once i switched disks after one broke in my disc tower. Maybe the network mount client has somehow stored the old partition id somewhere and that is why it is remounting D01 and also doing an overridden mount of D03. That must be then an error on the client side.
 
Old 04-08-2020, 02:19 AM   #9
Thomas Korimort
Member
 
Registered: Jul 2016
Location: 2640 Enzenreith, Austria
Distribution: Debian/Raspbian
Posts: 63

Original Poster
Rep: Reputation: Disabled
I found some post from 2012 in another forum where someone had the same problem https://forums.opensuse.org/showthre...-folder/page2?. Reading that i think that there the problem did not get solved either. At the end someone reported that some deletion of a file on the server-side or some export option "nohide" solved the problem. I tried the nohide option and it did not change anything. I also tried to apt purge both the client side nfs-common package and the server-side nfs-kernel-server. I even purged remaining files in /var/lib/nfs and looked in other files of the installed package for information. None of that could solve the wrong filesystem mount. Since the problem was already there in 2012, maybe it resurfaced again? The person in the post had a similar problem also related to multiple NFS volumes mounted.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: GNOME 3.33.2 Released, Krita 4.2 Debuts, RPi Camera Modules on RPi Zeros Power the Penguin Watch Project, Intrinsyc Switches Its Home LXer Syndicated Linux News 0 05-30-2019 06:23 AM
LXer: Raspbian GNU/Linux upgrade from Wheezy to Raspbian Jessie 8 LXer Syndicated Linux News 1 06-09-2016 12:12 PM
LXer: Mini-PC taps RPi Compute Module and supports RPi 2 LXer Syndicated Linux News 0 02-22-2015 03:03 PM
LXer: Mozilla hopes to challenge Raspbian as RPi OS of choice LXer Syndicated Linux News 0 10-27-2014 07:50 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 09:52 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration