help channel for md raid?

2 messages, 2 authors, 2021-08-02 · open the first message on its own page

help channel for md raid?

From: Stephan Böttcher <hidden>
Date: 2021-08-02 14:52:47

Moin!

May I ask a question on this list, or is this strictly for development?

Thanks,
Stephan


My qustion is how to translate sector numbers from a RAID6 as in
Aug  2 01:32:28 falbala kernel: md8: mismatch sector in range 1460408-1460416
to ext4 inode numbers, as in
debugfs: icheck 730227 730355 730483 730611
Block   Inode number
730227  30474245
730355  30474245
730483  30474245
730611  30474245
Is there a list, channel, matrix room for this kind of questions?
Are there tools to do what I need?
Is the approach below sensible?

It is a RAID6 with six drives, one of them failed.
A check yielded 378 such mismatches.

I assume the sectors count from the start of the `Data Offset`.
`ext4 block numbers` count from the start of the partition?
Is that correct?

The failed drive has >3000 unreadble sectors and became very slow.

#! /usr/bin/gawk -f

BEGIN {
	SS = 512
	CS = 0x80000/SS
	BS = 4096/SS
	N  = 4
}
/mismatch sector in range/ {
	split($11,A,/-/); 
	S = A[1]; 
	M = S%CS; 
	C = S/CS;
	B = (C*N*CS + M)/BS
	printf "icheck"
	for (i=0; i<N; i++) printf " %u", B + i*CS/BS 
	printf "\n"
}


/dev/sda3:
          Magic : a92b4efc
        Version : 1.2
    Feature Map : 0x1
     Array UUID : d58e68a2:7d9e9218:1bb61653:c295ae02
           Name : falbala:8  (local to host falbala)
  Creation Time : Wed Aug 20 12:23:51 2014
     Raid Level : raid6
   Raid Devices : 6

 Avail Dev Size : 5440837632 (2594.39 GiB 2785.71 GB)
     Array Size : 10881675264 (10377.57 GiB 11142.84 GB)
    Data Offset : 262144 sectors
   Super Offset : 8 sectors
   Unused Space : before=262064 sectors, after=0 sectors
          State : clean
    Device UUID : 16ee808f:9cf5420e:270cc442:db7768b6

Internal Bitmap : 8 sectors from superblock
    Update Time : Mon Aug  2 09:27:57 2021
  Bad Block Log : 512 entries available at offset 24 sectors
       Checksum : 2b557999 - correct
         Events : 405815

         Layout : left-symmetric
     Chunk Size : 512K

   Device Role : Active device 0
   Array State : AAA.AA ('A' == active, '.' == missing, 'R' == replacing)
/dev/sdb3:
          Magic : a92b4efc
        Version : 1.2
    Feature Map : 0x1
     Array UUID : d58e68a2:7d9e9218:1bb61653:c295ae02
           Name : falbala:8  (local to host falbala)
  Creation Time : Wed Aug 20 12:23:51 2014
     Raid Level : raid6
   Raid Devices : 6

 Avail Dev Size : 5440837632 (2594.39 GiB 2785.71 GB)
     Array Size : 10881675264 (10377.57 GiB 11142.84 GB)
    Data Offset : 262144 sectors
   Super Offset : 8 sectors
   Unused Space : before=262056 sectors, after=0 sectors
          State : clean
    Device UUID : 28c5ded0:c005aaf2:167d3af3:8714b48c

Internal Bitmap : 8 sectors from superblock
    Update Time : Mon Aug  2 09:27:57 2021
  Bad Block Log : 512 entries available at offset 72 sectors
       Checksum : d7dc6e93 - correct
         Events : 405815

         Layout : left-symmetric
     Chunk Size : 512K

   Device Role : Active device 1
   Array State : AAA.AA ('A' == active, '.' == missing, 'R' == replacing)
/dev/sdc3:
          Magic : a92b4efc
        Version : 1.2
    Feature Map : 0x1
     Array UUID : d58e68a2:7d9e9218:1bb61653:c295ae02
           Name : falbala:8  (local to host falbala)
  Creation Time : Wed Aug 20 12:23:51 2014
     Raid Level : raid6
   Raid Devices : 6

 Avail Dev Size : 5440837632 (2594.39 GiB 2785.71 GB)
     Array Size : 10881675264 (10377.57 GiB 11142.84 GB)
    Data Offset : 262144 sectors
   Super Offset : 8 sectors
   Unused Space : before=262056 sectors, after=0 sectors
          State : clean
    Device UUID : 1e9be3ef:f6f44ef4:cd4c39d4:002b515c

Internal Bitmap : 8 sectors from superblock
    Update Time : Mon Aug  2 09:27:57 2021
  Bad Block Log : 512 entries available at offset 72 sectors
       Checksum : a92219f4 - correct
         Events : 405815

         Layout : left-symmetric
     Chunk Size : 512K

   Device Role : Active device 5
   Array State : AAA.AA ('A' == active, '.' == missing, 'R' == replacing)
