LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
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 08-03-2015, 12:11 PM   #1
Altiris
Member
 
Registered: Mar 2013
Posts: 556

Rep: Reputation: Disabled
Proper way to set up NFS on Slackware?


I want my Slackware machine to be an NFS server so clients can connect to it. I have followed this http://docs.slackware.com/howtos:net...nd_dirty_setup and it does not work, I have also read this guide, which seems to be very outdated http://docs.slackware.com/howtos:net...home_nfs_howto and so I don't think is the correct way.

I have a few ports added on my firewall, but I went as far as to allow all incoming/open all ports on iptables to see if that would solve the issue but it didnt. I have made sure rc.nfsd and rc.rpc have executable bit and are running. My /etc/export file looks like this

Code:
/mnt/1TB_Gary/Files/   192.168.18.0/24(rw,sync,root_squash,no_subtree_check,all_squash,insecure)
I also typed exportfs -a and exportfs shows this directory being exported.

On various client machines I can not connect to the NFS server, if I try to connect to the NFS server on the same machine that is hosting it I get
Code:
mount.nfs: rpc.statd is not running but is required for remote locking.
mount.nfs: Either use '-o nolock' to keep locks local, or start statd.

Last edited by Altiris; 08-03-2015 at 12:16 PM.
 
Old 08-03-2015, 12:19 PM   #2
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,501

Rep: Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489
I doubt I'll be able to help as I've only set up NFS a few times and it's been a while. It might help if you gave more details on what happens, if anything, when you try to connect. "It does not work" is too vague. Any error messages for example?
 
Old 08-03-2015, 12:27 PM   #3
kikinovak
MLED Founder
 
Registered: Jun 2011
Location: Montpezat (South France)
Distribution: CentOS, OpenSUSE
Posts: 3,453

Rep: Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154
I'm using NFS in conjunction with NIS for centralized user management. Here's a little HOWTO I wrote on the subject for Slackware 14.0, which remains valid on 14.1. Just take the NFS bits and leave out the NIS stuff.

http://docs.slackware.com/howtos:net...aming_profiles

Cheers,

Niki
 
Old 08-03-2015, 12:44 PM   #4
bassmadrigal
LQ Guru
 
Registered: Nov 2003
Location: West Jordan, UT, USA
Distribution: Slackware
Posts: 8,792

Rep: Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656
NFS is one of those things that I've run into very few problems with. I have quite a number of NFS exports and haven't touched iptables. Did you take anything from your CentOS install? On my machine, all I did was just make sure rc.nfsd and rc.rpc are both executable and then add my exports

Code:
jbhansen@craven-moorhead:~$ cat /etc/exports
/share *(rw,insecure,sync,root_squash,subtree_check,nohide)
/share/movies *(rw,insecure,sync,root_squash,subtree_check,nohide)
/share/music *(rw,insecure,sync,root_squash,subtree_check,nohide)
/share/TV/completed *(rw,insecure,sync,root_squash,subtree_check,nohide)
/share/TV/ongoing *(rw,insecure,sync,root_squash,subtree_check,nohide)
I've mounted these as nfs and accessed them in xbmc/kodi through their nfs browser. Sure, it's insecure, but it's just on a local LAN at my house.

It might be worth making yours more insecure to see if it's a problem with permissions rather than nfs itself. Have you tried removing your 192.168.18.0/24 restriction (replace it with an asterik "*")? Also, try clearing out your /etc/hosts.allow and /etc/hosts.deny to make sure there is nothing preventing access. Once we know the server is working, we can then look at locking it down.
 
Old 08-03-2015, 02:05 PM   #5
Altiris
Member
 
Registered: Mar 2013
Posts: 556

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by yancek View Post
I doubt I'll be able to help as I've only set up NFS a few times and it's been a while. It might help if you gave more details on what happens, if anything, when you try to connect. "It does not work" is too vague. Any error messages for example?
Well the thing is I don't really know how to give you an error message. I have tried mounting it via a client machine running arch linux via autofs (When my server was running CentOS my arch linux client mounted the NFS through autofs just fine) and it just gives me that it can't find such a directory. When I try through my Raspberry Pi running Debian 7 with Kodi I get the same similar message that it can't find the directory. I try through my phone which runs Android and Kodi and same problem. All of these clients were able to connect to my NFS the same way when the server was on CentOS.

Quote:
Originally Posted by kikinovak View Post
I'm using NFS in conjunction with NIS for centralized user management. Here's a little HOWTO I wrote on the subject for Slackware 14.0, which remains valid on 14.1. Just take the NFS bits and leave out the NIS stuff.

