summaryrefslogtreecommitdiffstats
path: root/glusterfs.spec.in
diff options
context:
space:
mode:
authorLakshmipathi <lakshmipathi@gluster.com>2011-05-30 04:45:19 +0000
committerAnand Avati <avati@gluster.com>2011-05-31 10:17:51 -0700
commit8b53f87878d0eae5bab521d3d429ca19ea903d9a (patch)
tree964592abbe3b27fd7dde5ddea94b244e310c206f /glusterfs.spec.in
parent5f1c41d9088272617fd1afeccd679abdb5f36a3f (diff)
build : with rpm install invoke glusterd upgrade option to modify vol files and start
Signed-off-by: Lakshmipathi.G <lakshmipathi@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 2904 (glusterd should have upgrade/downgrade xlator options) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2904
Diffstat (limited to 'glusterfs.spec.in')
-rw-r--r--glusterfs.spec.in20
1 files changed, 20 insertions, 0 deletions
diff --git a/glusterfs.spec.in b/glusterfs.spec.in
index c07666f7a..efed334a2 100644
--- a/glusterfs.spec.in
+++ b/glusterfs.spec.in
@@ -165,11 +165,31 @@ find %{buildroot}%{_libdir} -name '*.a' | xargs rm -f
echo "%{_prefix}/lib64" > /etc/ld.so.conf.d/glusterfs.conf
/sbin/ldconfig
+if [ -d /etc/glusterd/vols ]; then
+#for each dir under vols, backup non-fuse .vol files as .Vol.old
+for file in `find /etc/glusterd/vols -type f ! -name *-fuse.vol `;
+do
+grep ".vol" $file &> /dev/null && fname=`basename $file .vol` && dname=`dirname $file` && cp $file $dname/$fname.Vol.old
+done
+fi
+
pidof -c -o %PPID -x glusterd &> /dev/null
if [ $? -eq 0 ];
then
kill -9 `pgrep -f gsyncd.py` &> /dev/null
+
+killall glusterd &> /dev/null
+#add marker translator
+glusterd --xlator-option *.upgrade=on
+sleep 10
+killall glusterd &> /dev/null
+#start glusterd normally.
/etc/init.d/glusterd restart &> /dev/null
+
+else
+glusterd --xlator-option *.upgrade=on
+sleep 10
+killall glusterd &> /dev/null
fi
%postun core