Scrub corruption cases

From btrfs Wiki
Revision as of 02:10, 24 February 2017 by Lakshmipathi (Talk | contribs)

Jump to: navigation, search
Name Description Expected Result Comments (if any)
D0-corruption 1. Create 128kb file.(f1.txt)
2. Corrupt D0 Stripe.
3. Run Scrub
D0 should have original un-corrupted content.
Parity value should be valid.
RAID5 with 3 drives
D1-corruption 1. Create 128kb file.(f1.txt)
2. Corrupt D1 Stripe.
3. Run Scrub
D1 should have original un-corrupted content.
Parity value should be valid.
P-corruption 1. Create 128kb file.(f1.txt)
2. Corrupt Parity Stripe.
3. Run Scrub
P should have original un-corrupted content.
D0-D1-corruption 1. Create 128kb file. (f1.txt)
2. Corrupt both D0 and D1
3. Run Scrub
Scrub expected to fail and should not recover f1.txt. should Scrub display/log the filename f1.txt as unrecovered along with failed offset?
D0-D1-corruption2 1. Create 128kb file. (f1.txt) and another file with size 128kb (f2.txt)
2. Corrupt both D0 and D1 from f1.txt
3. Corrupt only D0 from f2.txt
4. Run Scrub
Scrub expected not to recover f1.txt. It should recover f2.txt with valid parity.
D1-D3-Corruption 1. Create 256kb file.(f1.txt)
2. Corrupt D1,D3 Stripe.
3. Run Scrub
D1,D3 should have original un-corrupted content. Parity value should be valid.
256kb-P-Corruption 1. Create 256kb file.(f1.txt)
2. Corrupt P1 Stripe.
3. Run Scrub
Parity(P1,P2) value should be valid.
256kb-P2-Corruption 1. Create 256kb file.(f1.txt)
2. Corrupt both P1,P2 Stripe.
3. Run Scrub
Parity(P1,P2) value should be valid.
D0-D1-256kb-Corruption 1. Create 256kb file.(f1.txt)
2. Corrupt D0,D1 Stripe.
3. Run Scrub
Scrub expected to fail and should not recover f1.txt. Parity (P1,P2) should be valid
D0-D1-256kb-Corruption2 1. Create 256kb file.(f1.txt)
2. Corrupt D0,D1,P1 Stripe.
3. Run Scrub
Scrub expected to fail and should not recover f1.txt. Parity (P2) should be valid
Odd-data-stripe-corruption 1. Create 512kb file.(f1.txt)
2. Corrupt odd data stripe. (D1,D3,D5..)
3. Run Scrub
Odd data-stripe should have original un-corrupted content. Parity values should be valid.
Even-data-stripe-corruption 1. Create 512kb file.(f1.txt)
2. Corrupt even data stripe. (D2,D4,D6..)
3. Run Scrub
Even data-stripe should have original un-corrupted content. Parity values should be valid.
Repeat-odd-even-corruption. Re-run above odd-even corruption cases with different filesize:
1m,2mb,10mb,50mb
All corrupted blocks should have original un-corrupted content. Their coresponding Parity values should be valid.
Personal tools