LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 12-04-2013, 10:01 AM   #1
mostlyharmless
Senior Member
 
Registered: Jan 2008
Distribution: Slackware -current (multilib) with kernel 3.16.2
Posts: 1,566
Blog Entries: 13

Rep: Reputation: 178Reputation: 178
No mount on boot for network drive 14.1


So, I have this:
Code:
192.168.1.100:/data /mnt/data nfs _netdev,rsize=8192,wsize=8192,timeo=14,intr,nolock
in my fstab, and yet I don't get the drive mounted. It works fine after boot, with mount -a. It used to work with 14.0. Any ideas on why, how to address this? I guess I could add a manual mount command to rc.local.
 
Old 12-04-2013, 02:46 PM   #2
Spect73
Member
 
Registered: Aug 2013
Distribution: Slackware 14.1
Posts: 128

Rep: Reputation: Disabled
I take it that you don't receive any errors? I'm asking mostly out of curiosity. My 14.1 disks keep signaling to me that they should be taken out of the box they came in and used. Yet, I'm somewhat hesitate to do so after reading about some of the things that don't work the same as in 14.0.

Coordially,
 
Old 12-04-2013, 03:05 PM   #3
Richard Cranium
Senior Member
 
Registered: Apr 2009
Location: Carrollton, Texas
Distribution: Slackware64 14.1
Posts: 1,568

Rep: Reputation: 462Reputation: 462Reputation: 462Reputation: 462Reputation: 462
Well, there should be something in the logs. Are you using rc.inet1 to start up your network?
 
Old 12-04-2013, 09:27 PM   #4
mostlyharmless
Senior Member
 
Registered: Jan 2008
Distribution: Slackware -current (multilib) with kernel 3.16.2
Posts: 1,566
Blog Entries: 13

Original Poster
Rep: Reputation: 178Reputation: 178
I don't see any errors in dmesg... and unfortunately I switched to using NetworkMangler (err Manager) instead of rc.inet1. I also did cat /var/log/messages | grep mount but didn't find any errors.

Just used the defaults when I installed and everything seems to work, but I wonder if it works too late. Of course in that case I should see an error message when the other devices mount.
 
Old 12-05-2013, 05:13 AM   #5
Richard Cranium
Senior Member
 
Registered: Apr 2009
Location: Carrollton, Texas
Distribution: Slackware64 14.1
Posts: 1,568

Rep: Reputation: 462Reputation: 462Reputation: 462Reputation: 462Reputation: 462
Quote:
Originally Posted by mostlyharmless View Post
I don't see any errors in dmesg... and unfortunately I switched to using NetworkMangler (err Manager) instead of rc.inet1. I also did cat /var/log/messages | grep mount but didn't find any errors.

Just used the defaults when I installed and everything seems to work, but I wonder if it works too late. Of course in that case I should see an error message when the other devices mount.
Try looking in /var/log/syslog as well as /var/log/debug.

If you look inside /etc/rc.d/rc.M, you'll see that the "mount everything" code comes after the rc.inet1 execution but before the rc.networkmanager execution. (In fact, there are a few things in between the execution of rc.inet1 and rc.networkmanager would need network access.)
 
1 members found this post helpful.
Old 12-05-2013, 09:11 AM   #6
mostlyharmless
Senior Member
 
Registered: Jan 2008
Distribution: Slackware -current (multilib) with kernel 3.16.2
Posts: 1,566
Blog Entries: 13

Original Poster
Rep: Reputation: 178Reputation: 178
Quote:
(In fact, there are a few things in between the execution of rc.inet1 and rc.networkmanager would need network access.)
Good to know; I'll have a look and put a mount statement in rc.local, and maybe an unmount in rc.local_shutdown. I wonder why there's a gap like that in rc.M?
 
Old 12-05-2013, 02:14 PM   #7
Richard Cranium
Senior Member
 
Registered: Apr 2009
Location: Carrollton, Texas
Distribution: Slackware64 14.1
Posts: 1,568

Rep: Reputation: 462Reputation: 462Reputation: 462Reputation: 462Reputation: 462
Well, you could try moving the call to rc.networkmanager in rc.M to right after the call to rc.inet1.

Pat would have answer there is such a gap, but I can't think of a good reason. That's a good reason why I'm not a Slackware maintainer. :-)
 
Old 12-07-2013, 11:54 AM   #8
mostlyharmless
Senior Member
 
Registered: Jan 2008
Distribution: Slackware -current (multilib) with kernel 3.16.2
Posts: 1,566
Blog Entries: 13

Original Poster
Rep: Reputation: 178Reputation: 178
Yeah, I figure there's a good reason, so I don't want to mess with it. Interestingly enough, when I put the command into rc.local. I didn't see anything in /var/log/syslog or /var/log/debug. I did however, on reboot see a message about the network not being ready with mount. So even at the late date of running rc.local; it wasn't quite ready yet. I hate to slow down booting with a sleep statement.... Wonder if there's some other way to delay mounting nfs without delaying everything else.
 
Old 12-07-2013, 12:00 PM   #9
tux_dude
Member
 
Registered: Dec 2008
Distribution: Slackware64 Current
Posts: 226

Rep: Reputation: 33
Could you not use autofs? Also, if you setup your inet1.conf your network will be available before the mount. This should not conflict with network manager.
 
Old 12-07-2013, 02:42 PM   #10
perbh
Member
 
