 |
 |
 |
 |
| Using Fedora General support for current versions. Ask questions about Fedora and it's software that do not belong in any other forum. |

6th June 2011, 04:00 AM
|
|
Registered User
|
|
Join Date: Jun 2011
Posts: 4

|
|
|
automount question
Hello Fedoraforum!
I've been using autofs forever on my home network: I have a Linux server exporting directories to the network (comprised of Linux & Mac boxes). I recently switched one of my machines to Fedora 15. All is good (after disabling SELinux; don't need it behind my firewall), except for automounting said exported directories. Yes, I can mount them as NFS mounts/root, but that defeats the purpose.
I don't need to have them mounted at boot (that's not really automounting, is it?), but I would very much like to have the configured automounts behave as they have historically.
Any insights would be deeply appreciated; thanks in advance!
|

6th June 2011, 05:51 AM
|
 |
Registered User
|
|
Join Date: Jul 2006
Location: Montana
Posts: 731

|
|
|
Re: automount question
autofs works the same in Fedora 15 as it did in Fedora 14.
As an alternate, you can automount with systemd
http://www.happyassassin.net/2011/05...remote-shares/
If it is not working as you expect, you need to provide more details.
Also, you should not need to disable selinux for either autofs or systemd to work.
__________________
If it is not broken, tweak it... If you break Fedora you get to keep both pieces :p
|

6th June 2011, 04:27 PM
|
|
Registered User
|
|
Join Date: Jun 2011
Posts: 4

|
|
|
Re: automount question
Quote:
Originally Posted by bodhi.zazen
autofs works the same in Fedora 15 as it did in Fedora 14.
As an alternate, you can automount with systemd
http://www.happyassassin.net/2011/05...remote-shares/
If it is not working as you expect, you need to provide more details.
Also, you should not need to disable selinux for either autofs or systemd to work.
|
Hello! Thanks for the reply. I have not used Fedora 14, so I am not familiar with how its flavor of autofs is rolled.
Here is a line from /etc/exports on my main server:
Code:
/av 192.168.1.0/255.255.255.0(async,insecure,rw,no_root_squash,no_subtree_check)
Here is the salient line from the auto.misc file as configured on this (Fedora 15) box, and my Mac Pro:
Code:
av -fstype=nfs pyrrho:/av
This configuration has worked fine & dandy for years. What I'm trying to figure out is if there is something
a.) proprietary going on w/Fedora or
b.) I fat-fingered.
Here is the status of the autofs daemon:
Code:
autofs.service - LSB: Automounts filesystems on demand
Loaded: loaded (/etc/rc.d/init.d/autofs)
Active: active (running) since Sun, 05 Jun 2011 21:37:18 -0700; 10h ago
Process: 5801 ExecReload=/etc/rc.d/init.d/autofs reload (code=exited, status=0/SUCCESS)
Process: 1029 ExecStart=/etc/rc.d/init.d/autofs start (code=exited, status=0/SUCCESS)
Main PID: 1214 (automount)
CGroup: name=systemd:/system/autofs.service
└ 1214 automount --pid-file /var/run/autofs.pid
It seems overkill to add a line to /etc/fstab as the post you mentioned here suggests, though I will try it.
Thanks again!
|

6th June 2011, 04:55 PM
|
 |
Registered User
|
|
Join Date: Jul 2006
Location: Montana
Posts: 731

|
|
|
Re: automount question
Well, you have to decide if you are going to use autofs or systemd
If you use autofs, you do NOT add an entry to fstab.
The fedora autofs documentation is here:
http://docs.fedoraproject.org/en-US/...ig-autofs.html
__________________
If it is not broken, tweak it... If you break Fedora you get to keep both pieces :p
Last edited by bodhi.zazen; 6th June 2011 at 04:58 PM.
|

6th June 2011, 07:15 PM
|
|
Registered User
|
|
Join Date: Jun 2011
Posts: 4

|
|
|
Re: automount question
It was a newbie to Fedora issue: Fedora comes with a firewall; reconfiguring that solved my NFS problem (and a couple of others).
Thanks for the input!
|

9th June 2011, 12:17 AM
|
|
Registered User
|
|
Join Date: Jun 2011
Posts: 2

|
|
|
Re: automount question
Can you please post what you did to reconfigure your firewall to make the nfsmounts work? I am struggling with the same problem and no amount of firewall reconfiguration seems to work, even trying many things in various posts (adding ports, etc).
Thanks!
|

9th June 2011, 07:12 AM
|
|
Registered User
|
|
Join Date: Jun 2011
Posts: 4

|
|
|
Re: automount question
Quote:
Originally Posted by erikj123
Can you please post what you did to reconfigure your firewall to make the nfsmounts work? I am struggling with the same problem and no amount of firewall reconfiguration seems to work, even trying many things in various posts (adding ports, etc).
Thanks!
|
I took the easy way out: I simply disabled the Fedora firewall completely. Since I have a firewall set up on my router for my entire network I have no need for a personal one on a specific machine.
Probably not what you wanted to hear; sorry I can't give you anything more specific. Note the tool does warn any custom configurations you've made will be overwritten by using it; don't know if that's a factor in your case.
Good luck!
|

9th June 2011, 07:57 AM
|
 |
Registered User
|
|
Join Date: Jul 2006
Location: Montana
Posts: 731

|
|
|
Re: automount question
Quote:
Originally Posted by erikj123
Can you please post what you did to reconfigure your firewall to make the nfsmounts work? I am struggling with the same problem and no amount of firewall reconfiguration seems to work, even trying many things in various posts (adding ports, etc).
Thanks!
|
auto mounting nfs works (with either of the two techniques I posted) on the clients without having to do anything to the firewall.
Server side, run
Code:
system-config-firewall
Alternately use iptables , for example,
Code:
iptables -A INPUT -p tcp -s 192.168.0.1/24 --dport 2049 -j ACCEPT
iptables -A INPUT -p tcp --dport 2049 -j DROP
Keep in mind, with iptables the order of your rules is critical
Also, with Fedora, after manually changing the iptables rules you need to save your changes
Code:
systemctl save iptables.service
Allow nfs4 (port 2049).
https://fedoraproject.org/w/index.ph...ch/HowTo/NFSv4
__________________
If it is not broken, tweak it... If you break Fedora you get to keep both pieces :p
Last edited by bodhi.zazen; 9th June 2011 at 08:02 AM.
|

9th June 2011, 05:34 PM
|
|
Registered User
|
|
Join Date: Jun 2011
Posts: 2

|
|
|
Re: automount question
Thank you both for your replies, I appreciate your help. I was not very specific about my problems. If I turn my firewall off on the NFS server, then the automount on my client machine works fine. I am running F15 on my server and CentOS 5.6 on my client. I have carefully read the Fedora documentation on NFS (see Fedora F14 Stotage Administration Guide, Chapter 9, Network File System), in particular the section on running NFS behind a firewall (see the same doc, section 9.6.3). I have configured the firewall to allow NFS4 TCP access on port 2049. I have also uncommented the various ports listed in /etc/sysconfig/nfs and enabled the same port numbers in the firewall (I did not try to use custom port numbers). I have also made sure all the requisite services are up and running. But as soon as I enable the firewall, the automount fails. I have not tried using the IP tables method that Bohdi mentions. For now I am leaving the firewall off. I will return to this when I have more time.
Thanks!
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
Current GMT-time: 14:10 (Sunday, 19-05-2013)
|
|
 |
 |
 |
 |
|
|