Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Merged
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
12 changes: 6 additions & 6 deletions 12 scripts/vm/hypervisor/xenserver/setup_heartbeat_sr.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
#
# http://www.apache.org/licenses/LICENSE-2.0
#
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
Expand All @@ -17,7 +17,7 @@
# under the License.

#set -x

usage() {
echo "Usage: $(basename $0) [uuid of this host] [uuid of the sr to place the heartbeat]"

Expand All @@ -40,7 +40,7 @@ if [ `xe host-list | grep $1 | wc -l` -ne 1 ]; then
exit 0
fi

if [ `xe sr-list uuid=$2 | wc -l` -eq 0 ]; then
if [ `xe sr-list uuid=$2 | wc -l` -eq 0 ]; then
echo "#4# Unable to find SR with uuid: $2"
exit 0
fi
Expand All @@ -60,7 +60,7 @@ if [ "$srtype" == "nfs" ];then
date=`date +%s`
echo "$date" > $filename
fi
else
else
dir=/dev/VG_XenStorage-$2
link=$dir/hb-$1
lv=`lvscan | grep $link`
Expand All @@ -72,7 +72,7 @@ else
fi
rm $link -f
fi
if [ -f /etc/redhat-release ] && grep -q "XenServer release 7." /etc/redhat-release; then
if [ -f /etc/redhat-release ] && grep -q -E "(XenServer|XCP-ng) release (7|8)." /etc/redhat-release; then
lvcreate VG_XenStorage-$2 -n hb-$1 --size 4M --config global{metadata_read_only=0}
else
lvcreate VG_XenStorage-$2 -n hb-$1 --size 4M
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.