how to start nfs service
Hi!
is there an easier way to enable the nfs server than the only way I know ?
Solaris 10:
# svcs -a|grep nfs
disabledFeb_08svc:/network/nfs/cbd:default
disabledFeb_21svc:/network/nfs/server:default
disabled Feb_08svc:/network/nfs/status:default
disabled Feb_08svc:/network/nfs/nlockmgr:default
disabled Feb_08svc:/network/nfs/client:default
disabled Feb_08svc:/network/nfs/rquota:default
disabled Feb_21svc:/network/nfs/mapid:default
# svcadm enable network/nfs/status:default
# svcadm enable network/nfs/nlockmgr:default
# svcadm enable network/nfs/client:default
# svcadm enable network/nfs/rquota:default
# svcadm enable network/nfs/mapid:default
# svcadm enable network/nfs/cbd:default
...
Solaris 9:
/etc/init.d/nfs.server start
Of course I could write a shell wrapper, but this should not be the whole purpose I guess.
-- Nick
[1410 byte] By [
der_nikia] at [2007-11-26 20:37:23]

# 1
I'm not sure why yours are disabled. I've never had to do anything more than 'svcadm enable nfs/server'.What release?-- Darren
# 2
@Darren
they are disabled because I disabled them.
But anyhow, your suggestion doesn't work:
# svcadm enable nfs/server
# svcs -a|grep nfs
disabled15:49:24 svc:/network/nfs/status:default
disabled15:49:24 svc:/network/nfs/nlockmgr:default
disabled15:49:24 svc:/network/nfs/cbd:default
disabled15:49:24 svc:/network/nfs/mapid:default
disabled15:49:25 svc:/network/nfs/client:default
disabled15:50:11 svc:/network/nfs/rquota:default
offline 7:16:10 svc:/network/nfs/server:default
I would like to give you the answer what special release it is, but how do I get this info? (except SUNWCprog).
-- Nick
# 3
> @Darren
> they are disabled because I disabled them.
Uhh, why did you disable them?
In other words, if you did work to disable them, I'd expect you to do the same amount of work to re-enable them if you want to use them.
> But anyhow, your suggestion doesn't work:
It wasn't a suggestion. I was showing what to do on a normal system. But if you've intentionally stopped dependent services, that's not going to work.
> offline 7:16:10
> svc:/network/nfs/server:default[/code]
You can always ask it why it's offline
svcs -xv nfs/server
> I would like to give you the answer what special
> release it is, but how do I get this info? (except
> SUNWCprog).
Well, it's usually on the CD or what you download (like 11/06). But it should also be in /etc/release.
--
Darren
# 4
I disabled them because at first hand there was no need to use nfs - OS hardening and the like.
The situation changed, and after typing all these commands it come to my mind that there might be an easier way to start the complete nfs service, at best one singular command -
I mean, in earlier days one simple 'nfs.server start' was enough. And today? seven commands ... that's bothering.
-- Nick
# 5
I must give an example how annoying this is.
If I want to share a cdrom, it was fine to use 2 commands: 'nfs.server stop / start'
Clients could see the cdrom - fine!
And since Solaris 10 I must stop and start too many services to reach the same goal!
In that case, the nfs procedure was not simplified, far from it!
-- Nick
# 6
I know your frustration but do not blame 10. It still works the same way except you need to get used to the new system. Moving away from inet.d frustrated me at first but now I have seen the light (or drank the coolaid) and see the beauty that is svcadm, svccfg, etc...
I am trying to think of what I had to do the last time I added a share and I really think it was just add the share and mount it on the system of interest. If I did have to restart the nfs system it was simply svcadm refresh nfs/server but I cannot ever remember typing that. Anybody else have 'real' knowledge on this? I do all kinds of wild nfs shares but they are so flawless I never have to mess with it. On linux I seem to remember having to bring the server up and down all the time. Not really sure if there is a difference though.
If you are hardening I would suggest getting very comfortable with ipfilter rather than shutting down such important services. Telnet you can kill but a unix box without nfs.... I am not sure what the point of even plugging it in would be. Firewalls I guess.
From the beginning what did you do? svcadm disable nfs/server should have been the only command you needed.
# 7
> I disabled them because at first hand there was no
> need to use nfs - OS hardening and the like.
> The situation changed, and after typing all these
> commands it come to my mind that there might be an
> easier way to start the complete nfs service, at best
> one singular command -
> I mean, in earlier days one simple 'nfs.server start'
> was enough. And today? seven commands ... that's
> bothering.
I'm afraid I don't see the connection.
/etc/init.d/nfs.server stop doesn't disable all the things that you've disabled. As an example, rquotad is an inetd service on Solaris 9. So unless you're editing and huping inetd, you're not doing the equivalent. And if you are, then it's no longer one simple command.
As well, just add -r to enable any dependencies.
# svcadm enable -r nfs/server
(There is no equivalent for disable... It would be hard to understand if a dependency was needed for itself or only because it's a dependency of the service you're disabling)
--
Darren
# 8
Hi
When installing Solaris 10 11/06 it asks, do you want all the services or 'just sshd'. I think this is new.
If you go with the 'just sshd' then add services when you discover a need you get the symptoms:-
svcs -a|grep nfs
disabledMar_21svc:/network/nfs/status:default
disabledMar_21svc:/network/nfs/cbd:default
disabledMar_21svc:/network/nfs/nlockmgr:default
disabledMar_21svc:/network/nfs/mapid:default
disabledMar_21svc:/network/nfs/client:default
disabledMar_21svc:/network/nfs/rquota:default
offline11:00:05 svc:/network/nfs/server:default
Is there a simpler fix having done the 'just sshd' install?
Marc
# 9
Does the 'svcadm enable -r nfs/server' that I mentioned above not work for you?-- Darren
# 10
@Darrengotcha! I didn't take notice of the -r switch. Thanks a lot. NOW it's easy to start the nfs service. -- Nick
# 11
I just upgraded to 11/06 and my nfs share just went out the window as well. Everything looks good except I cannot get nfs/server from the disabled list. I tried the svcadm enable -r nfs/serversvcadm bit but I get no change. hmmm....
# 12
Hmmm... well I think the nfs/server is unrelated since this is not sharing but getting a share.
Here is what I get
mountall
nfs mount: mount: /bigdrive: Permission denied
nfs mount: mount: /home: Permission denied
Here is the sharetab
/home-nfsrw=bio3,root=bio3home dirs
/bigdrive-nfsrw=bio3,root=bio3bigdrive
/var/apache2-nfsrw=bio3,root=bio3apache
/root-nfsrw=bio3,root=bio3root
hosts files are good (bio3 is on both machines).
And now that I think of it the shares went down before the upgrade, they died while I was changing the hostnames. Is there something that needs to be 'cleared'? Both machines have been rebooted for other reasons.
# 13
> Hmmm... well I think the nfs/server is unrelated
> since this is not sharing but getting a share.
Perhaps you should start a new thread rather than add to this other one. The issues are not likely to be similar.
> Here is what I get
> mountall
>
> nfs mount: mount: /bigdrive: Permission denied
> nfs mount: mount: /home: Permission denied
'permission denied' is pretty specific. So NFS is running and not allowing the mount.
> Here is the sharetab
> /home-nfsrw=bio3,root=bio3home
> dirs
> /bigdrive-nfsrw=bio3,root=bio3
>bigdrive
> pache2-nfsrw=bio3,root=bio3
>apache
>-nfsrw=bio3,root=bio3root
> hosts files are good (bio3 is on both machines).
One would assume that the client appears to the server as something other than 'bio3'. Perhaps it resolves with a long name rather than a short name (and the two will not match).
When you logon to the server from the client, do a 'finger' or who or something. What does it say the client's name is?
--
Darren
# 14
Perfect. That was it, thanks Darren. I saw suggestions along those lines but they always referred to the hosts file as being the end all. I was just given internal and external DNS 'names' (finally) and that must have been the change that triggered it.
# 15
I have an issue with NFS. I cannot automount home from another server ( both solaris 10 )
NIS works fine and automount works fine from all other server ( non solaris 10 )
When I try to su to me, I get "su: No directory!" but I can su just fine on any other server ( non solaris 10 )
Does anyone have any ideas?
Thanks