Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resolves #117 Attempts to retry failed mounts of bricks #118

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
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
11 changes: 8 additions & 3 deletions CentOS/gluster-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,17 @@ main () {

mount -a --fstab $GLUSTERFS_CUSTOM_FSTAB &> $GLUSTERFS_LOG_CONT_DIR/mountfstab
sts=$?
if [ $sts -ne 0 ]
if [ $sts -eq 1 -o $sts -eq 2 -o $sts -eq 4 ]
then
echo "mount command exited with code ${sts}" >> $GLUSTERFS_LOG_CONT_DIR/mountfstab
exit 1
fi
echo "Mount command Successful" >> $GLUSTERFS_LOG_CONT_DIR/mountfstab
if [ $sts -ne 0 ]
then
echo "mount command non-fatal error with ${sts}" >> $GLUSTERFS_LOG_CONT_DIR/mountfstab
else
echo "Mount command Successful" >> $GLUSTERFS_LOG_CONT_DIR/mountfstab
fi
sleep 40
cut -f 2 -d " " $GLUSTERFS_CUSTOM_FSTAB | while read -r line
do
Expand All @@ -83,7 +88,7 @@ main () {
sleep 0.5
fi
done
if [ "$(wc -l $GLUSTERFS_LOG_CONT_DIR/failed_bricks )" -gt 1 ]
if [ "$((cat $GLUSTERFS_LOG_CONT_DIR/failed_bricks | wc -l) )" -gt 1 ]
then
vgscan --mknodes > $GLUSTERFS_LOG_CONT_DIR/vgscan_mknodes
sleep 10
Expand Down