|
Packit Service |
e080da |
declare -A PORTMAP
|
|
Packit Service |
e080da |
PORTCURR=49152
|
|
Packit Service |
e080da |
function ta_create_ta_and_volfile()
|
|
Packit Service |
e080da |
{
|
|
Packit Service |
e080da |
local b=$B0/$1
|
|
Packit Service |
e080da |
mkdir -p $b/.glusterfs/indices
|
|
Packit Service |
e080da |
cat > $B0/ta.vol <
|
|
Packit Service |
e080da |
volume ta-posix
|
|
Packit Service |
e080da |
type storage/posix
|
|
Packit Service |
e080da |
option directory $b
|
|
Packit Service |
e080da |
end-volume
|
|
Packit Service |
e080da |
|
|
Packit Service |
e080da |
volume ta-thin-arbiter
|
|
Packit Service |
e080da |
type features/thin-arbiter
|
|
Packit Service |
e080da |
subvolumes ta-posix
|
|
Packit Service |
e080da |
end-volume
|
|
Packit Service |
e080da |
|
|
Packit Service |
e080da |
volume ta-locks
|
|
Packit Service |
e080da |
type features/locks
|
|
Packit Service |
e080da |
option notify-contention yes
|
|
Packit Service |
e080da |
subvolumes ta-thin-arbiter
|
|
Packit Service |
e080da |
end-volume
|
|
Packit Service |
e080da |
|
|
Packit Service |
e080da |
volume ta-upcall
|
|
Packit Service |
e080da |
type features/upcall
|
|
Packit Service |
e080da |
option cache-invalidation off
|
|
Packit Service |
e080da |
subvolumes ta-locks
|
|
Packit Service |
e080da |
end-volume
|
|
Packit Service |
e080da |
|
|
Packit Service |
e080da |
volume ta-io-threads
|
|
Packit Service |
e080da |
type performance/io-threads
|
|
Packit Service |
e080da |
subvolumes ta-upcall
|
|
Packit Service |
e080da |
end-volume
|
|
Packit Service |
e080da |
|
|
Packit Service |
e080da |
volume ta-index
|
|
Packit Service |
e080da |
type features/index
|
|
Packit Service |
e080da |
option xattrop-pending-watchlist trusted.afr.ta-
|
|
Packit Service |
e080da |
option xattrop-dirty-watchlist trusted.afr.dirty
|
|
Packit Service |
e080da |
option index-base $b/.glusterfs/indices
|
|
Packit Service |
e080da |
subvolumes ta-io-threads
|
|
Packit Service |
e080da |
end-volume
|
|
Packit Service |
e080da |
|
|
Packit Service |
e080da |
volume ta-io-stats
|
|
Packit Service |
e080da |
type debug/io-stats
|
|
Packit Service |
e080da |
option count-fop-hits off
|
|
Packit Service |
e080da |
option latency-measurement off
|
|
Packit Service |
e080da |
option log-level WARNING
|
|
Packit Service |
e080da |
option unique-id $b
|
|
Packit Service |
e080da |
subvolumes ta-index
|
|
Packit Service |
e080da |
end-volume
|
|
Packit Service |
e080da |
|
|
Packit Service |
e080da |
volume ta-server
|
|
Packit Service |
e080da |
type protocol/server
|
|
Packit Service |
e080da |
option transport.listen-backlog 10
|
|
Packit Service |
e080da |
option transport.socket.keepalive-count 9
|
|
Packit Service |
e080da |
option transport.socket.keepalive-interval 2
|
|
Packit Service |
e080da |
option transport.socket.keepalive-time 20
|
|
Packit Service |
e080da |
option transport.tcp-user-timeout 0
|
|
Packit Service |
e080da |
option transport.socket.keepalive 1
|
|
Packit Service |
e080da |
option auth.addr.$b.allow *
|
|
Packit Service |
e080da |
option auth-path $b
|
|
Packit Service |
e080da |
option transport.address-family inet
|
|
Packit Service |
e080da |
option transport-type tcp
|
|
Packit Service |
e080da |
subvolumes ta-io-stats
|
|
Packit Service |
e080da |
end-volume
|
|
Packit Service |
e080da |
EOF
|
|
Packit Service |
e080da |
}
|
|
Packit Service |
e080da |
|
|
Packit Service |
e080da |
function ta_create_brick_and_volfile()
|
|
Packit Service |
e080da |
{
|
|
Packit Service |
e080da |
local b=$B0/$1
|
|
Packit Service |
e080da |
mkdir -p $b/.glusterfs/indices
|
|
Packit Service |
e080da |
cat > $B0/${1}.vol <
|
|
Packit Service |
e080da |
volume ${V0}-posix
|
|
Packit Service |
e080da |
type storage/posix
|
|
Packit Service |
e080da |
option directory $b
|
|
Packit Service |
e080da |
end-volume
|
|
Packit Service |
e080da |
|
|
Packit Service |
e080da |
volume ${V0}-locks
|
|
Packit Service |
e080da |
type features/locks
|
|
Packit Service |
e080da |
subvolumes ${V0}-posix
|
|
Packit Service |
e080da |
end-volume
|
|
Packit Service |
e080da |
|
|
Packit Service |
e080da |
volume ${V0}-leases
|
|
Packit Service |
e080da |
type features/leases
|
|
Packit Service |
e080da |
option leases off
|
|
Packit Service |
e080da |
subvolumes ${V0}-locks
|
|
Packit Service |
e080da |
end-volume
|
|
Packit Service |
e080da |
|
|
Packit Service |
e080da |
volume ${V0}-upcall
|
|
Packit Service |
e080da |
type features/upcall
|
|
Packit Service |
e080da |
option cache-invalidation off
|
|
Packit Service |
e080da |
subvolumes ${V0}-leases
|
|
Packit Service |
e080da |
end-volume
|
|
Packit Service |
e080da |
|
|
Packit Service |
e080da |
volume ${V0}-io-threads
|
|
Packit Service |
e080da |
type performance/io-threads
|
|
Packit Service |
e080da |
subvolumes ${V0}-upcall
|
|
Packit Service |
e080da |
end-volume
|
|
Packit Service |
e080da |
|
|
Packit Service |
e080da |
volume ${V0}-index
|
|
Packit Service |
e080da |
type features/index
|
|
Packit Service |
e080da |
option xattrop-pending-watchlist trusted.afr.${V0}-
|
|
Packit Service |
e080da |
option xattrop-dirty-watchlist trusted.afr.dirty
|
|
Packit Service |
e080da |
option index-base $b/.glusterfs/indices
|
|
Packit Service |
e080da |
subvolumes ${V0}-io-threads
|
|
Packit Service |
e080da |
end-volume
|
|
Packit Service |
e080da |
|
|
Packit Service |
e080da |
volume ${V0}-io-stats
|
|
Packit Service |
e080da |
type debug/io-stats
|
|
Packit Service |
e080da |
option count-fop-hits off
|
|
Packit Service |
e080da |
option latency-measurement off
|
|
Packit Service |
e080da |
option log-level INFO
|
|
Packit Service |
e080da |
option unique-id $b
|
|
Packit Service |
e080da |
subvolumes ${V0}-index
|
|
Packit Service |
e080da |
end-volume
|
|
Packit Service |
e080da |
|
|
Packit Service |
e080da |
volume $b
|
|
Packit Service |
e080da |
type performance/decompounder
|
|
Packit Service |
e080da |
subvolumes ${V0}-io-stats
|
|
Packit Service |
e080da |
end-volume
|
|
Packit Service |
e080da |
|
|
Packit Service |
e080da |
volume ${V0}-server
|
|
Packit Service |
e080da |
type protocol/server
|
|
Packit Service |
e080da |
option transport.listen-backlog 1024
|
|
Packit Service |
e080da |
option transport.socket.keepalive-count 9
|
|
Packit Service |
e080da |
option transport.socket.keepalive-interval 2
|
|
Packit Service |
e080da |
option transport.socket.keepalive-time 20
|
|
Packit Service |
e080da |
option transport.tcp-user-timeout 0
|
|
Packit Service |
e080da |
option transport.socket.keepalive 1
|
|
Packit Service |
e080da |
option auth.addr.$b.allow *
|
|
Packit Service |
e080da |
option auth-path $b
|
|
Packit Service |
e080da |
option auth.login.459d48e8-2a92-4f11-89f2-077b29f6f86d.password a0ad63dd-8314-4f97-9160-1b93e3cb1f0b
|
|
Packit Service |
e080da |
option auth.login.$b.allow 459d48e8-2a92-4f11-89f2-077b29f6f86d
|
|
Packit Service |
e080da |
option transport.address-family inet
|
|
Packit Service |
e080da |
option transport-type tcp
|
|
Packit Service |
e080da |
subvolumes $b
|
|
Packit Service |
e080da |
end-volume
|
|
Packit Service |
e080da |
EOF
|
|
Packit Service |
e080da |
}
|
|
Packit Service |
e080da |
|
|
Packit Service |
e080da |
function ta_set_port_by_name()
|
|
Packit Service |
e080da |
{
|
|
Packit Service |
e080da |
if [ -z ${PORTMAP[$1]} ]
|
|
Packit Service |
e080da |
then
|
|
Packit Service |
e080da |
PORTMAP[$1]=$PORTCURR
|
|
Packit Service |
e080da |
PORTCURR=$((PORTCURR+1))
|
|
Packit Service |
e080da |
fi
|
|
Packit Service |
e080da |
}
|
|
Packit Service |
e080da |
|
|
Packit Service |
e080da |
function ta_start_brick_process()
|
|
Packit Service |
e080da |
{
|
|
Packit Service |
e080da |
ta_set_port_by_name $1
|
|
Packit Service |
e080da |
local p=${PORTMAP[$1]}
|
|
Packit Service |
e080da |
if glusterfs -p $B0/${1}.pid --volfile=$B0/${1}.vol -l $(gluster --print-logdir)/${1}.log --xlator-option ${V0}-server.listen-port=$p
|
|
Packit Service |
e080da |
then
|
|
Packit Service |
e080da |
cat $B0/${1}.pid
|
|
Packit Service |
e080da |
else
|
|
Packit Service |
e080da |
echo ""
|
|
Packit Service |
e080da |
return 1
|
|
Packit Service |
e080da |
fi
|
|
Packit Service |
e080da |
}
|
|
Packit Service |
e080da |
|
|
Packit Service |
e080da |
function ta_start_ta_process()
|
|
Packit Service |
e080da |
{
|
|
Packit Service |
e080da |
ta_set_port_by_name $1
|
|
Packit Service |
e080da |
local p=${PORTMAP[$1]}
|
|
Packit Service |
e080da |
if glusterfs -p $B0/${1}.pid --volfile=$B0/${1}.vol -l $(gluster --print-logdir)/${1}.log --xlator-option ta-server.listen-port=$p
|
|
Packit Service |
e080da |
then
|
|
Packit Service |
e080da |
cat $B0/${1}.pid
|
|
Packit Service |
e080da |
else
|
|
Packit Service |
e080da |
echo ""
|
|
Packit Service |
e080da |
return 1
|
|
Packit Service |
e080da |
fi
|
|
Packit Service |
e080da |
}
|
|
Packit Service |
e080da |
|
|
Packit Service |
e080da |
function ta_start_mount_process()
|
|
Packit Service |
e080da |
{
|
|
Packit Service |
e080da |
mkdir -p $1
|
|
Packit Service |
e080da |
identifier=$(echo $1 | tr / .)
|
|
Packit Service |
e080da |
if glusterfs -p $B0/${identifier}.pid --volfile=$B0/mount.vol $1
|
|
Packit Service |
e080da |
then
|
|
Packit Service |
e080da |
cat $B0/$identifier.pid
|
|
Packit Service |
e080da |
else
|
|
Packit Service |
e080da |
echo ""
|
|
Packit Service |
e080da |
return 1
|
|
Packit Service |
e080da |
fi
|
|
Packit Service |
e080da |
}
|
|
Packit Service |
e080da |
|
|
Packit Service |
e080da |
function ta_create_mount_volfile()
|
|
Packit Service |
e080da |
{
|
|
Packit Service |
e080da |
local b0=$B0/$1
|
|
Packit Service |
e080da |
local b1=$B0/$2
|
|
Packit Service |
e080da |
local ta=$B0/$3
|
|
Packit Service |
e080da |
local b0_port=${PORTMAP[$1]}
|
|
Packit Service |
e080da |
local b1_port=${PORTMAP[$2]}
|
|
Packit Service |
e080da |
local ta_port=${PORTMAP[$3]}
|
|
Packit Service |
e080da |
cat > $B0/mount.vol <
|
|
Packit Service |
e080da |
volume ${V0}-client-0
|
|
Packit Service |
e080da |
type protocol/client
|
|
Packit Service |
e080da |
option remote-host $H0
|
|
Packit Service |
e080da |
option client-bind-insecure off
|
|
Packit Service |
e080da |
option transport.socket.keepalive-interval 2
|
|
Packit Service |
e080da |
option transport.socket.keepalive-time 20
|
|
Packit Service |
e080da |
option transport.socket.ssl-enabled off
|
|
Packit Service |
e080da |
option remote-subvolume $b0
|
|
Packit Service |
e080da |
option transport.tcp-user-timeout 0
|
|
Packit Service |
e080da |
option transport.socket.keepalive-count 9
|
|
Packit Service |
e080da |
option transport-type tcp
|
|
Packit Service |
e080da |
option ping-timeout 42
|
|
Packit Service |
e080da |
option send-gids on
|
|
Packit Service |
e080da |
option remote-port $b0_port
|
|
Packit Service |
e080da |
option password a0ad63dd-8314-4f97-9160-1b93e3cb1f0b
|
|
Packit Service |
e080da |
option username 459d48e8-2a92-4f11-89f2-077b29f6f86d
|
|
Packit Service |
e080da |
end-volume
|
|
Packit Service |
e080da |
|
|
Packit Service |
e080da |
volume ${V0}-client-1
|
|
Packit Service |
e080da |
type protocol/client
|
|
Packit Service |
e080da |
option remote-host $H0
|
|
Packit Service |
e080da |
option client-bind-insecure off
|
|
Packit Service |
e080da |
option transport.socket.keepalive-interval 2
|
|
Packit Service |
e080da |
option transport.socket.keepalive-time 20
|
|
Packit Service |
e080da |
option transport.socket.ssl-enabled off
|
|
Packit Service |
e080da |
option remote-subvolume $b1
|
|
Packit Service |
e080da |
option transport.tcp-user-timeout 0
|
|
Packit Service |
e080da |
option transport.socket.keepalive-count 9
|
|
Packit Service |
e080da |
option transport-type tcp
|
|
Packit Service |
e080da |
option ping-timeout 42
|
|
Packit Service |
e080da |
option send-gids on
|
|
Packit Service |
e080da |
option remote-port $b1_port
|
|
Packit Service |
e080da |
option password a0ad63dd-8314-4f97-9160-1b93e3cb1f0b
|
|
Packit Service |
e080da |
option username 459d48e8-2a92-4f11-89f2-077b29f6f86d
|
|
Packit Service |
e080da |
end-volume
|
|
Packit Service |
e080da |
|
|
Packit Service |
e080da |
volume ${V0}-thin-arbiter-client
|
|
Packit Service |
e080da |
type protocol/client
|
|
Packit Service |
e080da |
option client-bind-insecure off
|
|
Packit Service |
e080da |
option transport.socket.ssl-enabled off
|
|
Packit Service |
e080da |
option remote-subvolume $ta
|
|
Packit Service |
e080da |
option ping-timeout 42
|
|
Packit Service |
e080da |
option remote-host $H0
|
|
Packit Service |
e080da |
option send-gids on
|
|
Packit Service |
e080da |
option transport.socket.keepalive-interval 2
|
|
Packit Service |
e080da |
option remote-port $ta_port
|
|
Packit Service |
e080da |
option transport-type tcp
|
|
Packit Service |
e080da |
option transport.tcp-user-timeout 0
|
|
Packit Service |
e080da |
option transport.socket.keepalive-time 20
|
|
Packit Service |
e080da |
option transport.socket.keepalive-count 9
|
|
Packit Service |
e080da |
end-volume
|
|
Packit Service |
e080da |
|
|
Packit Service |
e080da |
volume ${V0}-replicate-0
|
|
Packit Service |
e080da |
type cluster/replicate
|
|
Packit Service |
e080da |
option afr-dirty-xattr trusted.afr.dirty
|
|
Packit Service |
e080da |
option iam-self-heal-daemon off
|
|
Packit Service |
e080da |
option afr-pending-xattr ${V0}-client-0,${V0}-client-1,${V0}-ta-2
|
|
Packit Service |
e080da |
option thin-arbiter $H0:$ta
|
|
Packit Service |
e080da |
subvolumes ${V0}-client-0 ${V0}-client-1 ${V0}-thin-arbiter-client
|
|
Packit Service |
e080da |
end-volume
|
|
Packit Service |
e080da |
|
|
Packit Service |
e080da |
volume ${V0}-distribute
|
|
Packit Service |
e080da |
type cluster/distribute
|
|
Packit Service |
e080da |
option tier-hot-compact-frequency 604800
|
|
Packit Service |
e080da |
option rebal-throttle normal
|
|
Packit Service |
e080da |
option force-migration off
|
|
Packit Service |
e080da |
option lookup-optimize on
|
|
Packit Service |
e080da |
option weighted-rebalance on
|
|
Packit Service |
e080da |
option write-freq-threshold 0
|
|
Packit Service |
e080da |
option assert-no-child-down off
|
|
Packit Service |
e080da |
option tier-pause off
|
|
Packit Service |
e080da |
option watermark-low 75
|
|
Packit Service |
e080da |
option tier-compact off
|
|
Packit Service |
e080da |
option lock-migration off
|
|
Packit Service |
e080da |
option lookup-unhashed on
|
|
Packit Service |
e080da |
option tier-demote-frequency 3600
|
|
Packit Service |
e080da |
option watermark-hi 90
|
|
Packit Service |
e080da |
option tier-cold-compact-frequency 604800
|
|
Packit Service |
e080da |
option randomize-hash-range-by-gfid off
|
|
Packit Service |
e080da |
option unhashed-sticky-bit off
|
|
Packit Service |
e080da |
option use-readdirp on
|
|
Packit Service |
e080da |
option readdir-optimize off
|
|
Packit Service |
e080da |
option xattr-name trusted.glusterfs.dht
|
|
Packit Service |
e080da |
option tier-max-mb 4000
|
|
Packit Service |
e080da |
option tier-max-files 10000
|
|
Packit Service |
e080da |
option tier-query-limit 100
|
|
Packit Service |
e080da |
option read-freq-threshold 0
|
|
Packit Service |
e080da |
option tier-mode test
|
|
Packit Service |
e080da |
option tier-max-promote-file-size 0
|
|
Packit Service |
e080da |
option tier-promote-frequency 120
|
|
Packit Service |
e080da |
option min-free-disk 10%
|
|
Packit Service |
e080da |
option min-free-inodes 5%
|
|
Packit Service |
e080da |
option rebalance-stats off
|
|
Packit Service |
e080da |
subvolumes ${V0}-replicate-0
|
|
Packit Service |
e080da |
end-volume
|
|
Packit Service |
e080da |
|
|
Packit Service |
e080da |
volume ${V0}-write-behind
|
|
Packit Service |
e080da |
type performance/write-behind
|
|
Packit Service |
e080da |
option strict-O_DIRECT off
|
|
Packit Service |
e080da |
option strict-write-ordering off
|
|
Packit Service |
e080da |
option resync-failed-syncs-after-fsync off
|
|
Packit Service |
e080da |
option aggregate-size 128KB
|
|
Packit Service |
e080da |
option flush-behind on
|
|
Packit Service |
e080da |
option cache-size 1MB
|
|
Packit Service |
e080da |
option trickling-writes on
|
|
Packit Service |
e080da |
subvolumes ${V0}-distribute
|
|
Packit Service |
e080da |
end-volume
|
|
Packit Service |
e080da |
|
|
Packit Service |
e080da |
volume ${V0}-read-ahead
|
|
Packit Service |
e080da |
type performance/read-ahead
|
|
Packit Service |
e080da |
option force-atime-update false
|
|
Packit Service |
e080da |
option page-count 4
|
|
Packit Service |
e080da |
option page-size 131072
|
|
Packit Service |
e080da |
option pass-through false
|
|
Packit Service |
e080da |
subvolumes ${V0}-write-behind
|
|
Packit Service |
e080da |
end-volume
|
|
Packit Service |
e080da |
|
|
Packit Service |
e080da |
volume ${V0}-readdir-ahead
|
|
Packit Service |
e080da |
type performance/readdir-ahead
|
|
Packit Service |
e080da |
option rda-low-wmark 4096
|
|
Packit Service |
e080da |
option rda-high-wmark 128KB
|
|
Packit Service |
e080da |
option rda-cache-limit 10MB
|
|
Packit Service |
e080da |
option parallel-readdir off
|
|
Packit Service |
e080da |
option pass-through false
|
|
Packit Service |
e080da |
option rda-request-size 131072
|
|
Packit Service |
e080da |
subvolumes ${V0}-read-ahead
|
|
Packit Service |
e080da |
end-volume
|
|
Packit Service |
e080da |
|
|
Packit Service |
e080da |
volume ${V0}-io-cache
|
|
Packit Service |
e080da |
type performance/io-cache
|
|
Packit Service |
e080da |
option cache-timeout 1
|
|
Packit Service |
e080da |
option cache-size 32MB
|
|
Packit Service |
e080da |
option min-file-size 0
|
|
Packit Service |
e080da |
option max-file-size 0
|
|
Packit Service |
e080da |
option pass-through false
|
|
Packit Service |
e080da |
subvolumes ${V0}-readdir-ahead
|
|
Packit Service |
e080da |
end-volume
|
|
Packit Service |
e080da |
|
|
Packit Service |
e080da |
volume ${V0}-quick-read
|
|
Packit Service |
e080da |
type performance/quick-read
|
|
Packit Service |
e080da |
option cache-invalidation false
|
|
Packit Service |
e080da |
option ctime-invalidation false
|
|
Packit Service |
e080da |
option cache-size 128MB
|
|
Packit Service |
e080da |
option cache-timeout 1
|
|
Packit Service |
e080da |
option max-file-size 64KB
|
|
Packit Service |
e080da |
subvolumes ${V0}-io-cache
|
|
Packit Service |
e080da |
end-volume
|
|
Packit Service |
e080da |
|
|
Packit Service |
e080da |
volume ${V0}-open-behind
|
|
Packit Service |
e080da |
type performance/open-behind
|
|
Packit Service |
e080da |
option use-anonymous-fd yes
|
|
Packit Service |
e080da |
option lazy-open yes
|
|
Packit Service |
e080da |
option read-after-open no
|
|
Packit Service |
e080da |
option pass-through false
|
|
Packit Service |
e080da |
subvolumes ${V0}-quick-read
|
|
Packit Service |
e080da |
end-volume
|
|
Packit Service |
e080da |
|
|
Packit Service |
e080da |
volume ${V0}-md-cache
|
|
Packit Service |
e080da |
type performance/md-cache
|
|
Packit Service |
e080da |
option pass-through false
|
|
Packit Service |
e080da |
option cache-capability-xattrs true
|
|
Packit Service |
e080da |
option cache-posix-acl false
|
|
Packit Service |
e080da |
option cache-swift-metadata true
|
|
Packit Service |
e080da |
option cache-samba-metadata false
|
|
Packit Service |
e080da |
option md-cache-timeout 1
|
|
Packit Service |
e080da |
option force-readdirp true
|
|
Packit Service |
e080da |
option cache-invalidation false
|
|
Packit Service |
e080da |
option md-cache-statfs off
|
|
Packit Service |
e080da |
option cache-selinux false
|
|
Packit Service |
e080da |
option cache-ima-xattrs true
|
|
Packit Service |
e080da |
subvolumes ${V0}-open-behind
|
|
Packit Service |
e080da |
end-volume
|
|
Packit Service |
e080da |
|
|
Packit Service |
e080da |
volume ${V0}-io-threads
|
|
Packit Service |
e080da |
type performance/io-threads
|
|
Packit Service |
e080da |
option normal-prio-threads 16
|
|
Packit Service |
e080da |
option enable-least-priority on
|
|
Packit Service |
e080da |
option idle-time 120
|
|
Packit Service |
e080da |
option cleanup-disconnected-reqs off
|
|
Packit Service |
e080da |
option pass-through false
|
|
Packit Service |
e080da |
option thread-count 16
|
|
Packit Service |
e080da |
option high-prio-threads 16
|
|
Packit Service |
e080da |
option low-prio-threads 16
|
|
Packit Service |
e080da |
option least-prio-threads 1
|
|
Packit Service |
e080da |
subvolumes ${V0}-md-cache
|
|
Packit Service |
e080da |
end-volume
|
|
Packit Service |
e080da |
|
|
Packit Service |
e080da |
volume ${V0}
|
|
Packit Service |
e080da |
type debug/io-stats
|
|
Packit Service |
e080da |
option client-logger gluster-log
|
|
Packit Service |
e080da |
option client-log-buf-size 5
|
|
Packit Service |
e080da |
option latency-measurement off
|
|
Packit Service |
e080da |
option client-log-level INFO
|
|
Packit Service |
e080da |
option brick-log-level INFO
|
|
Packit Service |
e080da |
option count-fop-hits off
|
|
Packit Service |
e080da |
option sys-log-level CRITICAL
|
|
Packit Service |
e080da |
option brick-log-format with-msg-id
|
|
Packit Service |
e080da |
option brick-log-buf-size 5
|
|
Packit Service |
e080da |
option dump-fd-stats off
|
|
Packit Service |
e080da |
option ios-dump-interval 0
|
|
Packit Service |
e080da |
option ios-dump-format json
|
|
Packit Service |
e080da |
option client-log-format with-msg-id
|
|
Packit Service |
e080da |
option log-buf-size 5
|
|
Packit Service |
e080da |
option log-flush-timeout 120
|
|
Packit Service |
e080da |
option client-log-flush-timeout 120
|
|
Packit Service |
e080da |
option ios-sample-interval 0
|
|
Packit Service |
e080da |
option ios-sample-buf-size 65535
|
|
Packit Service |
e080da |
option brick-logger gluster-log
|
|
Packit Service |
e080da |
option ios-dnscache-ttl-sec 86400
|
|
Packit Service |
e080da |
option brick-log-flush-timeout 120
|
|
Packit Service |
e080da |
option unique-id /no/such/path
|
|
Packit Service |
e080da |
subvolumes ${V0}-io-threads
|
|
Packit Service |
e080da |
end-volume
|
|
Packit Service |
e080da |
EOF
|
|
Packit Service |
e080da |
}
|
|
Packit Service |
e080da |
|
|
Packit Service |
e080da |
function ta_kill_brick()
|
|
Packit Service |
e080da |
{
|
|
Packit Service |
e080da |
local p=$(cat $B0/${1}.pid)
|
|
Packit Service |
e080da |
echo > $B0/${1}.pid
|
|
Packit Service |
e080da |
kill -9 $p
|
|
Packit Service |
e080da |
}
|
|
Packit Service |
e080da |
|
|
Packit Service |
e080da |
function ta_get_pid_by_brick_name()
|
|
Packit Service |
e080da |
{
|
|
Packit Service |
e080da |
cat $B0/${1}.pid
|
|
Packit Service |
e080da |
}
|
|
Packit Service |
e080da |
|
|
Packit Service |
e080da |
function ta_up_status()
|
|
Packit Service |
e080da |
{
|
|
Packit Service |
e080da |
local v=$1
|
|
Packit Service |
e080da |
local m=$2
|
|
Packit Service |
e080da |
local replica_id=$3
|
|
Packit Service |
e080da |
grep -E "^up = " $m/.meta/graphs/active/${v}-replicate-${replica_id}/private | cut -f2 -d'='
|
|
Packit Service |
e080da |
}
|
|
Packit Service |
e080da |
|
|
Packit Service |
e080da |
function ta_create_shd_volfile()
|
|
Packit Service |
e080da |
{
|
|
Packit Service |
e080da |
local b0=$B0/$1
|
|
Packit Service |
e080da |
local b1=$B0/$2
|
|
Packit Service |
e080da |
local ta=$B0/$3
|
|
Packit Service |
e080da |
local b0_port=${PORTMAP[$1]}
|
|
Packit Service |
e080da |
local b1_port=${PORTMAP[$2]}
|
|
Packit Service |
e080da |
local ta_port=${PORTMAP[$3]}
|
|
Packit Service |
e080da |
cat > $B0/glustershd.vol <
|
|
Packit Service |
e080da |
volume ${V0}-replicate-0-client-0
|
|
Packit Service |
e080da |
type protocol/client
|
|
Packit Service |
e080da |
option send-gids on
|
|
Packit Service |
e080da |
option transport.socket.lowlat off
|
|
Packit Service |
e080da |
option transport.socket.keepalive-interval 2
|
|
Packit Service |
e080da |
option remote-host $H0
|
|
Packit Service |
e080da |
option remote-subvolume $b0
|
|
Packit Service |
e080da |
option ping-timeout 42
|
|
Packit Service |
e080da |
option client-bind-insecure off
|
|
Packit Service |
e080da |
option transport.socket.own-thread off
|
|
Packit Service |
e080da |
option frame-timeout 1800
|
|
Packit Service |
e080da |
option non-blocking-io off
|
|
Packit Service |
e080da |
option transport.socket.keepalive 1
|
|
Packit Service |
e080da |
option transport.socket.keepalive-count 9
|
|
Packit Service |
e080da |
option transport.tcp-user-timeout 0
|
|
Packit Service |
e080da |
option transport.socket.nodelay 1
|
|
Packit Service |
e080da |
option transport.socket.keepalive-time 20
|
|
Packit Service |
e080da |
option transport.socket.read-fail-log off
|
|
Packit Service |
e080da |
option transport-type tcp
|
|
Packit Service |
e080da |
option filter-O_DIRECT disable
|
|
Packit Service |
e080da |
option event-threads 2
|
|
Packit Service |
e080da |
option transport.listen-backlog 1024
|
|
Packit Service |
e080da |
option transport.socket.ssl-enabled off
|
|
Packit Service |
e080da |
option password a0ad63dd-8314-4f97-9160-1b93e3cb1f0b
|
|
Packit Service |
e080da |
option username 459d48e8-2a92-4f11-89f2-077b29f6f86d
|
|
Packit Service |
e080da |
option remote-port $b0_port
|
|
Packit Service |
e080da |
end-volume
|
|
Packit Service |
e080da |
|
|
Packit Service |
e080da |
volume ${V0}-replicate-0-client-1
|
|
Packit Service |
e080da |
type protocol/client
|
|
Packit Service |
e080da |
option remote-host $H0
|
|
Packit Service |
e080da |
option transport.socket.keepalive-time 20
|
|
Packit Service |
e080da |
option transport.socket.keepalive-count 9
|
|
Packit Service |
e080da |
option transport.socket.own-thread off
|
|
Packit Service |
e080da |
option transport.socket.ssl-enabled off
|
|
Packit Service |
e080da |
option transport-type tcp
|
|
Packit Service |
e080da |
option remote-subvolume $b1
|
|
Packit Service |
e080da |
option event-threads 2
|
|
Packit Service |
e080da |
option transport.tcp-user-timeout 0
|
|
Packit Service |
e080da |
option transport.socket.keepalive 1
|
|
Packit Service |
e080da |
option transport.socket.nodelay 1
|
|
Packit Service |
e080da |
option transport.socket.read-fail-log off
|
|
Packit Service |
e080da |
option frame-timeout 1800
|
|
Packit Service |
e080da |
option ping-timeout 42
|
|
Packit Service |
e080da |
option client-bind-insecure off
|
|
Packit Service |
e080da |
option filter-O_DIRECT disable
|
|
Packit Service |
e080da |
option send-gids on
|
|
Packit Service |
e080da |
option non-blocking-io off
|
|
Packit Service |
e080da |
option transport.listen-backlog 1024
|
|
Packit Service |
e080da |
option transport.socket.lowlat off
|
|
Packit Service |
e080da |
option transport.socket.keepalive-interval 2
|
|
Packit Service |
e080da |
option password a0ad63dd-8314-4f97-9160-1b93e3cb1f0b
|
|
Packit Service |
e080da |
option username 459d48e8-2a92-4f11-89f2-077b29f6f86d
|
|
Packit Service |
e080da |
option remote-port $b1_port
|
|
Packit Service |
e080da |
end-volume
|
|
Packit Service |
e080da |
|
|
Packit Service |
e080da |
volume ${V0}-replicate-0-thin-arbiter-client
|
|
Packit Service |
e080da |
type protocol/client
|
|
Packit Service |
e080da |
option frame-timeout 1800
|
|
Packit Service |
e080da |
option event-threads 2
|
|
Packit Service |
e080da |
option transport.listen-backlog 1024
|
|
Packit Service |
e080da |
option transport.socket.nodelay 1
|
|
Packit Service |
e080da |
option transport.socket.keepalive-count 9
|
|
Packit Service |
e080da |
option transport.socket.ssl-enabled off
|
|
Packit Service |
e080da |
option transport-type tcp
|
|
Packit Service |
e080da |
option remote-subvolume $ta
|
|
Packit Service |
e080da |
option filter-O_DIRECT disable
|
|
Packit Service |
e080da |
option non-blocking-io off
|
|
Packit Service |
e080da |
option transport.socket.lowlat off
|
|
Packit Service |
e080da |
option transport.socket.keepalive-interval 2
|
|
Packit Service |
e080da |
option transport.socket.read-fail-log off
|
|
Packit Service |
e080da |
option remote-host $H0
|
|
Packit Service |
e080da |
option send-gids on
|
|
Packit Service |
e080da |
option transport.tcp-user-timeout 0
|
|
Packit Service |
e080da |
option transport.socket.keepalive-time 20
|
|
Packit Service |
e080da |
option ping-timeout 42
|
|
Packit Service |
e080da |
option client-bind-insecure off
|
|
Packit Service |
e080da |
option transport.socket.keepalive 1
|
|
Packit Service |
e080da |
option transport.socket.own-thread off
|
|
Packit Service |
e080da |
option remote-port $ta_port
|
|
Packit Service |
e080da |
end-volume
|
|
Packit Service |
e080da |
|
|
Packit Service |
e080da |
volume ${V0}-replicate-0
|
|
Packit Service |
e080da |
type cluster/replicate
|
|
Packit Service |
e080da |
option background-self-heal-count 8
|
|
Packit Service |
e080da |
option metadata-self-heal on
|
|
Packit Service |
e080da |
option data-change-log on
|
|
Packit Service |
e080da |
option entrylk-trace off
|
|
Packit Service |
e080da |
option iam-self-heal-daemon yes
|
|
Packit Service |
e080da |
option afr-dirty-xattr trusted.afr.dirty
|
|
Packit Service |
e080da |
option heal-timeout 10
|
|
Packit Service |
e080da |
option read-hash-mode 1
|
|
Packit Service |
e080da |
option metadata-splitbrain-forced-heal off
|
|
Packit Service |
e080da |
option thin-arbiter $H0:$ta
|
|
Packit Service |
e080da |
option shd-max-threads 1
|
|
Packit Service |
e080da |
option afr-pending-xattr ${V0}-client-0,${V0}-client-1,${V0}-ta-2
|
|
Packit Service |
e080da |
option halo-max-latency 5
|
|
Packit Service |
e080da |
option halo-max-replicas 99999
|
|
Packit Service |
e080da |
option entry-change-log on
|
|
Packit Service |
e080da |
option halo-nfsd-max-latency 5
|
|
Packit Service |
e080da |
option inodelk-trace off
|
|
Packit Service |
e080da |
option pre-op-compat on
|
|
Packit Service |
e080da |
option eager-lock on
|
|
Packit Service |
e080da |
option self-heal-readdir-size 1KB
|
|
Packit Service |
e080da |
option ensure-durability on
|
|
Packit Service |
e080da |
option locking-scheme full
|
|
Packit Service |
e080da |
option halo-enabled False
|
|
Packit Service |
e080da |
option heal-wait-queue-length 128
|
|
Packit Service |
e080da |
option entry-self-heal on
|
|
Packit Service |
e080da |
option self-heal-daemon on
|
|
Packit Service |
e080da |
option quorum-reads no
|
|
Packit Service |
e080da |
option shd-wait-qlength 1024
|
|
Packit Service |
e080da |
option choose-local true
|
|
Packit Service |
e080da |
option halo-min-replicas 2
|
|
Packit Service |
e080da |
option data-self-heal on
|
|
Packit Service |
e080da |
option metadata-change-log on
|
|
Packit Service |
e080da |
option consistent-metadata no
|
|
Packit Service |
e080da |
option full-lock yes
|
|
Packit Service |
e080da |
option use-compound-fops no
|
|
Packit Service |
e080da |
option halo-shd-max-latency 99999
|
|
Packit Service |
e080da |
option quorum-type none
|
|
Packit Service |
e080da |
option favorite-child-policy none
|
|
Packit Service |
e080da |
option read-subvolume-index -1
|
|
Packit Service |
e080da |
option optimistic-change-log on
|
|
Packit Service |
e080da |
option iam-nfs-daemon off
|
|
Packit Service |
e080da |
option post-op-delay-secs 1
|
|
Packit Service |
e080da |
option granular-entry-heal no
|
|
Packit Service |
e080da |
option consistent-io no
|
|
Packit Service |
e080da |
option data-self-heal-window-size 1
|
|
Packit Service |
e080da |
subvolumes ${V0}-replicate-0-client-0 ${V0}-replicate-0-client-1 ${V0}-replicate-0-thin-arbiter-client
|
|
Packit Service |
e080da |
end-volume
|
|
Packit Service |
e080da |
|
|
Packit Service |
e080da |
volume glustershd
|
|
Packit Service |
e080da |
type debug/io-stats
|
|
Packit Service |
e080da |
option log-buf-size 5
|
|
Packit Service |
e080da |
option ios-dump-format json
|
|
Packit Service |
e080da |
option latency-measurement off
|
|
Packit Service |
e080da |
option sys-log-level CRITICAL
|
|
Packit Service |
e080da |
option brick-log-level INFO
|
|
Packit Service |
e080da |
option client-logger gluster-log
|
|
Packit Service |
e080da |
option client-log-format with-msg-id
|
|
Packit Service |
e080da |
option brick-log-format with-msg-id
|
|
Packit Service |
e080da |
option client-log-buf-size 5
|
|
Packit Service |
e080da |
option log-flush-timeout 120
|
|
Packit Service |
e080da |
option ios-dump-interval 0
|
|
Packit Service |
e080da |
option ios-sample-interval 0
|
|
Packit Service |
e080da |
option ios-dnscache-ttl-sec 86400
|
|
Packit Service |
e080da |
option count-fop-hits off
|
|
Packit Service |
e080da |
option client-log-level INFO
|
|
Packit Service |
e080da |
option brick-logger gluster-log
|
|
Packit Service |
e080da |
option brick-log-buf-size 5
|
|
Packit Service |
e080da |
option ios-sample-buf-size 65535
|
|
Packit Service |
e080da |
option client-log-flush-timeout 120
|
|
Packit Service |
e080da |
option brick-log-flush-timeout 120
|
|
Packit Service |
e080da |
option unique-id /no/such/path
|
|
Packit Service |
e080da |
option dump-fd-stats off
|
|
Packit Service |
e080da |
subvolumes ${V0}-replicate-0
|
|
Packit Service |
e080da |
end-volume
|
|
Packit Service |
e080da |
EOF
|
|
Packit Service |
e080da |
}
|
|
Packit Service |
e080da |
|
|
Packit Service |
e080da |
function ta_start_shd_process()
|
|
Packit Service |
e080da |
{
|
|
Packit Service |
e080da |
if glusterfs -p $B0/${1}.pid --volfile=$B0/${1}.vol -l $(gluster --print-logdir)/${1}.log --process-name=glustershd
|
|
Packit Service |
e080da |
then
|
|
Packit Service |
e080da |
cat $B0/${1}.pid
|
|
Packit Service |
e080da |
else
|
|
Packit Service |
e080da |
echo ""
|
|
Packit Service |
e080da |
return 1
|
|
Packit Service |
e080da |
fi
|
|
Packit Service |
e080da |
}
|