http://docs.slackware.com/howtos:net...aming_profiles

Cheers,

Niki
I read this before, and it was very confusing for me as none of that is required in this HowTo http://docs.slackware.com/howtos:net...nd_dirty_setup
I will definitely open up those ports on the firewall though as I do not have all of those open (I have run with the firewall off and clients still couldnt connect to the nfs though)

Do I really need to assign a custom port for each of these? If so then I will do it, but it just seems strange to me that I have to.

Quote:
Originally Posted by bassmadrigal View Post
NFS is one of those things that I've run into very few problems with. I have quite a number of NFS exports and haven't touched iptables. Did you take anything from your CentOS install? On my machine, all I did was just make sure rc.nfsd and rc.rpc are both executable and then add my exports

Code:
jbhansen@craven-moorhead:~$ cat /etc/exports
/share *(rw,insecure,sync,root_squash,subtree_check,nohide)
/share/movies *(rw,insecure,sync,root_squash,subtree_check,nohide)
/share/music *(rw,insecure,sync,root_squash,subtree_check,nohide)
/share/TV/completed *(rw,insecure,sync,root_squash,subtree_check,nohide)
/share/TV/ongoing *(rw,insecure,sync,root_squash,subtree_check,nohide)
I've mounted these as nfs and accessed them in xbmc/kodi through their nfs browser. Sure, it's insecure, but it's just on a local LAN at my house.

It might be worth making yours more insecure to see if it's a problem with permissions rather than nfs itself. Have you tried removing your 192.168.18.0/24 restriction (replace it with an asterik "*")? Also, try clearing out your /etc/hosts.allow and /etc/hosts.deny to make sure there is nothing preventing access. Once we know the server is working, we can then look at locking it down.
I never had any problems with NFS on CentOS either, the thing always worked, occasionally you would have to restart it once in a while. The only thing I "took" from CentOS were the shares in /etc/exports as they were working great/fine when it was running CentOS. My hosts.allow and hosts.deny are and have been empty since install. I havent tried with just an asterisk, although all of my devices are on that subnet so it shouldn't be a problem really.


EDIT:
Checked /var/log/syslog and I am getting this

Code:
Aug  2 01:29:59 necc-data kernel: [10750.455773] NFSD: the nfsdcld client tracking upcall will be removed in 3.10. Please transition to using nfsdcltrack.
Aug  2 01:30:06 mypc portmap[4283]: cannot bind tcp: Address already in use
Aug  2 01:30:06 mypc rpc.statd[4287]: unable to register (statd, 1, udp).
Aug  2 01:31:59 mypc kernel: [10870.579493] NFSD: Unable to end grace period: -110

Last edited by Altiris; 08-03-2015 at 02:26 PM.
 
Old 08-03-2015, 05:32 PM   #6
allend
LQ 5k Club
 
Registered: Oct 2003
Location: Melbourne
Distribution: Slackware64-15.0
Posts: 6,371

Rep: Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749
Quote:
I have also read this guide, which seems to be very outdated http://docs.slackware.com/howtos:net...home_nfs_howto
What do find outdated in that guide? The information presented is still applicable to Slackware-14.1(stable) and Slackware-current.
 
Old 08-03-2015, 07:23 PM   #7
Altiris
Member
 
Registered: Mar 2013
Posts: 556

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by allend View Post
What do find outdated in that guide? The information presented is still applicable to Slackware-14.1(stable) and Slackware-current.
I thought this one might be been older because I have to add so much more. I have to add things in hosts.allow and/or hosts.deny and I have to set a port for a bunch of services, however the quick and dirty guide does not require me to do that. So that led me to believe this guide was for an older Slackware release. Also because it talks about rpcinfo and how it is no longer available in 14.0
 
Old 08-04-2015, 03:21 AM   #8
allend
LQ 5k Club
 
Registered: Oct 2003
Location: Melbourne
Distribution: Slackware64-15.0
Posts: 6,371

Rep: Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749
The additional configuration is about enhancing security and use of specific ports for use with a firewall for the reasons explained in the guide.
The rpcinfo command is deprecated, in favour of pmap_dump. Upstream disabled compilation of rpcinfo in the source used for Slackware 14+
 
Old 08-04-2015, 03:38 AM   #9
kikinovak
MLED Founder
 
Registered: Jun 2011
Location: Montpezat (South France)
Distribution: CentOS, OpenSUSE
Posts: 3,453

