Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Running /etc/rc.d/nfsd onestart complains about $mountd not enabled

5 views
Skip to first unread message

Adrian Christiansen

unread,
Jul 18, 2015, 3:36:59 PM7/18/15
to
Hi!

Just noticed this running 7.0_RC1:
# /etc/rc.d/nfsd onestart
/etc/rc.d/nfsd: WARNING: $mountd is not enabled.
This warning is from required_vars="mountd rpcbind", switching places
gives a waring about $rpcbind instead.

I guess the "one" option only ignores looking in rc.conf for the daemon called?

Forcestart always works but doesn't seem like the proper way it should
be done. I'd like to know more about this since I'm probably doing
something bad/wrong.

Cheers!,
Adrian.

--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-...@muc.de

Eric Haszlakiewicz

unread,
Jul 18, 2015, 3:52:32 PM7/18/15
to
On July 18, 2015 3:36:41 PM EDT, Adrian Christiansen <adrian.ch...@gmail.com> wrote:
>Just noticed this running 7.0_RC1:
># /etc/rc.d/nfsd onestart
>/etc/rc.d/nfsd: WARNING: $mountd is not enabled.
>This warning is from required_vars="mountd rpcbind", switching places
>gives a waring about $rpcbind instead.
>
>I guess the "one" option only ignores looking in rc.conf for the daemon
>called?
>
>Forcestart always works but doesn't seem like the proper way it should
>be done. I'd like to know more about this since I'm probably doing
>something bad/wrong.

Try editing /etc/rc.conf and add lines for mountd=yes and rpcbind=yes

Eric

Adrian Christiansen

unread,
Jul 18, 2015, 4:19:10 PM7/18/15
to
Yes, that would work. But I just want to run nfsd from time to time
when I'm copying files.

William A. Mahaffey III

unread,
Jul 18, 2015, 5:49:40 PM7/18/15
to
On 07/18/15 14:42, Adrian Christiansen wrote:
> Hi!
>
> Just noticed this running 7.0_RC1:
> # /etc/rc.d/nfsd onestart
> /etc/rc.d/nfsd: WARNING: $mountd is not enabled.
> This warning is from required_vars="mountd rpcbind", switching places
> gives a waring about $rpcbind instead.
>
> I guess the "one" option only ignores looking in rc.conf for the daemon called?
>
> Forcestart always works but doesn't seem like the proper way it should
> be done. I'd like to know more about this since I'm probably doing
> something bad/wrong.
>
> Cheers!,
> Adrian.


Having messed around w/ this in the last *48 hrs* you need rpcbind &
mounted both running. You will need to add lines in rc.conf as someone
else suggested, & unless you then do a reboot, you will need to manually
start rpcbind & then mountd, & then nfsd. You should be good to go then,
I was. YMMV & all that rot. BTW:


[wam@4256EE1, ~, 4:54:34pm] 249 % uname -a
NetBSD 4256EE1.CFD.COM 6.1.5 NetBSD 6.1.5 (GENERIC) amd64
[wam@4256EE1, ~, 4:54:36pm] 250 %

--

William A. Mahaffey III

----------------------------------------------------------------------

"The M1 Garand is without doubt the finest implement of war
ever devised by man."
-- Gen. George S. Patton Jr.

William A. Mahaffey III

unread,
Jul 18, 2015, 5:52:32 PM7/18/15
to
On 07/18/15 15:25, Adrian Christiansen wrote:
> Yes, that would work. But I just want to run nfsd from time to time
> when I'm copying files.
>
> 2015-07-18 21:52 GMT+02:00 Eric Haszlakiewicz <e...@nimenees.com>:
>> On July 18, 2015 3:36:41 PM EDT, Adrian Christiansen <adrian.ch...@gmail.com> wrote:
>>> Just noticed this running 7.0_RC1:
>>> # /etc/rc.d/nfsd onestart
>>> /etc/rc.d/nfsd: WARNING: $mountd is not enabled.
>>> This warning is from required_vars="mountd rpcbind", switching places
>>> gives a waring about $rpcbind instead.
>>>
>>> I guess the "one" option only ignores looking in rc.conf for the daemon
>>> called?
>>>
>>> Forcestart always works but doesn't seem like the proper way it should
>>> be done. I'd like to know more about this since I'm probably doing
>>> something bad/wrong.
>> Try editing /etc/rc.conf and add lines for mountd=yes and rpcbind=yes
>>
>> Eric
>>

You can use automount (amd) to sporadically, temporarily mount stuff, I
am not sure if iit needs nsfd going to work or not. I would think not,
but not sure on that one. I have both nfsd (& mountdc & rpcbind) & amd
going, but I want both import & export.

--

William A. Mahaffey III

----------------------------------------------------------------------

"The M1 Garand is without doubt the finest implement of war
ever devised by man."
-- Gen. George S. Patton Jr.


Greg Troxel

unread,
Jul 18, 2015, 9:28:47 PM7/18/15
to

Adrian Christiansen <adrian.ch...@gmail.com> writes:

[top-posting repaired]

> 2015-07-18 21:52 GMT+02:00 Eric Haszlakiewicz <e...@nimenees.com>:
>> On July 18, 2015 3:36:41 PM EDT, Adrian Christiansen <adrian.ch...@gmail.com> wrote:
>>>Just noticed this running 7.0_RC1:
>>># /etc/rc.d/nfsd onestart
>>>/etc/rc.d/nfsd: WARNING: $mountd is not enabled.
>>>This warning is from required_vars="mountd rpcbind", switching places
>>>gives a waring about $rpcbind instead.
>>>
>>>I guess the "one" option only ignores looking in rc.conf for the daemon
>>>called?
>>>
>>>Forcestart always works but doesn't seem like the proper way it should
>>>be done. I'd like to know more about this since I'm probably doing
>>>something bad/wrong.
>>
>> Try editing /etc/rc.conf and add lines for mountd=yes and rpcbind=yes

