Fri 10 Apr 2009 02:37:47 PM UTC, original submission:
/mnt/cluster/ - mount point of glusterfs
# cat /etc/glusterfs/glusterfs-server.vol
volume posix
type storage/posix
option directory /mnt/data/localhost
end-volume
volume locks
type features/posix-locks
subvolumes posix
end-volume
volume brick
type debug/trace
subvolumes locks
end-volume
volume server
type protocol/server
option transport-type tcp/server
option auth.ip.brick.allow 192.168.0.*
subvolumes brick
end-volume
# cat /etc/glusterfs/glusterfs-client.vol
volume remote1
type protocol/client
option transport-type tcp/client
option remote-host node1local
option remote-subvolume brick
end-volume
volume remote2
type protocol/client
option transport-type tcp/client
option remote-host node2local
option remote-subvolume brick
end-volume
volume mirror0
type cluster/afr
subvolumes remote1 remote2
end-volume
# touch /mnt/cluster/www/html/test
# echo '123' > /mnt/cluster/www/html/test
# chown -R apache:apache /mnt/cluster/www
# chmod 666 /mnt/cluster/www/html/test
On both nodes make:
# adduser testuser
# groupmems -a testuser -g apache
After it:
# su -c 'cat /mnt/cluster/www/html/test' testuser
cat: /mnt/cluster/www/html/test: Permission denied
|