Registered: May 2008
Location: Republic of Texas
Posts: 259

Rep: Reputation: 39
Well now - I just _had_ to try moving the startup of networkmanager to immediately after rc.inet1/2 - didn't expect it to work - and it didn't (so yes, I'm not gonna apply for any vacant position as maintenance 'assistant'!!)

However, you (@mostlyharmless) _could_ use ping to a known address in /etc/rc.d/rc.local before you do the nfs-mount - at least that would allow you to do it just as soon as the network is available ... maybe something like this:
Code:
while true; do
  ping -c 1 -W 1 8.8.8.8 >/dev/null 2>/dev/null && break
done
# do the nfs-mount
of course - if your network's screwed up - you'll be looping forever - might want to have a counter (say 10) in there ...

Last edited by perbh; 12-07-2013 at 03:02 PM.
 
Old 12-07-2013, 03:01 PM   #11
perbh
Member
 
Registered: May 2008
Location: Republic of Texas
Posts: 259

Rep: Reputation: 39
OK - let me try to make it all somewhat neater - so we are still speaking of 'at the end of /etc/rc.d/rc.local' ...
Code:
if true; then
  loopc=10
  host=192.168.1.100
  echo ":: waiting for network to be available ..."
  while test $loopc -gt 0; do
    ping -c 1 -W 1 $host >/dev/null 2>/dev/null && {
      mount -t nfs -o _netdev,rsize=8192,wsize=8192,timeo=14,intr,nolock $host:/data /mnt/data && \
        echo ":: /mnt/data successfully mounted"
        break
    }
    let loopc-=1
  done
  test $loopc -eq 0 && echo "-- host $host not reachable"
  unset loopc host # the environmentalists will love us!
fi

another suggestion - you could do the nfs-mount with the 'bg'-option?
(edit: changed a typo in line #5 incase others use it ...)

Last edited by perbh; 12-16-2013 at 12:23 PM.
 
Old 12-08-2013, 09:43 AM   #12
mostlyharmless
Senior Member
 
Registered: Jan 2008
Distribution: Slackware -current (multilib) with kernel 3.16.2
Posts: 1,566
Blog Entries: 13

Original Poster
Rep: Reputation: 178Reputation: 178
@perbh

Thanks for your suggestion. I'll try the bg option, though I already added the _netdev option under the impression that it would solve the problem. I admire your script greatly, however, it seems a bit baroque for my tastes. In a word, and I mean this sincerely with the highest regard, it's a kludge.

@tux_dude

I was wondering whether I should try rerunning pkgtool to just use inet1 like I always used to. Still, the installation gave me a choice, and the network works by login, so perhaps this is an issue for the maintainers to address in 14.2 or something.
 
Old 12-08-2013, 01:48 PM   #13
perbh
Member
 
Registered: May 2008
Location: Republic of Texas
Posts: 259

Rep: Reputation: 39
Quote:
Originally Posted by mostlyharmless View Post
...
it's a kludge.
...
*lol* and I heartily agree - it's a kludge, but ... it may solve a problem.
To my simple mind of thinking - rc.local is the one place where I can actually _do_ things - anywhere else and you will sooner or later be clobbered. Personally, I use it a lot - like checking if any extra (known - like in their uuid) disks are connected and then mount them at their appropriate place. I find that far better than some udev-rule(s) that will do the same - call me old-fashioned, but it works and it's simple (kiss)

I can give another example where it comes in handy - I have a huge usb-drive which is mounted on /pub and is used by samba (and nfs-mounted) making it available to every darn computer in the house. If that particular drive is not present at boot-time, the /pub-directory is deleted, samba is stopped and there is no nfs-mount. If it just was not mounted - both samba and nfs would happily use the /pub-directory, causing the root-fs to fill up in no time at all.

Last edited by perbh; 12-08-2013 at 01:53 PM.
 
Old 12-08-2013, 06:12 PM   #14
mostlyharmless
Senior Member
 
Registered: Jan 2008
Distribution: Slackware -current (multilib) with kernel 3.16.2
Posts: 1,566
Blog Entries: 13

Original Poster
Rep: Reputation: 178Reputation: 178
Well, bg as an option didn't work, so I'll try your kludge.
 
Old 12-12-2013, 10:06 PM   #15
mostlyharmless
Senior Member
 
Registered: Jan 2008
Distribution: Slackware -current (multilib) with kernel 3.16.2
Posts: 1,566
Blog Entries: 13

Original Poster
Rep: Reputation: 178Reputation: 178
Well tried it, and got an error
Code:
line 5: test: loopc: integer expression expected
changed line5 loop to $loop
seems to work now

[EDIT] rebooted, still times out or something, all I know is that it doesn't get mounted

Last edited by mostlyharmless; 12-15-2013 at 07:26 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
mount a network drive joro123 Linux - Newbie 14 10-06-2013 06:19 AM
cant seem to mount a network drive on boot up linux hates me Linux - Networking 2 06-10-2009 02:22 AM
auto mount a network drive at boot Dr Gutiemouth Linux - Newbie 14 02-27-2005 02:32 PM
How do I mount a Network Drive surfduke Suse/Novell 1 01-21-2005 10:17 AM
How do i mount a network drive? yenonn Linux - Networking 1 03-10-2003 02:57 AM


All times are GMT -5. The time now is 02:12 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration