Description of problem:
Rename is failing with ENOENT while remove-brick start operation is in progress.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1) Create an EC volume and start it (Distributed replicate volume can also be used here, the issue is seen with Distributed replicate volume as well).
2) FUSE mount the volume on a client.
3) Create a big file of size 10Gb on the FUSE mount.
dd if=/dev/urandom of=BIG bs=1024k count=10000
4) Identify the bricks on which the file 'BIG' is located and remove those bricks so that the BIG file gets migrated.
5) While remove-brick start operation is in progress, rename the file from the mount point.
We can see the below error,
mv: cannot move ‘BIG’ to ‘BIG_rename’: No such file or directory
Renaming is fialing with ENOENT.
Rename should be successful.
Looks like the same issue as reported by BZ 1286127. Marking it depends on 1286127 for now.
RCA of rename failing with ENOENT is same as mentioned in BZ 1286127.
rename is failing with ENOENT because file is not available on cached_subvol that has changed during migration process.
To resolve it pass a new rename fops(dht_rename2) (in case of failure) to dht_rebalance_complete_check ,it will call dht_rename2 after complete migration process.