USA Linux Users Group Forum Index
Log in Register FAQ Memberlist Search USA Linux Users Group Forum Index Album

[resolved]Mount, mtab, stale NFS file handle problems, ugh.
Goto page 1, 2  Next
 
Post new topic   Reply to topic   printer-friendly view    USA Linux Users Group Forum Index » All other software.
View previous topic :: View next topic  
Author Message
g33kb0ard3r
Jr. Member


Joined: 12 Jul 2024
Posts: 94
Location: Cedar Falls, IA

PostPosted: Sat Apr 11, 2024 8:38 pm    Post subject: [resolved]Mount, mtab, stale NFS file handle problems, ugh. Reply with quote

So yeah... I'm having problems.

At boot, I get:
Code:
mount: can't open /etc/mtab for writing: stale NFS file handle

along with (something along the lines of)
Code:
mount: can't open /etc/mtab for wirting: using /proc/mounts instead


conky also reports errors:
Code:
Conky: setmntent /etc/mtab: stale NFS file handle.


Also, ls reports that mtab exists in /etc, but if I try to open it (readonly Wink I don't want to screw it up any more than it already is.) it says that it is a new file.

When I try to unmount anything (usb flash drives, cameras, etc.) in thunar (file browser), I get
Code:
Device to unmount is not in /media/.hal-mtab so it is not mounted by HAL.
.
I can manually unmount it. Also, when I plug it back in, it creates a new mount point instead of using the old one, so I end up with a list of disk, disk-1, disk-2, disk-3 etc.

I have a feeling there is a simple solution to all of this, but googling it has given me no answers... Anyone have a solution, please?

P.S. I didn't have any clue where to put this... Perhaps it should have been under OS instead of Software... Sorry.



_________________
Slackware 12.2
formerly Ubuntu 8.04


Last edited by g33kb0ard3r on Sun Apr 12, 2024 7:54 pm; edited 1 time in total
Back to top
View user's profile Send private message Send e-mail
Germ
Keeper of the BIG STICK


Joined: 30 Apr 2024
Posts: 12452
Location: Planet Earth

PostPosted: Sun Apr 12, 2024 1:17 am    Post subject: Reply with quote

run lsof and you can find the processes trying to access the NFS mounts. Kill all the processes. Force the unmount then mount -a.



_________________
Laptop: Mandriva 2024 PowerPack - 2.6.33.5-0.2mnb
Desktop: Mandriva 2024 Free - kernel 2.6.33.2-1mib
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
g33kb0ard3r
Jr. Member


Joined: 12 Jul 2024
Posts: 94
Location: Cedar Falls, IA

PostPosted: Sun Apr 12, 2024 1:39 am    Post subject: Reply with quote

Could you please explain that a little bit more in detail? I'm confused.

It might be worth mentioning that I am running separate partitions for /home and /usr.



_________________
Slackware 12.2
formerly Ubuntu 8.04
Back to top
View user's profile Send private message Send e-mail
masinick
Linux Guru


Joined: 03 Apr 2024
Posts: 8615
Location: Concord, NH

PostPosted: Sun Apr 12, 2024 1:50 am    Post subject: Reply with quote

Also, the nfsd is the daemon process that runs to communicate between the NFS server and the NFS client. NFS is the Network File System. A daemon process is a lightweight process that normally sits quietly in a small, tight, infinite loop. It checks for activity at certain predefined intervals, then goes to sleep (inactive) for intervals, until it has work to do. In the case of an nfsd, it is waiting for interaction between the NFS server, where the actual disk file system lies, and the NFS client, which is the system that wants to access the disk. If either the client or server is offline (network down) or the daemon processes are stuck, they cannot communicate. Sometimes finding, killing and restarting the NFS daemon from the root account will clear up issues, but that may not be the issue at all. Diagnosis to make sure what is actually going on is needed.

What system is your server system? Presumably the system that you are using is the client system, Correct?



_________________
Brian Masinick
Distros: SimplyMEPIS
sidux - no CAPS!, antiX, Debian
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger
g33kb0ard3r
Jr. Member


Joined: 12 Jul 2024
Posts: 94
Location: Cedar Falls, IA

PostPosted: Sun Apr 12, 2024 2:09 am    Post subject: Reply with quote

Hrm... That doesn't make any sense- there are no servers involved- only a single internal disk and things plugged into usb ports.

So does the operating system somehow trick itself into thinking that the internal disk is within the network somewhere? I'm a total networking n00b trying to understand and it's just not clicking...Can you suggest any good sources where I could read about this stuff, or should I just try google (I've tried the nfs man page- doesn't really help)? I guess there really IS no substitute for face to face talking, huh?

I'm thinking that it has a lot to do with mtab in some way, but I'm not sure how. It seems like every time you think you have a firm grasp on how the operating system works something weird goes wrong, but I guess that's just how you learn to troubleshoot that part.

It looks like there isn't even a nfsd running:
Code:
bash-3.1# killall -HUP nfsd
nfsd: no process killed
bash-3.1#



_________________
Slackware 12.2
formerly Ubuntu 8.04
Back to top
View user's profile Send private message Send e-mail
masinick
Linux Guru


Joined: 03 Apr 2024
Posts: 8615
Location: Concord, NH

PostPosted: Sun Apr 12, 2024 2:12 am    Post subject: Check /etc/fstab, the file system table Reply with quote

Well, if there are no client/server interactions, yet the file system table is set up as if there are, that, to me would be the first place to look.

My file system table on Kubuntu 9.04 beta, which I am running at the moment, looks like this:

Code:
# /etc/fstab: static file system information.
#
# Use 'vol_id --uuid' 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    defaults        0       0
# / was on /dev/sda9 during installation
UUID=f4a9bd01-b70f-42eb-8ca4-29989ce697d2 /               ext4    relatime,errors=remount-ro 0       1
# none was on /dev/sda3 during installation
UUID=d80dfb7f-8d98-4627-8e6f-149aad8a75de none            swap    sw              0       0
/dev/scd0       /media/cdrom0   udf,iso9660 user,noauto,exec,utf8 0       0



_________________
Brian Masinick
Distros: SimplyMEPIS
sidux - no CAPS!, antiX, Debian
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger
masinick
Linux Guru


Joined: 03 Apr 2024
Posts: 8615
Location: Concord, NH

PostPosted: Sun Apr 12, 2024 2:14 am    Post subject: Reply with quote

Note that some new systems use a UUID to point to the file system. Older systems use a device name, such as /dev/sda5 or even older, /dev/hda5. The mount point is / for the root file system. That and a swap partition are the minimal setup, which is what this system has.



_________________
Brian Masinick
Distros: SimplyMEPIS
sidux - no CAPS!, antiX, Debian
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger
g33kb0ard3r
Jr. Member


Joined: 12 Jul 2024
Posts: 94
Location: Cedar Falls, IA

PostPosted: Sun Apr 12, 2024 2:18 am    Post subject: Reply with quote

my fstab looks like
Code:
/dev/sda5        swap             swap        defaults         0   0
/dev/sda6        /                ext3        defaults         1   1
/dev/sda7        /usr             ext3        defaults         1   2
/dev/sda8        /home            ext3        defaults         1   2
#/dev/cdrom      /mnt/cdrom       auto        noauto,owner,ro  0   0
/dev/fd0         /mnt/floppy      auto        noauto,owner     0   0
devpts           /dev/pts         devpts      gid=5,mode=620   0   0
proc             /proc            proc        defaults         0   0
tmpfs            /dev/shm         tmpfs       defaults         0   0

Anything out of the ordinary there?

I really ought to straighten that up.. I don't have a floppy drive, and I'm not sure why cdrom is commented out...

What do devpts and tmpfs do? I know proc is processes...

EDIT: Sorry for all the dumb questions, by the way.



_________________
Slackware 12.2
formerly Ubuntu 8.04
Back to top
View user's profile Send private message Send e-mail
masinick
Linux Guru


Joined: 03 Apr 2024
Posts: 8615
Location: Concord, NH

PostPosted: Sun Apr 12, 2024 2:35 am    Post subject: Reply with quote

devpts are "device points" and "tmpfs" is the temporary file system. These are relatively recent things in the life of Linux within say the past five years or so (that's an approximate guess). The /dev structure is where system devices are stored and recent kernels help to scan for devices and to configure them. There are many hotplug features (meaning plug in a device and have it recognized) that were not always features, but they have been around a while now.

No dumb questions, these are excellent questions, and to say I fully understand everything as I sit here would be misleading you. What I can do, especially if I misunderstand something or get it wrong, is that I can research, learn about things that I lack knowledge on, and with that research, improve my current understanding. Being relatively new at this, it takes time to understand what is even being said or read. Stay with it and absorb what you can at the rate that you can retain it. Over time, if you learn a bit at a time, you will find that you have learned a LOT!



_________________
Brian Masinick
Distros: SimplyMEPIS
sidux - no CAPS!, antiX, Debian
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger
g33kb0ard3r
Jr. Member


Joined: 12 Jul 2024
Posts: 94
Location: Cedar Falls, IA

PostPosted: Sun Apr 12, 2024 2:45 am    Post subject: Reply with quote

Upon thinking (and googling, which helps thinking tremendously Wink), should mtab be symlink'd to /proc/mount (which is what the machine is already using because it can't open mtab for whatever reason because somehow it doesn't exist?)?

Just a thought.



_________________
Slackware 12.2
formerly Ubuntu 8.04
Back to top
View user's profile Send private message Send e-mail
masinick
Linux Guru


Joined: 03 Apr 2024
Posts: 8615
Location: Concord, NH

PostPosted: Sun Apr 12, 2024 2:54 am    Post subject: Reply with quote

I would never have thought that mount and mtab should be connected in that way. /etc/fstab represents the input to the file system - device system mapping and mounting process. /etc/mtab represents what actually has happened when you have mounted your devices. You should never be messing with mtab - heck, it has probably been years since I have even looked at mine!

Since we began this conversation I switched distros and I am now using Debian Lenny. The Lenny file system table looks like this:

Code:
# /etc/fstab: static file system information.
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
proc            /proc           proc    defaults        0       0
/dev/sda2       /               ext3    errors=remount-ro 0       1
/dev/sda3       none            swap    sw              0       0
/dev/hda        /media/cdrom0   udf,iso9660 user,noauto     0       0


mtab looks like this:

Code:
more /etc/mtab
/dev/sda2 / ext3 rw,errors=remount-ro 0 0
tmpfs /lib/init/rw tmpfs rw,nosuid,mode=0755 0 0
proc /proc proc rw,noexec,nosuid,nodev 0 0
sysfs /sys sysfs rw,noexec,nosuid,nodev 0 0
procbususb /proc/bus/usb usbfs rw 0 0
udev /dev tmpfs rw,mode=0755 0 0
tmpfs /dev/shm tmpfs rw,nosuid,nodev 0 0
devpts /dev/pts devpts rw,noexec,nosuid,gid=5,mode=620 0 0


I usually issue either the df command or the mount command to look at my mounted files though, very rarely mtab. I would suggest focusing in a similar manner, otherwise you could get off track and miss what may actually be taking place.



_________________
Brian Masinick
Distros: SimplyMEPIS
sidux - no CAPS!, antiX, Debian
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger
masinick
Linux Guru


Joined: 03 Apr 2024
Posts: 8615
Location: Concord, NH

PostPosted: Sun Apr 12, 2024 2:56 am    Post subject: Reply with quote

Along those lines, let's return to the original issue. What is happening that you are not expecting, or what is NOT happening that you do expect to happen? What are the symptoms? Based on what I have actually seen in your files I do not see anything weird at all, so what is going on that makes you believe that there is a problem?



_________________
Brian Masinick
Distros: SimplyMEPIS
sidux - no CAPS!, antiX, Debian
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger
masinick
Linux Guru


Joined: 03 Apr 2024
Posts: 8615
Location: Concord, NH

PostPosted: Sun Apr 12, 2024 2:58 am    Post subject: Reply with quote

I am ultimately thinking that this is going to come down to a file or directory protection issue. Check the directory permissions in /media, /mnt, and /dev and make sure they are reasonable, neither too permissive nor too restrictive. Post them if you are unsure.



_________________
Brian Masinick
Distros: SimplyMEPIS
sidux - no CAPS!, antiX, Debian
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger
g33kb0ard3r
Jr. Member


Joined: 12 Jul 2024
Posts: 94
Location: Cedar Falls, IA

PostPosted: Sun Apr 12, 2024 3:03 am    Post subject: Reply with quote

Well, mtab doesn't exist and /proc/mounts is being used instead. mtab is automatically updated, correct?

Would it be possible to just create an empty mtab? Hmmm.....

I cannot unmount things from thunar (probably my main gripe). It is possible to do a umount /media/disk-1 and the flash drive (for instance- substitute any usb device in here.) is unmounted (I think.). I'm thinking that that has more to do with .hal-mtab (same thing?) than the main mtab, though. Could it be connected?

Man, reading Correct Craft forums at the same time as this- boats are WAY simpler... lol.



_________________
Slackware 12.2
formerly Ubuntu 8.04
Back to top
View user's profile Send private message Send e-mail
g33kb0ard3r
Jr. Member


Joined: 12 Jul 2024
Posts: 94
Location: Cedar Falls, IA

PostPosted: Sun Apr 12, 2024 3:08 am    Post subject: Reply with quote

/media is owner (root) read/write, group (root) read, and world read
/mnt is the same
/dev is the same

What could that have to do with it?



_________________
Slackware 12.2
formerly Ubuntu 8.04
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    USA Linux Users Group Forum Index » All other software. All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All content © 2024-2009 - Usa Linux Users Group
This forum is powered by phpBB. © 2024-2009 phpBB Group
Theme created by phpBBStyles.com and modified by Crouse