summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--glusterfs.spec.in20
1 files changed, 20 insertions, 0 deletions
diff --git a/glusterfs.spec.in b/glusterfs.spec.in
index c07666f7a94..efed334a234 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