Rep: Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154
Quote:
Originally Posted by Altiris View Post
I thought this one might be been older because I have to add so much more. I have to add things in hosts.allow and/or hosts.deny.
TCP wrappers (hosts.allow and hosts.deny) are officially deprecated. So don't bother, just leave them empty.
 
Old 08-04-2015, 03:40 AM   #10
Mark Pettit
Member
 
Registered: Dec 2008
Location: Cape Town, South Africa
Distribution: Slackware 15.0
Posts: 619

Rep: Reputation: 299Reputation: 299Reputation: 299
Just as a matter of interest, have you considered using sshd (on the server - surely there already) and ssh-fuse (on the client)? It's far more secure than NFS, it's simpler to setup, and you get a finer control over user permissions. And it's pretty much stateless - I've seen NFS client machines do bad things when the NFS server "goes away" unexpectedly. Also look at autofs - a very clever, but slightly tricky thing to setup. The neat thing, even for NFS clients, is that when the client is no longer "on the share", it can be automagically disconnected. And then reconnected when needed - transparently.
 
Old 08-04-2015, 03:41 AM   #11
kikinovak
MLED Founder
 
Registered: Jun 2011
Location: Montpezat (South France)
Distribution: CentOS, OpenSUSE
Posts: 3,453

Rep: Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154
Quote:
Originally Posted by Altiris View Post
I never had any problems with NFS on CentOS either
A pragmatic question just out of curiosity. Things seemed to work well for you under CentOS, so why migrate to a distribution that's very different? Here, I'm using Slackware because it's what fits best, but then, YMMV.
 
Old 08-04-2015, 04:06 AM   #12
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,057

Rep: Reputation: Disabled
I am not Altiris, but a partial answer is here.

@Altiris: notwithstanding what I wrote and that still stands, you seem to learn fast, congrats! After all everyone has one's own way of learning.
 
Old 08-04-2015, 11:31 AM   #13
Altiris
Member
 
Registered: Mar 2013
Posts: 556

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Mark Pettit View Post
Just as a matter of interest, have you considered using sshd (on the server - surely there already) and ssh-fuse (on the client)? It's far more secure than NFS, it's simpler to setup, and you get a finer control over user permissions. And it's pretty much stateless - I've seen NFS client machines do bad things when the NFS server "goes away" unexpectedly. Also look at autofs - a very clever, but slightly tricky thing to setup. The neat thing, even for NFS clients, is that when the client is no longer "on the share", it can be automagically disconnected. And then reconnected when needed - transparently.
I have heard of these services very briefly, maybe I will look into in the future? What I need NFS for is just to be able to stream video files from my server to my Raspberry pi, NFS did the job fine and I don't need to give read/write permissions and its local also. I don't think I need sshd and these other stuff?

Quote:
Originally Posted by kikinovak View Post
A pragmatic question just out of curiosity. Things seemed to work well for you under CentOS, so why migrate to a distribution that's very different? Here, I'm using Slackware because it's what fits best, but then, YMMV.
Yes, everything was working as it should under CentOS and I very much liked it and still do, however I think it was maybe a bit of wanting to try something new but I started messing with Slackware and I like the philosophy and approach to how things are maintained/kept in Slackware more than CentOS. Also, security updates were taking a really long time to get patched into CentOS. I remember in June there were 3-7 openssl vulnerabilities, I checked the security advisors on Slackware site and they had already issues patches, I only got my patches on CentOS about 6 days later. Theres also a big bug in CentOS due to libuser, which I don't believe Slackware uses? I understand why there is a delay for CentOS (first have to wait for rhel, then CentOS devs have to push it) but I just like Slackware more. I get sort of a warm feeling if my server is running Slackware than CentOS, I just like the philosophy behind Slackware more.

Last edited by Altiris; 08-04-2015 at 11:32 AM.
 
  


Reply



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
[SOLVED] Set proper resolution for monitor theAdmiral Debian 6 04-09-2013 08:59 AM
[SOLVED] Proper set-up of SUDO access/options Hevithan Linux - Newbie 5 05-31-2011 04:30 AM
getting sambe to set the proper permissions on the client, help lhorace Linux - Newbie 2 10-26-2009 11:40 AM
Proper way to set user as root access? SlowCoder Linux - Security 4 02-19-2007 08:03 PM
how to set proper pdf plugin in mozzila browser bajaj Linux - Software 0 07-04-2003 05:40 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 07:01 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration