[Bugs] [Bug 1415761] [Remove-brick] Hardlink migration fails with "lookup failed (No such file or directory)" error messages in rebalance logs

bugzilla at redhat.com bugzilla at redhat.com
Mon Jan 23 16:45:32 UTC 2017


https://bugzilla.redhat.com/show_bug.cgi?id=1415761

Nithya Balachandran <nbalacha at redhat.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Comment #0 is|1                           |0
            private|                            |
             Status|NEW                         |ASSIGNED
             Blocks|                            |1351530
           Assignee|bugs at gluster.org            |nbalacha at redhat.com



--- Comment #1 from Nithya Balachandran <nbalacha at redhat.com> ---
RCA:

The remove-brick operation will migrate files with hardlinks (unlike a regular
rebalance). The following steps are performed:

1. dht_setxattr (key = GF_XATTR_FILE_MIGRATE_KEY) sets the target/hashed
subvolume for a migrate file operation in local->rebalance.target_node.

2. For a hardlink, dht_migrate_file () will use the hashed subvol of the first
link to be migrated as the hashed subvolume. This might not match the value in
local->rebalance.target_node for the other links.

3. dht_migrate_file returns 0 if __is_file_migratable () /
__check_file_has_hardlink returns -2 (indicating that the file is a hardlink).

4. rebalance_task_completion updates the cached subvol in inode_ctx with the
value of local->rebalance.target_node. This is incorrect and causes the lookup
failures for successive hardlink lookups as the file does not exist on that
subvol.


Solution:

Do not call dht_layout_preset in rebalance_task_completion as it will be done
as part of the syncop_lookup called after a successful file migration in
dht_migrate_file.

-- 
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