Skip to content

Instantly share code, notes, and snippets.

@demofly
Created March 25, 2015 06:55
Show Gist options
  • Save demofly/ed33f2c49a3d64851de8 to your computer and use it in GitHub Desktop.
Save demofly/ed33f2c49a3d64851de8 to your computer and use it in GitHub Desktop.
imp02 /etc/glusterfs/SAS-glusterfs.vol
### Add client feature and attach to remote subvolume
volume mp-sas1-imp01
type protocol/client
option transport-type tcp
option remote-host 213.133.111.249
option remote-port 49994
option remote-subvolume mp-sas1
option username MP
option password sPOUwe74w38sdkl
end-volume
volume mp-sas1-imp02
type protocol/client
option transport-type tcp
option remote-host 176.9.3.15
option remote-port 49994
option remote-subvolume mp-sas1
option username MP
option password sPOUwe74w38sdkl
end-volume
### Add IO-threads add asynchronous (background) file system operations
volume mp-sas1-imp01-io-threads
type performance/io-threads
option thread-count 8 # default is 16
subvolumes mp-sas1-imp01
end-volume
volume mp-sas1-imp02-io-threads
type performance/io-threads
option thread-count 8 # default is 16
subvolumes mp-sas1-imp02
end-volume
### Add IO-Cache feature
volume mp-sas1-imp01-iocache
type performance/io-cache
option cache-timeout 2
subvolumes mp-sas1-imp01-io-threads
end-volume
volume mp-sas1-imp02-iocache
type performance/io-cache
option cache-timeout 2
subvolumes mp-sas1-imp02-io-threads
end-volume
### Add writeback feature
volume mp-sas1-imp01-writeback
type performance/write-behind
option cache-size 8MB
option flush-behind off
option enable-O_SYNC on
subvolumes mp-sas1-imp01-iocache
end-volume
volume mp-sas1-imp02-writeback
type performance/write-behind
option cache-size 8MB
option flush-behind off
option enable-O_SYNC on
subvolumes mp-sas1-imp02-iocache
end-volume
### read-ahead pre-fetches a sequence of blocks in advance based on its predictions
volume mp-sas1-imp01-read-ahead
type performance/read-ahead
option page-count 2 # 2 is default option
option force-atime-update off # default is off
subvolumes mp-sas1-imp01-writeback
end-volume
volume mp-sas1-imp02-read-ahead
type performance/read-ahead
option page-count 2 # 2 is default option
option force-atime-update off # default is off
subvolumes mp-sas1-imp02-writeback
end-volume
### Distributed storage
volume mp-sas1
type cluster/replicate
# Use local volume for read operations
# option read-subvolume mp-sas1-imp01-read-ahead
option read-subvolume mp-sas1-imp02-read-ahead
subvolumes mp-sas1-imp01-read-ahead mp-sas1-imp02-read-ahead
end-volume
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment