Details
-
Bug
-
Resolution: Fixed
-
Blocker
-
Lustre 2.12.0
-
None
-
3
-
9223372036854775807
Description
I understand that current DNE stripe dir migration doesn't support DoM, the test is aimed at checking if we handle this case gracefully and found following:
1. the migration itself succeed without any error nor warning
2. after migration, the DoM file's data is gone
I think we should stop the user from migrating at the first place to avoid the data losing.
Here are the test steps:
[root@trevis-60vm3 lustre]# lfs getdirstripe test
lmv_stripe_count: 2 lmv_stripe_offset: 0 lmv_hash_type: fnv_1a_64
mdtidx FID[seq:oid:ver]
0 [0x200000400:0x8:0x0]
2 [0x280000402:0x6:0x0]
[root@trevis-60vm3 lustre]# cd test
[root@trevis-60vm3 test]# lfs getstripe -m test-f1
0
[root@trevis-60vm3 test]# lfs getstripe -m test-dom
0
[root@trevis-60vm3 test]# ls
test-dom test-f1
[root@trevis-60vm3 test]# lfs setstripe -E 1M -L mdt -E EOF dom-2
[root@trevis-60vm3 test]# echo "dfdsfdlsjfd" > dom-2
[root@trevis-60vm3 test]# cat dom-2
dfdsfdlsjfd
[root@trevis-60vm3 test]# lfs getstripe -m dom-2
0
[root@trevis-60vm3 test]# cd ..
[root@trevis-60vm3 lustre]# lfs migrate -m 1,3 test
[root@trevis-60vm3 lustre]# cd test
[root@trevis-60vm3 test]# lfs getstripe -m dom-2
1
[root@trevis-60vm3 test]# cat dom-2
[root@trevis-60vm3 test]# ls
dom-2 test-dom test-f1
[root@trevis-60vm3 test]# ls -al
total 16
drwxr-xr-x 2 root root 8192 Oct 12 00:51 .
drwxr-xr-x 6 root root 4096 Oct 12 00:52 ..
-rw-r--r-- 1 root root 12 Oct 12 00:51 dom-2
-rw-r--r-- 1 root root 0 Oct 12 00:49 test-dom
-rw-r--r-- 1 root root 12 Oct 5 15:54 test-f1
[root@trevis-60vm3 test]# cat dom-2
[root@trevis-60vm3 test]# ls
dom-2 test-dom test-f1
[root@trevis-60vm3 test]# cat test-f1
test1dkf;sa
[root@trevis-60vm3 test]# cd ..
[root@trevis-60vm3 lustre]# lfs getdirstripe test
lmv_stripe_count: 2 lmv_stripe_offset: 1 lmv_hash_type: fnv_1a_64
mdtidx FID[seq:oid:ver]
1 [0x240000400:0x7:0x0]
3 [0x2c0000401:0x7:0x0]
[root@trevis-60vm3 lustre]#