Slackware This Forum is for the discussion of Slackware Linux.
|
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
|
12-04-2013, 09:01 AM
|
#1
|
Senior Member
Registered: Jan 2008
Distribution: Arch/Manjaro, might try Slackware again
Posts: 1,859
|
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.
|
|
|
12-04-2013, 01:46 PM
|
#2
|
Member
Registered: Aug 2013
Distribution: Slackware 14.1
Posts: 128
Rep: 
|
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,
|
|
|
12-04-2013, 02:05 PM
|
#3
|
Senior Member
Registered: Apr 2009
Location: McKinney, Texas
Distribution: Slackware64 15.0
Posts: 3,860
|
Well, there should be something in the logs. Are you using rc.inet1 to start up your network?
|
|
|
12-04-2013, 08:27 PM
|
#4
|
Senior Member
Registered: Jan 2008
Distribution: Arch/Manjaro, might try Slackware again
Posts: 1,859
Original Poster
|
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.
|
|
|
12-05-2013, 04:13 AM
|
#5
|
Senior Member
Registered: Apr 2009
Location: McKinney, Texas
Distribution: Slackware64 15.0
Posts: 3,860
|
Quote:
Originally Posted by mostlyharmless
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.
|
12-05-2013, 08:11 AM
|
#6
|
Senior Member
Registered: Jan 2008
Distribution: Arch/Manjaro, might try Slackware again
Posts: 1,859
Original Poster
|
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?
|
|
|
12-05-2013, 01:14 PM
|
#7
|
Senior Member
Registered: Apr 2009
Location: McKinney, Texas
Distribution: Slackware64 15.0
Posts: 3,860
|
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. :-)
|
|
|
12-07-2013, 10:54 AM
|
#8
|
Senior Member
Registered: Jan 2008
Distribution: Arch/Manjaro, might try Slackware again
Posts: 1,859
Original Poster
|
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.
|
|
|
12-07-2013, 11:00 AM
|
#9
|
Member
Registered: Dec 2008
Distribution: Slackware64 Current
Posts: 278
Rep:
|
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.
|
|
|
12-07-2013, 01:42 PM
|
#10
|
Member
Registered: May 2008
Location: Republic of Texas
Posts: 393
Rep:
|
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 02:02 PM.
|
|
|
12-07-2013, 02:01 PM
|
#11
|
Member
Registered: May 2008
Location: Republic of Texas
Posts: 393
Rep:
|
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 11:23 AM.
|
|
|
12-08-2013, 08:43 AM
|
#12
|
Senior Member
Registered: Jan 2008
Distribution: Arch/Manjaro, might try Slackware again
Posts: 1,859
Original Poster
|
@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.
|
|
|
12-08-2013, 12:48 PM
|
#13
|
Member
Registered: May 2008
Location: Republic of Texas
Posts: 393
Rep:
|
Quote:
Originally Posted by mostlyharmless
...
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 12:53 PM.
|
|
|
12-08-2013, 05:12 PM
|
#14
|
Senior Member
Registered: Jan 2008
Distribution: Arch/Manjaro, might try Slackware again
Posts: 1,859
Original Poster
|
Well, bg as an option didn't work, so I'll try your kludge.
|
|
|
12-12-2013, 09:06 PM
|
#15
|
Senior Member
Registered: Jan 2008
Distribution: Arch/Manjaro, might try Slackware again
Posts: 1,859
Original Poster
|
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 06:26 PM.
|
|
|
All times are GMT -5. The time now is 03:35 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|