summaryrefslogtreecommitdiffstats
path: root/scripts/maintain/gluster/bricks_populate.sh
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/maintain/gluster/bricks_populate.sh')
-rw-r--r--scripts/maintain/gluster/bricks_populate.sh11
1 files changed, 11 insertions, 0 deletions
diff --git a/scripts/maintain/gluster/bricks_populate.sh b/scripts/maintain/gluster/bricks_populate.sh
new file mode 100644
index 0000000..15790a1
--- /dev/null
+++ b/scripts/maintain/gluster/bricks_populate.sh
@@ -0,0 +1,11 @@
+for brick in brick-*; do
+ [ -d $brick/.glusterfs ] && continue
+ name=${brick#brick-}
+
+ echo "$name - $brick"
+
+ setfattr -n trusted.gfid -v 0sAAAAAAAAAAAAAAAAAAAAAQ== /mnt/ands/glusterfs/$brick
+ setfattr -n trusted.glusterfs.volume-id -v 0x$(gluster volume info $name | grep 'Volume ID' | awk '{print $3}' | tr -d '-') /mnt/ands/glusterfs/$brick
+ mkdir -p /mnt/ands/glusterfs/$brick/.glusterfs/{indices,exports,xattrop,locks}
+
+done