this post was submitted on 22 Jul 2024
1 points (100.0% liked)

It's A Digital Disease!

23 readers
1 users here now

This is a sub that aims at bringing data hoarders together to share their passion with like minded people.

founded 2 years ago
MODERATORS
 
The original post: /r/datahoarder by /u/zldu on 2024-07-22 09:35:34.

I currently have a 3x8TB mdadm raid5 setup, and after checking the array (echo check > /sys/block/md127/md/sync_action) I got the following messages in dmesg:

[122522.233018] md: md127: data-check done.
[122523.551343] md127: mismatch sector in range 15627583488-15627583496
[122523.551355] md127: mismatch sector in range 15627583496-15627583504
[122523.551360] md127: mismatch sector in range 15627583504-15627583512
[122523.551365] md127: mismatch sector in range 15627583512-15627583520
[122523.551371] md127: mismatch sector in range 15627583520-15627583528
[122523.551375] md127: mismatch sector in range 15627583528-15627583536
[122523.551382] md127: mismatch sector in range 15627583536-15627583544
[122523.551384] md127: mismatch sector in range 15627583544-15627583552
[122523.551392] md127: mismatch sector in range 15627583552-15627583560
[122523.551399] md127: mismatch sector in range 15627583560-15627583568

I found the following post on how to figure out which files are affected: https://unix.stackexchange.com/questions/730307/find-files-contained-in-sector-of-a-raid-array

I don't have LVM, but I think I got it right by just dividing all numbers by 8 and looking for inodes in the corresponding blocks (i.e. for 15627583488 I would do icheck 1953447936 in debugfs). All those ranges return the same inode, affecting one file (presumably, if I have done it correctly).

For reference:

# fdisk -u -l /dev/md127
Disk /dev/md127: 14.55 TiB, 16002645753856 bytes, 31255167488 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 65536 bytes / 131072 bytes

# tune2fs -l /dev/md127 | grep Block
Block count:              3906895872
Block size:               4096
Blocks per group:         32768

Now I'm left with 2 questions:

  • How can I validate that I followed the process correctly? Just to try, I read out the whole file (cat file > /dev/null), but that didn't cause any additional similar messages in mdadm (I guess it doesn't check for mismatches when just reading the file).
  • If I run the repair action, what will happen exactly? Will it just choose any of 2 possible blocks and correct the other (and/or correct the parity block)?

PS. IF my process above is correct, it only affects one (movie) file that I don't care much about. I can just delete it and re-acquire it. But that's why I want to know if my validation steps are correct. If it turns out some important document is affected, I need to restore it from backup...

no comments (yet)
sorted by: hot top controversial new old
there doesn't seem to be anything here