/dev/sdd3:
          Magic : a92b4efc
        Version : 1.2
    Feature Map : 0x1
     Array UUID : d58e68a2:7d9e9218:1bb61653:c295ae02
           Name : falbala:8  (local to host falbala)
  Creation Time : Wed Aug 20 12:23:51 2014
     Raid Level : raid6
   Raid Devices : 6

 Avail Dev Size : 5440837632 (2594.39 GiB 2785.71 GB)
     Array Size : 10881675264 (10377.57 GiB 11142.84 GB)
    Data Offset : 262144 sectors
   Super Offset : 8 sectors
   Unused Space : before=262056 sectors, after=0 sectors
          State : active
    Device UUID : e85da470:24a385b8:ae66eacd:d822539d

Internal Bitmap : 8 sectors from superblock
    Update Time : Mon Aug  2 01:24:06 2021
  Bad Block Log : 512 entries available at offset 72 sectors
       Checksum : 28d023be - correct
         Events : 400427

         Layout : left-symmetric
     Chunk Size : 512K

   Device Role : Active device 3
   Array State : AAAAAA ('A' == active, '.' == missing, 'R' == replacing)
/dev/sde3:
          Magic : a92b4efc
        Version : 1.2
    Feature Map : 0x1
     Array UUID : d58e68a2:7d9e9218:1bb61653:c295ae02
           Name : falbala:8  (local to host falbala)
  Creation Time : Wed Aug 20 12:23:51 2014
     Raid Level : raid6
   Raid Devices : 6

 Avail Dev Size : 5440837632 (2594.39 GiB 2785.71 GB)
     Array Size : 10881675264 (10377.57 GiB 11142.84 GB)
    Data Offset : 262144 sectors
   Super Offset : 8 sectors
   Unused Space : before=262056 sectors, after=0 sectors
          State : clean
    Device UUID : 48223f81:5c9a0ddd:ff0d1782:57941c27

Internal Bitmap : 8 sectors from superblock
    Update Time : Mon Aug  2 09:27:57 2021
  Bad Block Log : 512 entries available at offset 72 sectors
       Checksum : 9be57126 - correct
         Events : 405815

         Layout : left-symmetric
     Chunk Size : 512K

   Device Role : Active device 4
   Array State : AAA.AA ('A' == active, '.' == missing, 'R' == replacing)
/dev/sdf3:
          Magic : a92b4efc
        Version : 1.2
    Feature Map : 0x1
     Array UUID : d58e68a2:7d9e9218:1bb61653:c295ae02
           Name : falbala:8  (local to host falbala)
  Creation Time : Wed Aug 20 12:23:51 2014
     Raid Level : raid6
   Raid Devices : 6

 Avail Dev Size : 5440837632 (2594.39 GiB 2785.71 GB)
     Array Size : 10881675264 (10377.57 GiB 11142.84 GB)
    Data Offset : 262144 sectors
   Super Offset : 8 sectors
   Unused Space : before=262056 sectors, after=0 sectors
          State : clean
    Device UUID : 881ee37d:810e582a:bc0d4841:27916f6b

Internal Bitmap : 8 sectors from superblock
    Update Time : Mon Aug  2 09:27:57 2021
  Bad Block Log : 512 entries available at offset 72 sectors
       Checksum : e957ddfe - correct
         Events : 405815

         Layout : left-symmetric
     Chunk Size : 512K

   Device Role : Active device 2
   Array State : AAA.AA ('A' == active, '.' == missing, 'R' == replacing)


-- 
Stephan

Re: help channel for md raid?

From: Wols Lists <hidden>
Date: 2021-08-02 18:31:47

On 02/08/21 15:38, Stephan Böttcher wrote:
Moin!

May I ask a question on this list, or is this strictly for development?
Ask away!
Thanks,
Stephan


My qustion is how to translate sector numbers from a RAID6 as in
quoted
Aug  2 01:32:28 falbala kernel: md8: mismatch sector in range 1460408-1460416
to ext4 inode numbers, as in
quoted
debugfs: icheck 730227 730355 730483 730611
Block   Inode number
730227  30474245
730355  30474245
730483  30474245
730611  30474245
Is there a list, channel, matrix room for this kind of questions?
Are there tools to do what I need?
Is the approach below sensible?

It is a RAID6 with six drives, one of them failed.
A check yielded 378 such mismatches.

I assume the sectors count from the start of the `Data Offset`.
`ext4 block numbers` count from the start of the partition?
Is that correct?
md8 is your array. This is the block device presented to your file
system so you're feeding it 730227, 730355, 730483, 730611, these are
the sector numbers of md8, and they will be *linear* within it.

So if you're trying to map filesystem sectors to md8 sectors, they are
the same thing.

Only if you're trying to map filesystem sectors to the hard drives
underlying the raid do you need to worry about the 'Data Offset'. (And
this varies on a per-drive basis!)
The failed drive has >3000 unreadble sectors and became very slow.
So you've removed the drive? Have you replaced it? If you have a drive
fail again, always try and replace it using the --replace option, I
think it's too late for that now ...

But as for finding out which files may have been corrupted, you want to
use the tools that come with the filesystem, and ask it which files use
sectors 1460408-1460416. Don't worry about the underlying raid.
Hopefully those tools will come back and say those sectors are unused.
If they ARE used, the chances are it's just the parity which is corrupt.
Otherwise you're looking at a backup ...

So I think what you need to do is (1) find out which files use those
sectors, (2) replace that missing drive asap, and (3) check the
integrity of the file system with fsck. Then (4) do a repair scrub.

(I gather such errors are reasonably common, and do not signify a
problem. On a live filesystem they could well be a collision between a
file write and the check ...)

Cheers,
Wol
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help