Bug 188954

Summary: nfs directories in /etc/fstab fail to mount at boot time
Product: [Fedora] Fedora Reporter: Tom Cross <tomc>
Component: util-linuxAssignee: Karel Zak <kzak>
Status: CLOSED NOTABUG QA Contact: Ben Levenson <benl>
Severity: high Docs Contact:
Priority: medium    
Version: 5CC: dwalsh
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: FC5 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-11-01 19:31:45 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Tom Cross 2006-04-13 21:29:31 UTC
Description of problem:
nfs directories setup in /etc/fstab fail to mount at boot time with an error:
"block device error: cannot mount ned:/home/users read/write" (or something like
that)

Version-Release number of selected component (if applicable):
util-linux-2.13-0.20

How reproducible:
I have three directories that are mounted from /etc/fstab, every boot one of
them is sucessful, the other two do not mount


I added the commands:

mount -tnfs ned:/home/dos /home/dos
mount -tnfs ned:/home/users /home/users
mount -tnfs ned:/home/depts /depts

into my /etc/rc.d/rc.local.  Same error.  It will not allow me to mount them
there either.

BUT, after the system is up, I can use the command "mount -a" or any nfs mount
command and it works perfectly fine.

Comment 1 Tom Cross 2006-04-13 21:30:35 UTC
More info I forgot to add:

I think this is limited to the x86_64 port of Fedora-Core-5 because I use the
exact same mount commands on a couple of i386 based installs here in the same
environment and it works perfectly fine.

Comment 2 Tom Cross 2006-04-24 15:35:17 UTC
This is *NOT* limited to the x86_64 port.  I have another box that is i386 and
it fails.

However, if I disable SELinux, all my directories are mounted fine at boot time
with no errors, warnings or complaints.

Comment 4 Daniel Walsh 2006-06-06 19:41:45 UTC
Are you seeing avc messages in /var/log/messages?



Comment 5 Daniel Walsh 2006-09-18 19:25:40 UTC
This seems to be working fine in latest policy

Comment 6 Tom Cross 2006-10-24 13:35:19 UTC
I'm still having trouble with this with Fedora Core 6.  

When booting FC6 mounts one of the nfs shares, but not the other two.  If I wait
for the system to come up completely, I log in as root and type "mount -a" all
shares are mounted without complaint.

I have found a work-around local policy:

require {
        class dir mounton;
        type mount_t; 
        type user_home_dir_t; 
        role system_r; 
};

allow mount_t user_home_dir_t:dir mounton;


The following avc messages appear in my /var/log/messages:

Oct 24 03:15:02 xterm131 kernel: audit(1161677702.911:6): avc:  denied  {
getattr } for  pid=1882 comm="mount.nfs" name="users" dev=dm-0 ino=1336934
scontext=system_u:system_r:mount_t:s0 tcontext=root:object_r:user_home_dir_t:s0
tclass=dir
Oct 24 03:15:02 xterm131 kernel: audit(1161677702.959:7): avc:  denied  {
mounton } for  pid=1882 comm="mount.nfs" name="users" dev=dm-0 ino=1336934
scontext=system_u:system_r:mount_t:s0 tcontext=root:object_r:user_home_dir_t:s0
tclass=dir


Thanks

Comment 7 Karel Zak 2006-11-01 13:01:08 UTC
Tom, can you check it with the latest FC6 selinux policy? Thanks.

Comment 8 Tom Cross 2006-11-01 16:47:57 UTC
Fresh install of fc6 on i686.  Firewall disabled, selinux=enforcing.

After the yum update, it mounts all three of my nfs mounts perfectly.

It appears to be fixed.

Thanks!!