summaryrefslogtreecommitdiffstats
path: root/extras/hook-scripts/Makefile.am
diff options
context:
space:
mode:
authorVarun Shastry <vshastry@redhat.com>2013-10-15 17:25:51 +0530
committerAnand Avati <avati@redhat.com>2013-11-26 11:57:11 -0800
commit50a6e9a74014897b003cadbd297fd0343eb56367 (patch)
tree171cded6a73ebf7441d53f301859c5665d2ba7e9 /extras/hook-scripts/Makefile.am
parent8690388bc7b3fe92c5dfc43a7173d5f05137e9cd (diff)
features/quota: Add the quota config xattr to newly added brick
Issue: Quota directory limit configuration is stored in the xattrs. When a new brick is added these 'limit-set' xattrs have to be created to the directory in the new brick. This is done by the dht directory healing when the directory is created in the new brick. Since 'root' directory is already created DHT doesn't heal the limit-set xattr root. Solution: When the add-brick command is issued run the below hook script to heal the 'limit-set' xattr. The hook script does the following only if limit is configured on root. 1. Create an auxiliary mount. 2. getxattr 'limit-set' on the root 3. setxattr the same value on the root But this script needs the volume to be started to make the auxiliary mount. To handle the case when the add-brick is issued when the volume was stopped, symlink is created by the 'master' script to the corresponding location and these two are by default disabled. So, a 'master' script is added in the add-brick/pre. When add-brick command is issued, it enables one of the scripts mentioned above based on the condition, if volume is started - enable add-brick/post script else - enable start/post script After the actual script completes its job, it disables itself. Note: The enabling and disabling of the script is based on the glusterd's logic, that it only runs the scripts which starts its name with 'S'. So, Enable - symlink the file to 'S'* Disable - unlink the symlink. Change-Id: I2d3947a4d686c54417ec95f530af3bdd3444f4e2 BUG: 969461 Signed-off-by: Varun Shastry <vshastry@redhat.com> Reviewed-on: http://review.gluster.org/6104 Reviewed-by: Brian Foster <bfoster@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
Diffstat (limited to 'extras/hook-scripts/Makefile.am')
-rw-r--r--extras/hook-scripts/Makefile.am1
1 files changed, 1 insertions, 0 deletions
diff --git a/extras/hook-scripts/Makefile.am b/extras/hook-scripts/Makefile.am
index f6bded20cbe..0e542b4ccac 100644
--- a/extras/hook-scripts/Makefile.am
+++ b/extras/hook-scripts/Makefile.am
@@ -1 +1,2 @@
EXTRA_DIST = S29CTDBsetup.sh S30samba-start.sh S30samba-stop.sh S30samba-set.sh S56glusterd-geo-rep-create-post.sh
+SUBDIRS = add-brick