> Yes, that would work. But I just want to run nfsd from time to time
> when I'm copying files.

Well, if you just want nfsd, it seems to work, and the mountd comment is
a warning. So what's actually wrong?

Seriously, if you just want nfsd, that's fine. But NFS generally needs
the ability to get file handles to start the mount, and other stufff,
hence mountd and rpcbind. So either set rc.conf appropriately, or
onestart all the required daemons in sequence. I'm not sure what you
are suggesting should be different.

Greg Troxel

unread,
Jul 18, 2015, 9:30:27 PM7/18/15
to

"William A. Mahaffey III" <w...@hiwaay.net> writes:

> Having messed around w/ this in the last *48 hrs* you need rpcbind &
> mounted both running. You will need to add lines in rc.conf as someone
> else suggested, & unless you then do a reboot, you will need to
> manually start rpcbind & then mountd, & then nfsd. You should be good
> to go then, I was. YMMV & all that rot. BTW:

This is why I said to set those variables in rc.conf and REBOOT, but I
forgot to shout, which was perhaps a mistake, because apparently
rebooting was perceived as optional.

Yes, I know that someone who really knows what they are doing could
avoid the reboot. But typically peopple asking for help are not so
expert.....

William A. Mahaffey III

unread,
Jul 18, 2015, 10:17:43 PM7/18/15
to
As I wasn't a few days ago (not that I am now, BTW), that's why I
emphasized the manual restart of services (in order) *OR* reboot. He
could be in some situation where rebooting would be undesirable .... Who
knows ?

Robert Elz

unread,
Jul 19, 2015, 12:39:24 AM7/19/15
to
Date: Sat, 18 Jul 2015 21:28:01 -0400
From: Greg Troxel <g...@ir.bbn.com>
Message-ID: <rmid1zp...@fnord.ir.bbn.com>

| Well, if you just want nfsd, it seems to work, and the mountd comment is
| a warning. So what's actually wrong?

| I'm not sure what you are suggesting should be different.

It wasn't me, and this behaviour rarely bothers me, so it isn't important,
but I think the issue for "onestart" is that the rc.d dependancy checking
checks whether the dependency is turned on in rc.conf, where for onestart
that's generally exactly what you don't want - you don't want things just
magically starting because the system happens to have rebooted.

For onestart what should really be being checked is whether or not the
dependency is actually running, not whether or not it is marked to start at
boot. At boot time doing those checks would needlessly slow the boot
process - if it was marked to start at boot, it was started, and if not,
it was not - but that relationship isn't true for onestart.

What's more, the cost of actually checking the presence of the required
processes is negligible for the onestart case, where only one process is
being started, so we could easily afford to do it (even if it meant calling
the dependant rc.d script with the "status" arg and parsing the result).

Whether dependencies that aren't running should be automatically started
if required (using onestart) or just warned as missing is a whole other
question of course - I suspect opinions on that one will differ.

kre

Adrian Christiansen

unread,
Jul 19, 2015, 2:44:43 AM7/19/15
to
2015-07-19 5:57 GMT+02:00 Robert Elz <k...@munnari.oz.au>:
> Date: Sat, 18 Jul 2015 21:28:01 -0400
> From: Greg Troxel <g...@ir.bbn.com>
> Message-ID: <rmid1zp...@fnord.ir.bbn.com>
>
> | Well, if you just want nfsd, it seems to work, and the mountd comment is
> | a warning. So what's actually wrong?
>
> | I'm not sure what you are suggesting should be different.

Sorry for having used Linux for too long and being confused about
NetBSD. But I'm working on it!

What I wanted to happen was for nfsd's rc.d script to check if rpcbind
and mountd was running, NOT if they were marked as YES in rc.conf.
This is my laptop and I don't want it to be running nfsd all the time
on every boot.

Actually!, if you do /etc/rc.d/nfsd onestart with rpcbind=YES and
mountd=YES inside rc.conf, it will execute nfsd without rpcbind and
mountd even running! THIS IS WRONG! That is the only check done by
rc.subr, is it in rc.conf, if so I guess they are running.

You can try this too, no need to reboot.
The same goes for /etc/rc.d/nfsd start if nfs_server=YES is also in rc.conf.

>
> It wasn't me, and this behaviour rarely bothers me, so it isn't important,
> but I think the issue for "onestart" is that the rc.d dependancy checking
> checks whether the dependency is turned on in rc.conf, where for onestart
> that's generally exactly what you don't want - you don't want things just
> magically starting because the system happens to have rebooted.
>
> For onestart what should really be being checked is whether or not the
> dependency is actually running, not whether or not it is marked to start at
> boot. At boot time doing those checks would needlessly slow the boot
> process - if it was marked to start at boot, it was started, and if not,
> it was not - but that relationship isn't true for onestart.
>
> What's more, the cost of actually checking the presence of the required
> processes is negligible for the onestart case, where only one process is
> being started, so we could easily afford to do it (even if it meant calling
> the dependant rc.d script with the "status" arg and parsing the result).
>
> Whether dependencies that aren't running should be automatically started
> if required (using onestart) or just warned as missing is a whole other
> question of course - I suspect opinions on that one will differ.
>
> kre
>

From using FreeBSD and Linux this was the behaviour I was expecting
from onestart.
0 new messages