Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Welcome.

I try to recover from linux software raid failure. I am in a process of recreating the superblocks based on a syslog from the system when it was healthy. The log speaks about 2 md devices, each based on 5 500GB partitions. The RAID-5 /dev/md5 is composed from /dev/sd[b-f]6 and RAID-6 /dev/md6 is composed from /dev/sd[b-f]5. The relevant part dmesg log looks like this:

[    5.964928] raid5: allocated 5265kB for md5
[    5.979771] 4: w=1 pa=0 pr=5 m=1 a=2 r=5 op1=0 op2=0
[    5.987064] 1: w=2 pa=0 pr=5 m=1 a=2 r=5 op1=0 op2=0
[    5.994256] 3: w=3 pa=0 pr=5 m=1 a=2 r=5 op1=0 op2=0
[    6.001441] 2: w=4 pa=0 pr=5 m=1 a=2 r=5 op1=0 op2=0
[    6.008665] 0: w=5 pa=0 pr=5 m=1 a=2 r=5 op1=0 op2=0
[    6.015883] raid5: raid level 5 set md5 active with 5 out of 5 devices, algorithm 2
[    6.031441] RAID5 conf printout:
[    6.039266]  --- rd:5 wd:5
[    6.046856]  disk 0, o:1, dev:sdb6
[    6.054308]  disk 1, o:1, dev:sdf6
[    6.061524]  disk 2, o:1, dev:sdc6
[    6.068667]  disk 3, o:1, dev:sde6
[    6.075774]  disk 4, o:1, dev:sdd6
[    6.089504] md5: bitmap initialized from disk: read 1/1 pages, set 0 bits
[    6.096768] created bitmap (15 pages) for device md5
[    6.141010] md5: detected capacity change from 0 to 1978409418752
[    6.153794]  md5: unknown partition table

[    5.594614] raid5: device sde5 operational as raid disk 3
[    5.599701] raid5: device sdd5 operational as raid disk 4
[    5.604750] raid5: device sdf5 operational as raid disk 1
[    5.609879] raid5: device sdc5 operational as raid disk 2
[    5.615032] raid5: device sdb5 operational as raid disk 0
[    5.621672] raid5: allocated 5265kB for md6
[    5.627243] 3: w=1 pa=0 pr=5 m=2 a=2 r=5 op1=0 op2=0
[    5.632846] 4: w=2 pa=0 pr=5 m=2 a=2 r=5 op1=0 op2=0
[    5.638502] 1: w=3 pa=0 pr=5 m=2 a=2 r=5 op1=0 op2=0
[    5.644155] 2: w=4 pa=0 pr=5 m=2 a=2 r=5 op1=0 op2=0
[    5.649844] 0: w=5 pa=0 pr=5 m=2 a=2 r=5 op1=0 op2=0
[    5.655566] raid5: raid level 6 set md6 active with 5 out of 5 devices, algorithm 2
[    5.667653] RAID5 conf printout:
[    5.673791]  --- rd:5 wd:5
[    5.679837]  disk 0, o:1, dev:sdb5
[    5.685721]  disk 1, o:1, dev:sdf5
[    5.691570]  disk 2, o:1, dev:sdc5
[    5.697348]  disk 3, o:1, dev:sde5
[    5.703122]  disk 4, o:1, dev:sdd5
[    5.710762] md6: bitmap initialized from disk: read 1/1 pages, set 0 bits
[    5.716915] created bitmap (15 pages) for device md6
  • What do the numbers on the line [ 5.979771] 4: w=1 pa=0 pr=5 m=1 a=2 r=5 op1=0 op2=0 mean, including the first 4:?
  • What do the numbers on the line [ 6.039266] --- rd:5 wd:5] mean?
  • What do the numbers on the line [ 6.046856] disk 0, o:1, dev:sdb6 mean?
  • Does the line [ 6.096768] created bitmap (15 pages) for device md5 tell anything about the place, where the bitmap is located and what is its size?
share|improve this question

1 Answer 1

up vote 2 down vote accepted

After a mail exchange on linux-raid@kernel.org mailing list, I've got the following answer from Mr. Robin Hill:

Question 1:

  • 4 is the raid device number

  • w=1 indicates the number of working disks found so far

  • pa=0 is the previous algorithm (used when reshaping)

  • pr=5 is the previous number of raid devices (used when reshaping)

  • m=1 is the maximum number of degraded disks allowed for the array to run

  • a=2 is the algorithm used

  • r=5 is the number of raid devices

  • op1=0 indicates that the disk is not a parity-only disk in the previous layout (used when reshaping)

  • op2=0 indicates that the disk is not a parity-only disk in the current layout

Question 2:

  • rd is the number of devices in the array
  • wd is the number of working devices in the array

Question 3:

  • 0 is the raid device number
  • o:1 indicates that it's operational (i.e. not marked as faulty)
  • dev:sdb6 indicates the kernel device name

Question 4:

It doesn't tell you anything about the place. I've no idea how the number of pages equates to the bitmap size/bitmap chunk size though.

In the above cases, the raid device number is its position within the array, so from 0..N-1 for an N-device array. This will indicate the order you'll need to use when recreating the array.

share|improve this answer
    
Awesome, thanks for info! –  Hubert Kario Sep 18 '12 at 1:16

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.