md: Check consistency of Raids

Sprache ändern:

lrg tango drive hard disk md: Check consistency of RaidsIf you want to grow a raid array or perform other actions on it you should make sure that all files are consistent.

mdadm has a function that can ensure this even without having to rebuild the raid.

trans md: Check consistency of Raids

Before you can start you always have to make sure that everything is save for the present:

root@nas34 cat /proc/mdstat
Personalities : [raid6] [raid5] [raid4]
md42 : active raid5 sdd[0] sdb[4] sda[3] sde[1]
      4395411456 blocks super 1.2 level 5, 512k chunk, algorithm 2 [4/4] [UUUU]

If everything looks just fine, as above, we would not have to be concerned, if there would not be the risk of bad blocks because they have the characteristic that they become conspicuous only if there are read or write actions performed to them. For ensuring that the array act correct we are going to perform a manual check:

echo check >/sys/block/md42/md/sync_action

Now we have to check that the “check” we have just sent to /sys/block/md42/md/sync_action produces an effect:

cat /proc/mdstat
Personalities : [raid6] [raid5] [raid4]
md42 : active raid5 sdd[0] sdb[4] sda[3] sde[1]
      4395411456 blocks super 1.2 level 5, 512k chunk, algorithm 2 [4/4] [UUUU]
      [>....................]  check = 0.0% (23564/1465137152) finish=500.0min speed=63564K/sec

Alright! The action has been started. If the Raid does not show any errors:

cat /sys/block/md42/md/mismatch_cnt
0

and does not suddenly start to rebuild we can grant that it is stable and start with the proper work, without being concerned that one of the disk could be damaged any way.

If you want to you can cancel the procedure by sending ‘idle’ to  /sys/block/md42/md/sync_action:

echo idle >/sys/block/md42/md/sync_action

auffallend

Leave a Reply

Connect with:

Your email address will not be published.


3 + = 6

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>