summaryrefslogtreecommitdiffstats
path: root/extras/pre-upgrade-script-for-quota.sh
blob: 522e41206d0af3a6df46ef586d0c8898af78367e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/bin/bash

#Make sure glusterd and the brick processes are running on all nodes in the
#cluster.
#This script must be run prior to upgrading the cluster to 3.5, that too on
#only one of the nodes in the cluster.

mkdir -p /tmp/quota-config-backup
for i in `gluster volume list`; do
        var=$(gluster volume info $i | grep 'features.quota'| cut -d" " -f2);
        if  [ -z "$var" ] || [ "$var" == "off" ]; then
                continue
        else
                gluster volume quota $i list > /tmp/quota-config-backup/vol_$i;
        fi;
done