Bug 762603 (GLUSTER-871)

Summary: potential problem during rebalancing of files after adding new nodes
Product: [Community] GlusterFS Reporter: Krishna Srinivas <krishna>
Component: distributeAssignee: Anand Avati <aavati>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: medium Docs Contact:
Priority: low    
Version: mainlineCC: amarts, chrisw, gluster-bugs, sac
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Krishna Srinivas 2010-04-29 17:48:21 UTC
potential problem during rebalancing of files after adding new nodes, not verified, logging the bug just to make sure.

suppose DHT's subvol is expanded from 3 to 4, 1st subvolume is already 98% full, when we run rebalance script, will it copy files from other subvols to 1st subvol if 1st subvol has the linkfiles and cause disk to be 100% full?

Comment 1 Sachidananda Urs 2010-04-30 01:31:20 UTC
When the additional server is added and the defrag scripts are run, it just syncs up the directory structure. But does not actually move the files.

Comment 2 Krishna Srinivas 2010-04-30 02:08:37 UTC
(In reply to comment #1)
> When the additional server is added and the defrag scripts are run, it just
> syncs up the directory structure. But does not actually move the files.

There are steps under defragmentation process:
1) rehashes the dht ext attrs. and create link files
2) copies the files - so that if there is link file on one subvol and actual file on another, the script copies from actual file location to the link file location (defragmentation)

Comment 3 Sachidananda Urs 2010-04-30 02:22:41 UTC
> There are steps under defragmentation process:
> 1) rehashes the dht ext attrs. and create link files
> 2) copies the files - so that if there is link file on one subvol and actual
> file on another, the script copies from actual file location to the link file
> location (defragmentation)

I tested on mainline and 3.0.4 but the link files are not created. Yes I did switch on the options `lookup-unhashed' and `unhased-stick-bit' in dht for this process.

Comment 4 Krishna Srinivas 2010-04-30 03:01:52 UTC
(In reply to comment #3)
> > There are steps under defragmentation process:
> > 1) rehashes the dht ext attrs. and create link files
> > 2) copies the files - so that if there is link file on one subvol and actual
> > file on another, the script copies from actual file location to the link file
> > location (defragmentation)
> 
> I tested on mainline and 3.0.4 but the link files are not created. Yes I did
> switch on the options `lookup-unhashed' and `unhased-stick-bit' in dht for this
> process.

no, catch me online sometime, i will explain. 1000s of link files can exist - because of renames or because of disks getting filledup.

Comment 5 Amar Tumballi 2010-08-04 06:08:48 UTC
with the new defrag scripts and 'gluster defrag' command this problem will be gone, because the files will be moved to corresponding node and then take the creation of link file for next file. Hence we will not get into the problem of '10000s of linkfiles' anymore.

Fixed in master branch (3.1.x)