summaryrefslogtreecommitdiffstats
path: root/doc/examples/replicate.vol
blob: 333ba7de1aa3c7739b1134d2f9e1c06c3d96b121 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
### 'NOTE'
# This file has both server spec and client spec to get an understanding of stripe's spec file. Hence can't be used as it is, as a GlusterFS spec file. 
# One need to seperate out server spec and client spec to get it working.

#=========================================================================

# **** server1 spec file ****

### Export volume "brick" with the contents of "/home/export" directory.
volume posix1
  type storage/posix                    # POSIX FS translator
  option directory /home/export1        # Export this directory
end-volume

### Add POSIX record locking support to the storage brick
volume brick1
  type features/posix-locks
  option mandatory on          # enables mandatory locking on all files
  subvolumes posix1
end-volume

### Add network serving capability to above brick.
volume server
  type protocol/server
  option transport-type tcp                      # For TCP/IP transport
  option transport.socket.listen-port 24016       
# option client-volume-filename /etc/glusterfs/glusterfs-client.vol
  subvolumes brick1
  option auth.addr.brick1.allow * 		# access to "brick" volume
end-volume


#=========================================================================

# **** server2 spec file ****
volume posix2
  type storage/posix                    # POSIX FS translator
  option directory /home/export2        # Export this directory
end-volume

### Add POSIX record locking support to the storage brick
volume brick2
  type features/posix-locks
  option mandatory on          # enables mandatory locking on all files
  subvolumes posix2
end-volume

### Add network serving capability to above brick.
volume server
  type protocol/server
  option transport-type tcp                  # For TCP/IP transport
  option transport.socket.listen-port 24017   
  subvolumes brick2
  option auth.addr.brick2.allow * # Allow access to "brick" volume
end-volume


#=========================================================================

# **** server3 spec file ****

volume posix3
  type storage/posix                    # POSIX FS translator
  option directory /home/export3        # Export this directory
end-volume

### Add POSIX record locking support to the storage brick
volume brick3
  type features/posix-locks
  option mandatory on          # enables mandatory locking on all files
  subvolumes posix3
end-volume

### Add network serving capability to above brick.
volume server
  type protocol/server
  option transport-type tcp                 # For TCP/IP transport
  option transport.socket.listen-port 24018  
  subvolumes brick3
  option auth.addr.brick3.allow * 		# access to "brick" volume
end-volume


#=========================================================================

# **** Clustered Client config file ****

### Add client feature and attach to remote subvolume of server1
volume client1
  type protocol/client
  option transport-type tcp     # for TCP/IP transport
  option remote-host 127.0.0.1      # IP address of the remote brick
  option transport.socket.remote-port 24016              
  option remote-subvolume brick1        # name of the remote volume
end-volume

### Add client feature and attach to remote subvolume of server2
volume client2
  type protocol/client
  option transport-type tcp     # for TCP/IP transport
  option remote-host 127.0.0.1      # IP address of the remote brick
  option transport.socket.remote-port 24017              
  option remote-subvolume brick2        # name of the remote volume
end-volume

volume client3
  type protocol/client
  option transport-type tcp     # for TCP/IP transport
  option remote-host 127.0.0.1      # IP address of the remote brick
  option transport.socket.remote-port 24018              
  option remote-subvolume brick3        # name of the remote volume
end-volume

## Add replicate feature.
volume replicate
  type cluster/replicate
  subvolumes client1 client2 client3
end-volume

href='#n252'>252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374