Making a corrupt RAID drive readable: Difference between revisions

>Samthecrazyman
Article started, not finished yet
 
>Samthecrazyman
m Spelling checked, added -y option
Line 13: Line 13:
== Attempt to repair and mount a damaged drive from a RAID array ==
== Attempt to repair and mount a damaged drive from a RAID array ==


# If you RAID drive is still mounted (which it shouln't be if it thinks it's corrupt!), unmount the drive as soon as possible. This will stop data becoming more inconsistent than it currently is. In a console, type <code>umount /dev/md#</code>, # being a number under which the array is mounted. If you only have 1 array mounted, popular defaults include <code>/dev/md0</code> and <code>/dev/md127</code>. Once this step is complete, nothing else can be changed on the drives. No harm in checking by running this step!
# If you RAID drive is still mounted (which it shouldn't be if it thinks it's corrupt!), unmount the drive as soon as possible. This will stop data becoming more inconsistent than it currently is. In a console, type <code>umount /dev/md#</code>, # being a number under which the array is mounted. If you only have 1 array mounted, popular defaults include <code>/dev/md0</code> and <code>/dev/md127</code>. Once this step is complete, nothing else can be changed on the drives. No harm in checking by running this step!
# Check the array and see what drives are still a part of the array. In a console, type <code>cat /proc/mdstat</code>. This shows the status of all active software RAID arrays. You should see something similar to the following:
# Check the array and see what drives are still a part of the array. In a console, type <code>cat /proc/mdstat</code>. This shows the status of all active software RAID arrays. You should see something similar to the following:
   md0: active raid1 sda1[0] sdb1[1]<br>####### blocks [1/2] [_U]
   md0: active raid1 sda1[0] sdb1[1]<br>####### blocks [1/2] [_U]


for guideance later: fsck.ext4 /dev/sda'''1'''
for guidance later: fsck.ext4 /dev/sda'''1''' -y