Skip to content
This repository was archived by the owner on Apr 24, 2026. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 12 additions & 4 deletions Fedora/gluster-brickmultiplex.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,19 @@ main () {

GLUSTER_BRICKMULTIPLEX=${GLUSTER_BRICKMULTIPLEX-yes}

# initialize the log file
> $GLUSTERFS_LOG_CONT_DIR/brickmultiplexing

GLUSTER_BRICKMULTIPLEX_SETTING="$( \
gluster --mode=script volume get all cluster.brick-multiplex \
| grep '^cluster.brick-multiplex' \
| awk '{print $2}')"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can skip the grep if you do this:

awk '/^cluster.brick-multiplex/ {print $2}'


echo "current cluster brick-multiplexing setting: ${GLUSTER_BRICKMULTIPLEX_SETTING}" >> $GLUSTERFS_LOG_CONT_DIR/brickmultiplexing

case "$GLUSTER_BRICKMULTIPLEX" in
[nN] | [nN][Oo] )
gluster v info | grep 'cluster.brick-multiplex: off' > $GLUSTERFS_LOG_CONT_DIR/brickmultiplexing
if [[ ${?} == 0 ]]; then
if [[ "${GLUSTER_BRICKMULTIPLEX_SETTING}" == "disable" ]]; then

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Before the check was for "off", now it is "disable"? What does gluster --mode=script volume get all cluster.brick-multiplex really return?

echo "cluster brick-multiplexing already disabled." >> $GLUSTERFS_LOG_CONT_DIR/brickmultiplexing
exit 0
fi
Expand All @@ -45,8 +54,7 @@ main () {
exit 0
;;
[yY] | [yY][Ee][Ss] )
gluster v info | grep 'cluster.brick-multiplex: on' > $GLUSTERFS_LOG_CONT_DIR/brickmultiplexing
if [[ ${?} == 0 ]]; then
if [[ "${GLUSTER_BRICKMULTIPLEX_SETTING}" == "on" ]]; then
echo "cluster brick-multiplexing already set." >> $GLUSTERFS_LOG_CONT_DIR/brickmultiplexing
exit 0
fi
Expand Down