== sanity-lfsck test 20a: Handle the orphan with dummy LOV EA slot properly ========================================================== 15:58:51 (1776196731) ##### The target MDT-object and some of its OST-object are lost. The LFSCK should find out the left OST-objects and re-create the MDT-object under the direcotry .lustre/lost+found/MDTxxxx/ with the partial OST-objects (LOV EA hole). New client can access the file with LOV EA hole via normal system tools or commands without crash the system. For old client, even though it cannot access the file with LOV EA hole, it should not cause the system crash. ##### 257+0 records in 257+0 records out 1052672 bytes (1.1 MB, 1.0 MiB) copied, 0.332212 s, 3.2 MB/s 257+0 records in 257+0 records out 1052672 bytes (1.1 MB, 1.0 MiB) copied, 0.350514 s, 3.0 MB/s 257+0 records in 257+0 records out 1052672 bytes (1.1 MB, 1.0 MiB) copied, 0.737596 s, 1.4 MB/s [0x200004a51:0x22:0x0] /mnt/lustre/d20a.sanity-lfsck/a1/f0 lmm_stripe_count: 2 lmm_stripe_size: 1048576 lmm_pattern: raid0 lmm_layout_gen: 0 lmm_stripe_offset: 0 obdidx objid objid group 0 685 0x2ad 0 1 5478 0x1566 0 [0x200004a51:0x23:0x0] /mnt/lustre/d20a.sanity-lfsck/a1/f1 lmm_stripe_count: 2 lmm_stripe_size: 1048576 lmm_pattern: raid0 lmm_layout_gen: 0 lmm_stripe_offset: 0 obdidx objid objid group 0 686 0x2ae 0 1 5479 0x1567 0 [0x200004a51:0x24:0x0] /mnt/lustre/d20a.sanity-lfsck/a1/f2 lmm_stripe_count: 2 lmm_stripe_size: 1048576 lmm_pattern: raid0 lmm_layout_gen: 0 lmm_stripe_offset: 0 obdidx objid objid group 0 687 0x2af 0 1 5480 0x1568 0 Inject failure... To simulate f0 lost MDT-object fail_loc=0x1616 To simulate f1 lost MDT-object and OST-object0 fail_loc=0x161a To simulate f2 lost MDT-object and OST-object1 fail_val=1 192.168.202.151@tcp:/lustre /mnt/lustre lustre rw,checksum,flock,user_xattr,lruresize,lazystatfs,nouser_fid2path,verbose,encrypt 0 0 Stopping client oleg251-client.virtnet /mnt/lustre (opts:) fail_loc=0 fail_val=0 Trigger layout LFSCK on all devices to find out orphan OST-object Started LFSCK on the device lustre-MDT0000: scrub layout Starting client: oleg251-client.virtnet: -o user_xattr,flock oleg251-server@tcp:/lustre /mnt/lustre Check /mnt/lustre/.lustre/lost+found/MDT0000/[0x200004a51:0x22:0x0]-R-0, which is the old f0 /mnt/lustre/.lustre/lost+found/MDT0000/[0x200004a51:0x22:0x0]-R-0 lmm_magic: 0x0BD10BD0 lmm_seq: 0x200004a51 lmm_object_id: 0x22 lmm_fid: [0x200004a51:0x22:0x0] lmm_stripe_count: 2 lmm_stripe_size: 1048576 lmm_pattern: raid0 lmm_layout_gen: 2 lmm_stripe_offset: 0 obdidx objid objid group 0 685 0x2ad 0 1 5478 0x1566 0 Check /mnt/lustre/.lustre/lost+found/MDT0000/[0x200004a51:0x23:0x0]-R-0, it contains the old f1's stripe1 /mnt/lustre/.lustre/lost+found/MDT0000/[0x200004a51:0x23:0x0]-R-0 lmm_magic: 0x0BD10BD0 lmm_seq: 0x200004a51 lmm_object_id: 0x23 lmm_fid: [0x200004a51:0x23:0x0] lmm_stripe_count: 2 lmm_stripe_size: 1048576 lmm_pattern: 40000001 lmm_layout_gen: 1 lmm_stripe_offset: 0 obdidx objid objid group 0 0 0 0 1 5479 0x1567 0 cat: '/mnt/lustre/.lustre/lost+found/MDT0000/[0x200004a51:0x23:0x0]-R-0': Input/output error dd: error writing '/mnt/lustre/.lustre/lost+found/MDT0000/[0x200004a51:0x23:0x0]-R-0': Input/output error 1+0 records in 0+0 records out 0 bytes copied, 0.0357389 s, 0.0 kB/s 1+0 records in 1+0 records out 4096 bytes (4.1 kB, 4.0 KiB) copied, 0.107136 s, 38.2 kB/s /home/green/git/lustre-release/lustre/tests/sanity-lfsck.sh: line 3365: echo: write error: Input/output error Check /mnt/lustre/.lustre/lost+found/MDT0000/[0x200004a51:0x24:0x0]-R-0, it contains the old f2's stripe0 /mnt/lustre/.lustre/lost+found/MDT0000/[0x200004a51:0x24:0x0]-R-0 lmm_magic: 0x0BD10BD0 lmm_seq: 0x200004a51 lmm_object_id: 0x24 lmm_fid: [0x200004a51:0x24:0x0] lmm_stripe_count: 2 lmm_stripe_size: 1048576 lmm_pattern: 40000001 lmm_layout_gen: 1 lmm_stripe_offset: 0 obdidx objid objid group 0 687 0x2af 0 0 0 0 0 cat: '/mnt/lustre/.lustre/lost+found/MDT0000/[0x200004a51:0x24:0x0]-R-0': Input/output error dd: error writing '/mnt/lustre/.lustre/lost+found/MDT0000/[0x200004a51:0x24:0x0]-R-0': Input/output error 1+0 records in 0+0 records out 0 bytes copied, 0.00852002 s, 0.0 kB/s