idmapd-mounting (/mnt/htpc) main process (457) killed

Connection sharing, Firewall, Samba..etc
Forum rules
Before you post please read this

idmapd-mounting (/mnt/htpc) main process (457) killed

Postby Clint O on Sun May 04, 2014 6:58 pm

The actual dmesg entry looks like:

Code: Select all
[    2.983433] init: idmapd-mounting (/mnt/htpc) main process (457) killed by TERM signal


I have an NFS mount in my /etc/fstab, and I was noticing it wasn't getting mounted on boot. I followed some advice and put a followup mount command in /etc/network/if-up.d, but I would like to track down the source of the message above.

The /etc/fstab entry looks like:

Code: Select all
nas:/volume1/htpc /mnt/htpc nfs4 hard,intr
Clint O
Level 1
Level 1
 
Posts: 15
Joined: Wed Apr 09, 2014 11:21 am

Linux Mint is funded by ads and donations.
 

Re: idmapd-mounting (/mnt/htpc) main process (457) killed

Postby xerion567 on Mon May 05, 2014 2:16 am

Clint O wrote:
Code: Select all
nas:/volume1/htpc /mnt/htpc nfs4 hard,intr

The intr option above is suspect. man nfs specifies that intr is only valid for nfs2 and nfs3, and furthermore is depreciated after kernel version 2.6.25.

Still, this section about initr makes me wonder:
If intr is specified, system
calls return EINTR if an in-progress NFS operation is
interrupted by a signal.

I could see something getting confused in the boot process by the EINTR value and aborting the mount.
All work and no play makes Linux a dull OS,
All work and no play makes Linux a dull OS,
All work and no play makes Linux...viewtopic.php?f=58&t=164690
User avatar
xerion567
Level 3
Level 3
 
Posts: 108
Joined: Sun Mar 30, 2014 12:38 am
Location: Colorado, USA

Re: idmapd-mounting (/mnt/htpc) main process (457) killed

Postby Clint O on Mon May 05, 2014 1:19 pm

Thanks for your reply.

I've changed the mount arguments and excluded the "intr" flag. However, after boot, this volume is not mounted, and the error message remains...

Code: Select all
nas:/volume1/htpc /mnt/htpc nfs4 hard


I tried reading elsewhere on this forum about people complaining that their NFS mounts were not working on boot and never saw anything definitive on this topic. NFS mounts used to be done way back when in /etc/rc.local, but this practice has apparently long since been deprecated on most UNIX variants.
Clint O
Level 1
Level 1
 
Posts: 15
Joined: Wed Apr 09, 2014 11:21 am

Re: idmapd-mounting (/mnt/htpc) main process (457) killed

Postby xerion567 on Mon May 05, 2014 11:12 pm

Phew! Makin' me do my homework on this one! :wink:

The short answer: try adding the _netdev mount option. Long answer, see below.

I also have an NFS server running, although I was just manually mounting it when I needed to, I decided to try and have it mount on boot to see if I came across the same problem. I also have a similar message to what you have, but look one line above the message you can see where something went wrong:
Code: Select all
[   16.367602] ADDRCONF(NETDEV_UP): eth0: link is not ready
[   16.503954] init: statd-mounting main process (496) killed by TERM signal

In other words, the system attempted to mount the network drive before it had a network.

Clint O wrote:I tried reading elsewhere on this forum about people complaining that their NFS mounts were not working on boot and never saw anything definitive on this topic. NFS mounts used to be done way back when in /etc/rc.local, but this practice has apparently long since been deprecated on most UNIX variants.


Ubuntu has moved on from the old systemV init to Upstart init. Essentially the biggest change is a move from a procedure-driven startup (init a runlevel, execute the scripts in /etc/rc#.d in order) to an event-driven startup (each startup job has a trigger condition, and then itself triggers an event that it has started). Upstart is supposed to maintain some compatibility with systemV startup procedures, but the runlevels are less significant (2-5 are essentially the same). The config files for the events are located under /etc/init.

Of special interest in our case are the files /etc/init/mountall.conf and /etc/init/mountall-net.conf. In mountall.conf, the a mountall daemon is started in response to the init event "startup", which then (I assume) tries to mount everything in /etc/fstab that isn't marked noauto. Why Ubuntu uses a daemon (one specifically written by Canonical, no less) for this instead of just issuing "mount -a" is a mystery to me.

Later on, when networking is established the init event "net-device-up" is triggered, setting the mountall-net job to work. Essentially all mountall-net does is send the signal -USR1 to the running mountall daemon. The only documentation for what this is supposed to do is in the mountall-net.conf file itself, which states:
Code: Select all
# Send mountall the USR1 signal to inform it to try network filesystems
# again.

I can only make assumptions as to what mountall considers network filesystems, so I'm taking a guess that it could be filesystems marked with the _netdev option. There is no documentation that I can find for this feature of mountall, so I guess if you really wanted to know you'd have to go through the source code. In fact, I think the entire procedure feels rather hacked together. There doesn't seem to be a way to stop mountall from trying to mount things like network file systems at startup and throwing out error messages. Very sloppy. :?

Anyways, hope this helps, let me know.

Edit: It just occurred to me you *could* perhaps make your NFS entry "noauto", and then edit the script in mountall-net.conf to manually mount the drive, to get rid of the startup error with mountall. This is probably considered really bad form though. :lol:
All work and no play makes Linux a dull OS,
All work and no play makes Linux a dull OS,
All work and no play makes Linux...viewtopic.php?f=58&t=164690
User avatar
xerion567
Level 3
Level 3
 
Posts: 108
Joined: Sun Mar 30, 2014 12:38 am
Location: Colorado, USA

Re: idmapd-mounting (/mnt/htpc) main process (457) killed

Postby Clint O on Wed May 07, 2014 2:42 am

I will look into your suggestions. In the meantime, I found something interesting in /var/log/upstart/mountall.log

Code: Select all
mount.nfs4: Failed to resolve server nas: Name or service not known
mountall: mount /mnt/htpc [568] terminated with status 3


So, I am thinking that at boot DNS isn't reliable. I'm using my router as my default DNS server, which I know is sketchy. It's possible I might need to consider making some addresses static and use a host table.
Clint O
Level 1
Level 1
 
Posts: 15
Joined: Wed Apr 09, 2014 11:21 am

Re: idmapd-mounting (/mnt/htpc) main process (457) killed

Postby xerion567 on Wed May 07, 2014 3:16 pm

Clint O wrote:I will look into your suggestions. In the meantime, I found something interesting in /var/log/upstart/mountall.log

Code: Select all
mount.nfs4: Failed to resolve server nas: Name or service not known
mountall: mount /mnt/htpc [568] terminated with status 3


So, I am thinking that at boot DNS isn't reliable. I'm using my router as my default DNS server, which I know is sketchy. It's possible I might need to consider making some addresses static and use a host table.

Well, except that you know that when you log in, the DNS is functioning reliably and the system can find the nas server. I'm more inclined to think the error message above is caused by timing, with the system attempting to access network functions before the network has even been established.

Its like calling function lay_egg() before you called function create_chicken(). :lol:
All work and no play makes Linux a dull OS,
All work and no play makes Linux a dull OS,
All work and no play makes Linux...viewtopic.php?f=58&t=164690
User avatar
xerion567
Level 3
Level 3
 
Posts: 108
Joined: Sun Mar 30, 2014 12:38 am
Location: Colorado, USA


Return to Other networking topics

Who is online

Users browsing this forum: No registered users and 5 guests