View previous topic :: View next topic |
Author |
Message |
pmam Veteran
Joined: 30 Dec 2013 Posts: 1145
|
Posted: Sat Apr 26, 2014 10:31 pm Post subject: How enable NFS service for Systemd? |
|
|
Hi,
Please let me know how to enable NFS service in Systemd machine -
I mean instead of '/etc/init.d/nfs start'? _________________ “You can take our property, our sweet homes, even our cloths...
But don't touch the streets, Ah, That's NO, NO, NO!
The streets are our @world's compilable kernel ...” |
|
Back to top |
|
|
keet Guru
Joined: 09 Sep 2008 Posts: 574
|
Posted: Sun Apr 27, 2014 4:47 pm Post subject: |
|
|
Per the Gentoo systemd documentation, it would be something along the lines of 'systemctl enable servicename' (to make it run at startup) or 'systemctl start servicename' (to start it right away). The list of services should be in /usr/lib/systemd/system. You might also need to start rpc-idmapd.service and rpc-mountd.service. |
|
Back to top |
|
|
pmam Veteran
Joined: 30 Dec 2013 Posts: 1145
|
Posted: Sun Apr 27, 2014 6:34 pm Post subject: |
|
|
Keet Hi,
Quote: | 'systemctl enable servicename' (to make it run at startup) or 'systemctl start servicename' (to start it right away |
Yes, I know how to enable and to start service in Systemd machine -
but I do not know what are the services that replace /etc/init.d/nfs start in openRC machine.
However, you gave me a good start - you pointed me out to /usr/lib/systemd/system - I missed it in Gentoo Systemd documentation -
it is really a global available services, and important to know it!
As you mentioned: Quote: | You might also need to start rpc-idmapd.service and rpc-mountd.service. |
OK - And I assume that nfsd.service also needed - But where do I find the exact needed services for NFS?
Thanks _________________ “You can take our property, our sweet homes, even our cloths...
But don't touch the streets, Ah, That's NO, NO, NO!
The streets are our @world's compilable kernel ...” |
|
Back to top |
|
|
pmam Veteran
Joined: 30 Dec 2013 Posts: 1145
|
Posted: Mon Apr 28, 2014 6:47 am Post subject: |
|
|
Keet Hi,
Quote: | You might also need to start rpc-idmapd.service and rpc-mountd.service. |
I found rpc-mountd.service but not rpc-idmapd.service -
Maybe rpc-statd.service or rpcbind.service, or both of them?
Thanks _________________ “You can take our property, our sweet homes, even our cloths...
But don't touch the streets, Ah, That's NO, NO, NO!
The streets are our @world's compilable kernel ...” |
|
Back to top |
|
|
pmam Veteran
Joined: 30 Dec 2013 Posts: 1145
|
Posted: Thu May 01, 2014 1:40 pm Post subject: |
|
|
Hi,
I found the relevant services for NFS/Systemd: nfsd, rpc-mountd, rpc-statd, rpcbind and followed NFS Wiki,
and now can see and share home directory of my machine (server) from my SAT TV receiver (client).
However - I do not know why can not see and share directories between two Linux machines - One is Gnome/Systemd and the other is KDE/openRC??
Maybe something missing regarding the configuration of Server and Client - Should I define one machine as a Server and the other as Client, or both of them can be Server and Client? Actually, each machine sometime is Server and sometime is Client - Right?
As far as I know, when NFS is working I can see and transfer files between Linux machines by enter the 'Network' in Dolphin - Right? Or there is another way to do it? _________________ “You can take our property, our sweet homes, even our cloths...
But don't touch the streets, Ah, That's NO, NO, NO!
The streets are our @world's compilable kernel ...” |
|
Back to top |
|
|
keet Guru
Joined: 09 Sep 2008 Posts: 574
|
Posted: Sat May 03, 2014 10:50 pm Post subject: |
|
|
Quote: | I do not know why can not see and share directories between two Linux machines. |
How are you trying to see them? Can you mount it using something like this?
Code: | mount -v server:path mountpoint |
The verbose switch might help show what is going wrong, if something does go wrong. Once you have it working here, using the basic command, you can know that it's working in general, and then see whether G.U.I. programs work. |
|
Back to top |
|
|
pmam Veteran
Joined: 30 Dec 2013 Posts: 1145
|
Posted: Sun May 04, 2014 11:57 am Post subject: |
|
|
Dear Keet,
I followed this https://wiki.gentoo.org/wiki/NFSv4 and I really have 'mounting issue' -
In the Client part of this Wiki there a line to add to etc/fstab: Code: | server:/ /mnt nfs rw,_netdev,auto 0 0
| - When I add the line with my server name: Code: | mg_host:/ /mnt nfs rw,_netdev,auto 0 0 |
I get a mounting ERROR during booting. If my server name is : mg_host (the other one is: mg_6300) - What is the right way to enter this line?
The same question regarding your suggestion: Code: | mount -v server:path mountpoint | -
When hit this command I get the following error: Code: | mount -v mg_host:/home /home
mount.nfs: Failed to resolve server mg_host: Name or service not known | and when trying mounting to other machine:
Code: | mount mg_6300:/home /home
mount.nfs: Failed to resolve server mg_6300: Name or service not known |
I do not have experience with mounting commands, so please let me know how exactly I need to write this command -
considering my server name and the directories according the Wiki.
I do know that mounting is important issue in Linux but I still do no figure out it deeply -
I would appreciate if you give a few words about: Why we need it?
Sorry for the fundamental question but I feel it is important to know...
Thanks _________________ “You can take our property, our sweet homes, even our cloths...
But don't touch the streets, Ah, That's NO, NO, NO!
The streets are our @world's compilable kernel ...” |
|
Back to top |
|
|
keet Guru
Joined: 09 Sep 2008 Posts: 574
|
Posted: Sun May 04, 2014 1:21 pm Post subject: |
|
|
I would try using the I.P. address first, since it seems to be having trouble resolving the hostname. If that works, then make sure that /etc/hosts is configured correctly for your hostnames.
This is one of my lines from fstab. I set it up a while ago, and have not switched to the N.F.S. 4 way of doing it:
Code: | myserver:/usr/portage/distfiles /usr/portage/distfiles nfs rw,noauto,nolock,nfsvers=3 0 0 |
I actually just switched from systemd back to init/openrc, and I had a bit of trouble setting up N.F.S., myself. I thought that the three services above (nfsd, rpc-mountd, and rpc-statd) were the right ones (https://wiki.archlinux.org/index.php/NFS also mentions them), but maybe I am missing one. |
|
Back to top |
|
|
pmam Veteran
Joined: 30 Dec 2013 Posts: 1145
|
Posted: Sun May 04, 2014 2:03 pm Post subject: |
|
|
Dear Keet,
Here are the outputs with IP - My IP is: 10.0.0.6:
Code: | mount -v 10.0.0.6:/home /home
mount.nfs: timeout set for Sun May 4 16:51:32 2014
mount.nfs: trying text-based options 'vers=4,addr=10.0.0.6,clientaddr=10.0.0.6' | and from me machine to other machine:
Code: | mount -v 10.0.0.7:/home /home
mount.nfs: timeout set for Sun May 4 16:52:17 2014
mount.nfs: trying text-based options 'vers=4,addr=10.0.0.7,clientaddr=10.0.0.6' |
What these outputs says - Is it ok and there is a problem with host name?
You had problem with Systemd... I have two machines: one with Systemd and the other with openRC - But the same problem -
As I said earlier, I can see and mount and share from my SAT TV receiver with NFS (with Samba I see the directories but can not mount and share) -
However, do not see and share between machines on the same LAN.
EDIT: You are right I had a mistake with my host name Here is the right mount:
Code: | mount -v mg_e2180:/home /home
mount.nfs: timeout set for Sun May 4 17:10:11 2014
mount.nfs: trying text-based options 'vers=4,addr=10.0.0.6,clientaddr=10.0.0.6' |
Thanks _________________ “You can take our property, our sweet homes, even our cloths...
But don't touch the streets, Ah, That's NO, NO, NO!
The streets are our @world's compilable kernel ...” |
|
Back to top |
|
|
keet Guru
Joined: 09 Sep 2008 Posts: 574
|
Posted: Sun May 04, 2014 7:42 pm Post subject: |
|
|
The output itself looks ok. I see the same output, and it mounts the directories fine. If it's not mounting them for you, what is your firewall configuration? Maybe it's blocking something.
By the way, thanks for your post. I switched to N.F.S. 4, and it seems to be working for me. |
|
Back to top |
|
|
pmam Veteran
Joined: 30 Dec 2013 Posts: 1145
|
Posted: Sun May 04, 2014 8:12 pm Post subject: |
|
|
Dear Keet,
First, I am glad to hear that you upgraded to NFS4 - Nice to know that I contributed something to the @world
Regarding Firewall... WOW - I did not even think about it - I really did not configure anything -
Does any Firewall configuration is including in the default Gentoo's installing? If yes - Probably you find something critical.
How can I check the firewall status?
Thanks _________________ “You can take our property, our sweet homes, even our cloths...
But don't touch the streets, Ah, That's NO, NO, NO!
The streets are our @world's compilable kernel ...” |
|
Back to top |
|
|
keet Guru
Joined: 09 Sep 2008 Posts: 574
|
Posted: Sun May 04, 2014 8:17 pm Post subject: |
|
|
By default, Gentoo doesn't come with a firewall (I think). If you haven't set one up, then it's probably not a concern. For me, I use a rather restrictive iptables setup, so it became a problem for me when I was setting up nfs (among other things). If you haven't enabled one, then it's probably not a concern. |
|
Back to top |
|
|
pmam Veteran
Joined: 30 Dec 2013 Posts: 1145
|
Posted: Mon May 26, 2014 11:34 am Post subject: |
|
|
Dear Keet,
With your helping tips (and others...) I succeeded to mount as a client to NFS server -
But there are some issues as I write down in this topic:
https://forums.gentoo.org/viewtopic-t-989430-highlight-.html
Please take a look and let mo know if you have any tip.
Thanks _________________ “You can take our property, our sweet homes, even our cloths...
But don't touch the streets, Ah, That's NO, NO, NO!
The streets are our @world's compilable kernel ...” |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|