Automatic File Replication (Mirror) across Two Storage Servers

From GlusterDocumentation

Jump to: navigation, search

Server Volume Specification

Use the below volume spec on both storage1.example.com and storage2.example.com

# file: /etc/glusterfs/glusterfs-server.vol
volume brick
  type storage/posix
  option directory /data/export
end-volume

volume server
  type protocol/server
  option transport-type tcp/server
  option auth.ip.brick.allow *
  subvolumes brick
end-volume

Client Volume Specification

# file: /etc/glusterfs/glusterfs-client.vol
volume remote1
  type protocol/client
  option transport-type tcp/client
  option remote-host storage1.example.com
  option remote-subvolume brick
end-volume

volume remote2
  type protocol/client
  option transport-type tcp/client
  option remote-host storage2.example.com
  option remote-subvolume brick
end-volume

volume mirror0
  type cluster/afr
  subvolumes remote1 remote2
end-volume
Personal tools