[Gluster-users] Restricting read-only mount

Hugo Cisneiros (Eitch) hugo.cisneiros at gmail.com
Tue Nov 16 14:57:18 UTC 2010


On Tue, Nov 16, 2010 at 12:27 PM, Hugo Cisneiros (Eitch)
<hugo.cisneiros at gmail.com> wrote:
> Some time ago, I saw a thread on this mailing list regarding mounting
> a gluster file system read-only with a -o ro mount option. I see that
> version 3.1 supports this option and it is working fine, great work!

BTW, before 3.1 I was experimenting with the features/filter
translator. But I got a few annoying bugs that stopped me from using
it. For the record, I used the following example configuration:

===
volume test-posix
        type storage/posix
        option directory /test
end-volume

volume test-locks
        type features/locks
        subvolumes test-posix
end-volume

volume test-iothreads
        type performance/io-threads
        option thread-count 8
        subvolumes test-locks
end-volume

volume test
        type performance/io-cache
        option cache-size 256MB
        option cache-timeout 2
        subvolumes test-iothreads
end-volume

volume test-ro
        type testing/features/filter
        option read-only yes
        subvolumes test
end-volume

volume server
        type protocol/server
        subvolumes test test-ro
        option transport-type tcp
        option auth.addr.test.allow 192.168.0.*
        option auth.addr.test-ro.allow 192.168.1.*
end-volume
===

This way, read-only was restricted to 192.168.1.* and read-write to
192.168.0.*. I don't know if this is the right way to do that, but it
worked fine until some files on the read-only mount began
"disappearing" (very frequently):

$ ls testfile
-rw-r--r-- 1 root root    2 Nov 16 12:14 teste

$ cat teste2
cat: teste2: No such file or directory

That's why I began searching for another way in 3.1 :)

Thanks,

-- 
[]'s
Hugo
www.devin.com.br



More information about the Gluster-users mailing list