Consistancy check

Got a question about our NAS utilities? The answer lies within.
Raided
Posts: 8
youtube meble na wymiar Warszawa
Joined: Sun Aug 14, 2016 9:56 am

Consistancy check

Post by Raided »

I have a AS-608T I recently swapped some disks out for bigger disks and towards the end of the rebuild i started getting media errors i was wondering if i could check the integrity of the data?
User avatar
orion
Posts: 3485
Joined: Wed May 29, 2013 11:09 am

Re: Consistancy check

Post by orion »

I cannot find UI function for RAID integrity check. However you can issue this check by manual commands. You can refer to the web page: https://www.thomas-krenn.com/en/wiki/Mdadm_checkarray

Basically you can get md status of all of your RAID devices:

Code: Select all

cat /proc/mdstat
Select the md device that you plan to check, for example, md1. Then show the current mismatch count under /sys/block/md1/md/mismatch_cnt before you start. Here is the command to start integrity check:

Code: Select all

echo check > /sys/block/md1/md/sync_action
After done, show "mismatch_cnt" again.
User avatar
Kapitein Haak
Posts: 333
Joined: Tue Oct 15, 2013 2:40 pm
Location: Stranded on the Dutch coast.

Re: Consistancy check

Post by Kapitein Haak »

Hello Orion,
I would guess this checks the integrity of the raid set. When media errors occured, faulty data might be copied to the new (likely flawless) raid set. The only way to check the data is to bit or hash compare it to a known good copy of the data. This might be a lengthy processen.

Best regards,
Kapitein Haak.
"What would the world be like without Captain Hook?"
---
"Homo sapiens non urinat in ventum" (A wise man doesn't piss into the wind), only in Amsterdam:
https://www.google.nl/maps/@52.36289,4. ... 312!8i6656
Raided
Posts: 8
Joined: Sun Aug 14, 2016 9:56 am

Re: Consistancy check

Post by Raided »

Thanks how do i enter these manual commands on the asustor nas?
User avatar
orion
Posts: 3485
Joined: Wed May 29, 2013 11:09 am

Re: Consistancy check

Post by orion »

Kapitein Haak wrote:Hello Orion,
I would guess this checks the integrity of the raid set. When media errors occured, faulty data might be copied to the new (likely flawless) raid set. The only way to check the data is to bit or hash compare it to a known good copy of the data. This might be a lengthy processen.

Best regards,
Kapitein Haak.
Hello Kapitein,

Yes, it'll generate re-sync event internally (md driver). In case that there is a fault integrity, for example parity error under RAID-5, it will update mismatch count. Usually we should get a read error on certain disk in this condition. "md" will re-generate correct data and try to write to the specific sector to correct this error. It indeed takes long time to check the whole volume.
User avatar
orion
Posts: 3485
Joined: Wed May 29, 2013 11:09 am

Re: Consistancy check

Post by orion »

Raided wrote:Thanks how do i enter these manual commands on the asustor nas?
You can install "Shell In A Box" application under ADM AppCentral, or use putty under your PC. You'll need to enable terminal service under ADM web -> Services -> Terminal -> Enable SSH service. You should login to NAS as root account (the password is the same as admin). After that, you can use those commands.
Raided
Posts: 8
Joined: Sun Aug 14, 2016 9:56 am

Re: Consistancy check

Post by Raided »

Great ill try that on the weekend. Just one more question i replaced another disk if it rebuilds without errors does that mean there's no problems or will it just transfer over the data without knowing its corrupt?
User avatar
orion
Posts: 3485
Joined: Wed May 29, 2013 11:09 am

Re: Consistancy check

Post by orion »

Raided wrote:Great ill try that on the weekend. Just one more question i replaced another disk if it rebuilds without errors does that mean there's no problems or will it just transfer over the data without knowing its corrupt?
In the following condition, your data should be safe.
  • Remove old disk and insert one bigger disk (HDD-A).
  • Media error on HDD-A.
  • Remove HDD-A and replace it with another bigger disk (HDD-B).
  • Rebuilding process completed successfully.
I believe it is the condition. Or you should see error messages under ADM.
Raided
Posts: 8
Joined: Sun Aug 14, 2016 9:56 am

Re: Consistancy check

Post by Raided »

Great thanks for your help ill do the integrity check just to be 100% sure its good
Raided
Posts: 8
Joined: Sun Aug 14, 2016 9:56 am

Re: Consistancy check

Post by Raided »

Ok i gave it a try but the first command doesn't really tell me anything i don't already know and the second says access is denied?

[attachment=0]Untitled.jpg
Attachments
Untitled.jpg
Untitled.jpg (163.4 KiB) Viewed 13660 times
Post Reply

Return to “NAS Utilities”