summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src/glusterd-rebalance.c
Commit message (Collapse)AuthorAgeFilesLines
* glusterd rebalance: ignore 'selinux' xattrsv3.2.5qa1Amar Tumballi2011-10-171-0/+8
| | | | | | | | Change-Id: I145c12f529459f5c10ba1b8a28cb64ac07d2d2a9 BUG: 3721 Reviewed-on: http://review.gluster.com/605 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
* glusterd rebalance: remove stale temporary file if migration failsAmar Tumballi2011-10-101-0/+5
| | | | | | | | | Change-Id: Ie13b0f2748b15c0359b7868460d4bc65ec05a217 BUG: 3576 Reviewed-on: http://review.gluster.com/552 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
* Change Copyright current yearPranith Kumar K2011-08-101-1/+1
| | | | | | | | Change-Id: Id1f1a91cf15d933d5621a0073ddaebe02df0f159 BUG: 3348 Reviewed-on: http://review.gluster.com/198 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@gluster.com>
* LICENSE: s/GNU Affero General Public/GNU General Public/Pranith Kumar K2011-08-061-3/+3
| | | | | | | | Change-Id: Ibf5f45431d7a55b70d7304649af652d6f25bb688 BUG: 3348 Reviewed-on: http://review.gluster.com/183 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@gluster.com>
* Preserve atimes and mtimes during rebalanceHarshavardhana2011-07-231-1/+17
| | | | | | | | | | | | | | | Applications relying on mtime get affected by existing rebalance since it always updates destination file to latest timestamp. - Use utimes to update destination path with existing values from earlier stat call. Change-Id: I809a8d3ca13c5317da66737356c24e82d795ff78 BUG: 3210 Reviewed-on: http://review.gluster.com/74 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@gluster.com>
* glusterd rebalance: handle the write failure properlyAmar Tumballi2011-07-221-10/+53
| | | | | | | | | | | also, make sure the sizes are same before renaming the target file to the original file, hence prevent a possible data-loss. Change-Id: Ie88224ba62a4604f8c0149f84fa462abfbd6ad78 BUG: 3193 Reviewed-on: http://review.gluster.com/27 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@gluster.com>
* glusterd rebalance: use lstat() instead of stat()Amar Tumballi2011-07-191-6/+6
| | | | | | | | | | | | so the symlinks pointing to directories are not considered as directories themself and the control flows outside gluster's scope Change-Id: Iae910ce6c68886d34ae6e5efe46062481b40cd25 BUG: 3191 Reviewed-on: http://review.gluster.com/26 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@gluster.com>
* glusterd rebalance: mount with '--acl' option for rebalancing.Amar Tumballi2011-07-121-1/+1
| | | | | | | | | | so posix-acl xattrs gets rebalanced too. Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 3069 ('gluster rebalance' doesn't preserve any of the extended attributes of the migrated file) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=3069
* glusterd rebalance: bring in feature to migrate extended attributes tooAmar Tumballi2011-07-121-0/+61
| | | | | | | | | | | | | currently when a file gets migrated, the extended attributes of the files are getting lost (which should be treated as data-loss). Change-Id: I7068e6b67e614f2016e6eae92c247990ae01e74a Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 3069 ('gluster rebalance' doesn't preserve any of the extended attributes of the migrated file) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=3069
* temporary workaround for mtab update race thingyCsaba Henk2011-04-121-0/+2
| | | | | | | | Signed-off-by: Csaba Henk <csaba@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 2690 (race between mtab updates of mount and umount) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2690
* gluster rebalance: don't move a hardlinked file.Amar Tumballi2011-04-081-2/+7
| | | | | | | | Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Vijay Bellur <vijay@gluster.com> BUG: 2258 (enhance gluster volume rebalance) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2258
* gluster rebalance: don't depend on the sticky bit for validating link file.Amar Tumballi2011-04-081-27/+25
| | | | | | | | | | | | do the getxattr() with 'trusted.distribute.linkinfo' key, which returns success only if the file has a link. With this we can preserve the exact same permission as old file. Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Vijay Bellur <vijay@gluster.com> BUG: 2530 (Rebalance not working properly (file permission issues)) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2530
* removed reference to GF_LOG_NORMALAmar Tumballi2011-04-071-2/+2
| | | | | | | | | | instead used GF_LOG_INFO, which is more standard log level. Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Vijay Bellur <vijay@gluster.com> BUG: 2669 (RuntimeError: cannot recognize log level "normal") URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2669
* used S_ISVTX instead of 01000 in code for sticky bit checkAmar Tumballi2011-03-141-3/+3
| | | | | | | | Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 2369 () URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2369
* gluster rebalance: set the proper permission of the fileAmar Tumballi2011-03-101-1/+1
| | | | | | | | | | remove the sticky bit from the mode. Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 2369 () URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2369
* gluster rebalance: give option to split the commandAmar Tumballi2011-03-011-61/+58
| | | | | | | | | | | | | | | | | the 'gluster volume rebalance <VOLNAME> start' is enhanced with two more options: * 'gluster volume rebalance <VOLNAME> fix-layout start' (for fixing layout only) * 'gluster volume rebalance <VOLNAME> migrate-data start' (for migrating data only) Also the old way of running rebalance in one shot will still work fine * 'gluster volume rebalance <VOLNAME> start' Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 2258 (enhance gluster volume rebalance) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2258
* gluster rebalance: get the proper/exact error msg to cliAmar Tumballi2011-03-011-83/+310
| | | | | | | | | | | introduce a new field in XDR structure, and hence change the version of program. Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 1922 (Volume not present wrong message displayed on command line) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1922
* gluster rebalance: fix the permission issue of rebalanced filesv3.1.2gsyncqa6Amar Tumballi2011-02-071-0/+14
| | | | | | | | Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 2369 (Rebalanced files written as root:root on any brick) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2369
* log the total rebalance command recieved into the logfileRaghavendra Bhat2010-12-271-2/+3
| | | | | | | | Signed-off-by: Raghavendra Bhat <raghavendrabhat@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 2231 (log the total rebalance command recieved, in the logfile to avoid confusion) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2231
* glusterd rebalance: update the status in failure casesAmar Tumballi2010-11-151-2/+9
| | | | | | | | Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 1999 () URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1999
* Propogate rebalance already started error to clishishir gowda2010-10-241-0/+1
| | | | | | | | Signed-off-by: shishir gowda <shishirng@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 1882 (starting rebalance while previous rebalance is still running) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1882
* glusterd-rebalance: if file is open, don't do rebalanceAmar Tumballi2010-10-191-0/+7
| | | | | | | | Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 1934 (Server segfault with 3.1 platform ISO during volume expansion) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1934
* Revert "glusterd-rebalance: if file is open, don't do rebalance"Vijay Bellur2010-10-191-7/+0
| | | | This reverts commit 6e6b4b4fd002347ca08691f73e10b961f693d754.
* glusterd-rebalance: if file is open, don't do rebalancev3.1.0Amar Tumballi2010-10-121-0/+7
| | | | | | | | Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 971 (dynamic volume management) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=971
* mgmt/glusterd: Fix replace brick to pass src-brick and dst-brick port nos ↵v3.1.0qa42Pavan Sondur2010-10-081-0/+7
| | | | | | | | | | | | properly. Fix also contains patch from shishir ng for maintaining replace-brick states in glusterd. Signed-off-by: Pavan Vilas Sondur <pavan@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 1235 (Bug for all pump/migrate commits) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1235
* rpc: don't refer to 'req' after calling 'prog->actor()'Amar Tumballi2010-10-041-1/+2
| | | | | | | | | | | | there are chances that a error reply is sent to client from actor, in which case, 'req' would be free'd and accessing it would result in error. Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 1790 () URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1790
* rebalance: bring in two stagesv3.1.0qa37Amar Tumballi2010-10-011-64/+130
| | | | | | | | | | | | | | | | step 1: fix layout (quick pass, so the newly added brick can participate in distribute's entry creations) step 2: migrate data (do the actual rebalance) Its advised to run rebalance after add-brick, and let it complete at-least 'step 1', so things will be smooth with distribute. Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 971 (dynamic volume management) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=971
* glusterd: put all the code related to 'rebalance' in new fileAmar Tumballi2010-10-011-0/+414
Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 971 (dynamic volume management) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=971