[Bugs] [Bug 1262197] DHT: Few files are missing after remove-brick operation
bugzilla at redhat.com
bugzilla at redhat.com
Mon Sep 14 05:47:14 UTC 2015
https://bugzilla.redhat.com/show_bug.cgi?id=1262197
--- Comment #4 from Vijay Bellur <vbellur at redhat.com> ---
COMMIT: http://review.gluster.org/12156 committed in release-3.7 by Raghavendra
G (rgowdapp at redhat.com)
------
commit 23e522eea17e15b37d395e2005139dd3d5a9e3a1
Author: Susant Palai <spalai at redhat.com>
Date: Fri Sep 4 05:14:05 2015 -0400
dht/remove-brick: Avoid data loss for hard link migration
Problem: If the hashed subvol of a file has reached cluster.min-free-disk,
for a create opertaion a linkto file will be created on the hashed and
the data file will be created on some other brick.
For creation of the linkfile we populate the dictionary with linkto key
and value as the cached subvol. After successful linkto file creation,
the linkto-key-value pair is not deleted form the dictionary and hence,
the data file will also have linkto xattr which points to itself.This looks
something like this.
client-0 client-1
-------T file rwx------file
linkto.xattr=client-1 linkto.xattr=client-1
Now coming to the data loss part. Hardlink migration highly depend on this
linkto xattr on the data file. This value should be the new hashed subvol
of the first hardlink encountered post fix-layout. But when it tries to
read the linkto xattr it gets the same target as where it is sitting.
Now the source and destination are same for migration. At the end of
migration the source file is truncated and deleted, which in this case
is the destination and also the only data file it self resulting in
data loss.
BUG: 1262197
Change-Id: I5338a5704ac60ca9afb278977e178319266a0cc0
Signed-off-by: Susant Palai <spalai at redhat.com>
Reviewed-on: http://review.gluster.org/12105
Reviewed-by: N Balachandran <nbalacha at redhat.com>
Tested-by: NetBSD Build System <jenkins at build.gluster.org>
Reviewed-by: Raghavendra G <rgowdapp at redhat.com>
Signed-off-by: Susant Palai <spalai at redhat.com>
Reviewed-on: http://review.gluster.org/12156
Tested-by: Gluster Build System <jenkins at build.gluster.com>
--
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.
More information about the Bugs
mailing list