Details
-
Task
-
Resolution: Fixed
-
Blocker
-
None
-
None
-
9223372036854775807
Description
Access the directory during migration
Setup lustre with 4 MDTs, 4 OSTs and 2 clients.
Create 1 directory and some files under the directory
mkdir /mnt/lustre/migrate_dir
for F in {1,2,3,4,5}; do
echo "$F$F$F$F$F" > /mnt/lustre/migrate_dir/file$F
done
On one client, migrate the directory among 4 MDTs
while true; do
mdt_idx=$((RANDOM % MDTCOUNT))
lfs migration -m $mdt_idx /mnt/lustre/migrate_dir || break
done
echo "migrate directory failed"
return 1
Simultaneously, on another client access these files under the migrating directory
while true; do
N=$((N + 1 % 5))
stat /mnt/lustre/migrate_dir/file1 > /dev/null || break
cat /mnt/lustre/migrate_dir/file2 > /dev/null || break
> /mnt/lustre/migrate_dir/file3 > /dev/null || break
echo "aaaaa" > /mnt/lustre/migrate_dir/file4 > /dev/null || break
stat /mnt/lustre/migrate_dir/file5 > /dev/null || break
done
echo "access migrating files failed"
return 1
Steps 3 and 4 should keep running at least 5 minutes and will not return error.