* Read-only map
@ 2008-10-29 15:08 Ondrej Valousek
2008-10-29 17:25 ` Jeff Moyer
2008-10-30 0:11 ` Steve Linn
0 siblings, 2 replies; 5+ messages in thread
From: Ondrej Valousek @ 2008-10-29 15:08 UTC (permalink / raw)
To: autofs@linux.kernel.org
Hi List,
I have a problem:
My system (client, server) RHEL 5.2, latest updates.
1. NFS server is exporting read/write share
2. NIS automount map point to that share, but in read only like "key -ro
nfsserver:/share/key"
Now, the "strange" thing is that on clients that share is mounted read
only, fine, but when I go to the nfsserver itself, the share is mounted
read write. I understand this is because mount --bind is used instead of
nfs for performance reasons, but this way we lose the -ro flag.
Is there any simple solution to this?
Thanks,
Ondrej
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Read-only map
2008-10-29 15:08 Read-only map Ondrej Valousek
@ 2008-10-29 17:25 ` Jeff Moyer
2008-10-30 0:11 ` Steve Linn
1 sibling, 0 replies; 5+ messages in thread
From: Jeff Moyer @ 2008-10-29 17:25 UTC (permalink / raw)
To: Ondrej Valousek; +Cc: autofs@linux.kernel.org
Ondrej Valousek <webserv@s3group.cz> writes:
> Hi List,
>
> I have a problem:
> My system (client, server) RHEL 5.2, latest updates.
> 1. NFS server is exporting read/write share
> 2. NIS automount map point to that share, but in read only like "key -ro
> nfsserver:/share/key"
>
> Now, the "strange" thing is that on clients that share is mounted read
> only, fine, but when I go to the nfsserver itself, the share is mounted
> read write. I understand this is because mount --bind is used instead of
> nfs for performance reasons, but this way we lose the -ro flag.
> Is there any simple solution to this?
Well, you could add -fstype=nfs. In olden days, you could specify
-nosymlink.
Cheers,
Jeff
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Read-only map
2008-10-29 15:08 Read-only map Ondrej Valousek
2008-10-29 17:25 ` Jeff Moyer
@ 2008-10-30 0:11 ` Steve Linn
2008-10-30 13:32 ` Jeff Moyer
1 sibling, 1 reply; 5+ messages in thread
From: Steve Linn @ 2008-10-30 0:11 UTC (permalink / raw)
To: Ondrej Valousek; +Cc: autofs@linux.kernel.org
We had the same problem. The kernel we were running had a
"feature" where if the client mounts the same server and directory
it would bind them together. You would get RO or RW depending
on which directory was mounted first. You might be able to
trick the client by making multiple addresses on the server
and mounting one IP address for reads and one for writes
or TCP and UDP?
I think that this "feature" was added because of machines
running out of reserved ports. BTW, I have a patch for the reserved
ports. Anyways, I guess you could verify that you are
seeing the same behavior by doing something like:
Mount the same thing twice first time RO
# mkdir -p /mnt/test1 /mnt/test2
# mount -o ro lid40:/etc /mnt/test1
# mount -o rw lid40:/etc /mnt/test2
Both appear RO.
# touch /mnt/test1/passwd
touch: cannot touch `/mnt/test1/passwd': Read-only file system
# touch /mnt/test2/passwd
touch: cannot touch `/mnt/test2/passwd': Read-only file system
Remount them again RW first and see that they both are RW.
# umount /mnt/test1 /mnt/test2
# mount -o rw lid40:/etc /mnt/test1
# mount -o ro lid40:/etc /mnt/test2
# touch /mnt/test1/passwd
# touch /mnt/test2/passwd
This problem does not appear to be caused at all by autofs.
It seems to be a problem/feature of the NFS client.
Steve
On Wed, Oct 29, 2008 at 8:08 AM, Ondrej Valousek <webserv@s3group.cz> wrote:
> Hi List,
>
> I have a problem:
> My system (client, server) RHEL 5.2, latest updates.
> 1. NFS server is exporting read/write share
> 2. NIS automount map point to that share, but in read only like "key -ro
> nfsserver:/share/key"
>
> Now, the "strange" thing is that on clients that share is mounted read
> only, fine, but when I go to the nfsserver itself, the share is mounted
> read write. I understand this is because mount --bind is used instead of
> nfs for performance reasons, but this way we lose the -ro flag.
> Is there any simple solution to this?
> Thanks,
>
>
> Ondrej
>
> _______________________________________________
> autofs mailing list
> autofs@linux.kernel.org
> http://linux.kernel.org/mailman/listinfo/autofs
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Read-only map
2008-10-30 0:11 ` Steve Linn
@ 2008-10-30 13:32 ` Jeff Moyer
[not found] ` <3ddb09290810301023h4cf0e769w9b9ad8e396e3df0d@mail.gmail.com>
0 siblings, 1 reply; 5+ messages in thread
From: Jeff Moyer @ 2008-10-30 13:32 UTC (permalink / raw)
To: Steve Linn; +Cc: autofs@linux.kernel.org, raven
"Steve Linn" <steve.linn@gmail.com> writes:
> We had the same problem. The kernel we were running had a
> "feature" where if the client mounts the same server and directory
> it would bind them together. You would get RO or RW depending
The RHEL 5.2 kernel does not have that issue.
Cheers,
Jeff
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Read-only map
[not found] ` <3ddb09290810301023h4cf0e769w9b9ad8e396e3df0d@mail.gmail.com>
@ 2008-10-30 17:28 ` Ondrej Valousek
0 siblings, 0 replies; 5+ messages in thread
From: Ondrej Valousek @ 2008-10-30 17:28 UTC (permalink / raw)
To: autofs@linux.kernel.org
I tried on RHEL 5.2 and it works, too.
But it still does not work with the automounter - still does the mount
--bind (probably)....
Ondrej
Steve Linn wrote:
> Interesting. I tried it on a Suse 9,3, Open Suse 10.3 kernel and
> an earlier RHEL and they failed. Opensuse 11 works though.
>
> root@fid1 ~]$ mount -o ro lid40:/etc /mnt/test1
> [root@fid1 ~]$ mount -o rw lid40:/etc /mnt/test2
> [root@fid1 ~]$ touch /mnt/test2/passwd
> touch: cannot touch `/mnt/test2/passwd': Read-only file system
> [root@fid1 ~]$ cat /proc/version
> Linux version 2.6.9-34.0.1.EL.ADSKsmp (root@strasbourg) (gcc version
> 3.4.4 20050721 (Red Hat 3.4.4-2)) #1 SMP Tue Aug 12 21:24:17 EDT 2008
> [root@fid1 ~]$ cat /etc/redhat-release
> Red Hat Enterprise Linux WS release 4 (Nahant Update 3)
>
>
> suse11build /root# mount -o ro lid40:/etc /mnt/test1
> suse11build /root# mount -o rw lid40:/etc /mnt/test2
> suse11build /root# touch /mnt/test2/passwd
> suse11build /root# cat /proc/version
> Linux version 2.6.25.9-0.2-pae (geeko@buildhost) (gcc version 4.3.1
> 20080507 (prerelease) [gcc-4_3-branch revision 135036] (SUSE Linux) )
> #1 SMP 2008-06-28 00:00:07 +0200
>
> suse11build /root# cat /etc/SuSE-release
> openSUSE 11.0 (i586)
> VERSION = 11.0
>
> Sorry about that,
> Steve
>
> On Thu, Oct 30, 2008 at 6:32 AM, Jeff Moyer <jmoyer@redhat.com> wrote:
>
>> "Steve Linn" <steve.linn@gmail.com> writes:
>>
>>
>>> We had the same problem. The kernel we were running had a
>>> "feature" where if the client mounts the same server and directory
>>> it would bind them together. You would get RO or RW depending
>>>
>> The RHEL 5.2 kernel does not have that issue.
>>
>> Cheers,
>>
>> Jeff
>>
>>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2008-10-30 17:28 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-29 15:08 Read-only map Ondrej Valousek
2008-10-29 17:25 ` Jeff Moyer
2008-10-30 0:11 ` Steve Linn
2008-10-30 13:32 ` Jeff Moyer
[not found] ` <3ddb09290810301023h4cf0e769w9b9ad8e396e3df0d@mail.gmail.com>
2008-10-30 17:28 ` Ondrej Valousek
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.