Bug 1392905

Summary: Rebalance should skip the file if the file has hardlinks instead of failing
Product: [Red Hat Storage] Red Hat Gluster Storage Reporter: Prasad Desala <tdesala>
Component: distributeAssignee: Susant Kumar Palai <spalai>
Status: CLOSED ERRATA QA Contact: Prasad Desala <tdesala>
Severity: medium Docs Contact:
Priority: unspecified    
Version: rhgs-3.2CC: amukherj, nbalacha, rhinduja, rhs-bugs, sheggodu, spalai, srmukher, storage-qa-internal
Target Milestone: ---Keywords: ZStream
Target Release: RHGS 3.4.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: rebase
Fixed In Version: glusterfs-3.12.2-1 Doc Type: Bug Fix
Doc Text:
Previously, failures were reported instead of marking the migration as skipped for hardlinks during rebalance process. With the fix, there is no failure seen for hardlink migration during rebalance and they will be added to the skipped list.
Story Points: ---
Clone Of:
: 1393338 (view as bug list) Environment:
Last Closed: 2018-09-04 06:29:44 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1393338, 1503134    

Description Prasad Desala 2016-11-08 12:56:58 UTC
Description of problem:
=======================
During rebalance, if the file has hardlinks the file should get skipped but rebalance is attempting to migrate the file and is getting failed.

Version-Release number of selected component (if applicable):
3.8.4-3.el7rhgs.x86_64

How reproducible:
=================
Always

Steps to Reproduce:
===================
1) Create a distributed replicate volume and start it.
2) FUSE mount the volume.
3) From mount point, create few files. Lets say 100 files.
4) Create hard links to all the created files.
5) Add few bricks and trigger rebalance. Wait till the rebalance completes.

We are seeing many failures in rebalance as the file has hardlinks. As rebalance will not migrate a file if it has hardlinks those files should get skipped during rebalance.

Actual results:
===============
Failures in rebalance as the file has hardlinks.

Expected results:
=================
Rebalance should skip the file if a file has hardlinks instead of failing.

Comment 3 Nithya Balachandran 2016-11-08 13:25:20 UTC
We will not take this for 3.2.0 as it is not a critical issue.

Comment 4 Susant Kumar Palai 2016-11-09 11:12:41 UTC
Upstream patch: http://review.gluster.org/15810

Comment 9 Prasad Desala 2018-04-13 12:46:43 UTC
Verified this BZ on glusterfs version 3.12.2-7.el7rhgs.x86_64.

Followed the steps mentioned in the description. Now, if the file has hardlinks rebalance is skipping those files for migration.

2018-04-13 12:38:19.777319] W [MSGID: 109023] [dht-rebalance.c:595:__check_file_has_hardlink] 0-ec_new-dht: Migration skipped for:/a/b/c/cat_12: file has hardlinks
[2018-04-13 12:38:24.982930] W [MSGID: 109023] [dht-rebalance.c:595:__check_file_has_hardlink] 0-ec_new-dht: Migration skipped for:/a/b/c/cat_19: file has hardlinks
[2018-04-13 12:38:25.472224] W [MSGID: 109023] [dht-rebalance.c:595:__check_file_has_hardlink] 0-ec_new-dht: Migration skipped for:/a/b/c/cat_9: file has hardlinks
[2018-04-13 12:38:26.576203] W [MSGID: 109023] [dht-rebalance.c:595:__check_file_has_hardlink] 0-ec_new-dht: Migration skipped for:/a/b/c/cat_4: file has hardlinks
[2018-04-13 12:38:27.422177] W [MSGID: 109023] [dht-rebalance.c:595:__check_file_has_hardlink] 0-ec_new-dht: Migration skipped for:/a/b/c/cat_18: file has hardlinks
[2018-04-13 12:38:28.617461] W [MSGID: 109023] [dht-rebalance.c:595:__check_file_has_hardlink] 0-ec_new-dht: Migration skipped for:/a/b/c/cat_7: file has hardlinks
[2018-04-13 12:38:29.067173] W [MSGID: 109023] [dht-rebalance.c:595:__check_file_has_hardlink] 0-ec_new-dht: Migration skipped for:/a/b/c/cat_123: file has hardlinks
[2018-04-13 12:38:29.114455] W [MSGID: 109023] [dht-rebalance.c:595:__check_file_has_hardlink] 0-ec_new-dht: Migration skipped for:/a/b/c/cat_82: file has hardlinks

Moving this BZ to Verified.

Comment 10 Srijita Mukherjee 2018-09-03 15:41:10 UTC
Doc text has been updated. Kindly review

Comment 12 Susant Kumar Palai 2018-09-04 06:28:47 UTC
(In reply to Srijita Mukherjee from comment #10)
> Doc text has been updated. Kindly review

ack.

Comment 13 errata-xmlrpc 2018-09-04 06:29:44 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2018:2607