Failed raid 1 partition cannot re-add

Tags
filesystem

Login to Reply

 
Thread Tools Search this Thread
# 1  
Old 01-20-2013
Failed raid 1 partition cannot re-add

I found out that the raid 1 was degraded:

Code:
[rootnode /]# cat /proc/mdstat
Personalities : [raid1]
md3 : active raid1 sda5[0] sdb5[1]
1822445428 blocks super 1.0 [2/2] [UU]
 
md2 : active raid1 sda3[0](F) sdb3[1]
1073741688 blocks super 1.0 [2/1] [_U]
 
md1 : active raid1 sda2[0] sdb2[1]
524276 blocks super 1.0 [2/2] [UU]
 
md0 : active raid1 sda1[0] sdb1[1]
33553336 blocks super 1.0 [2/2] [UU]

so it seems to me that in partition md2 the device sda3 was Faulty.

so I did try to remove and re-add it in order to repair it:

Code:
[rootnode /]# mdadm --remove /dev/md2 /dev/sda3
mdadm: hot removed /dev/sda3 from /dev/md2

then I tried to add it again:

Code:
[rootnode /]# mdadm --add /dev/md2 /dev/sda3
mdadm: /dev/sda3 reports being an active member for /dev/md2, but a --re-add fails.
mdadm: not performing --add as that would convert /dev/sda3 in to a spare.
mdadm: To make this a spare, use "mdadm --zero-superblock /dev/sda3" first.

and the result is:

Code:
[rootnode /]# cat /proc/mdstat
Personalities : [raid1]
md3 : active raid1 sda5[0] sdb5[1]
1822445428 blocks super 1.0 [2/2] [UU]
 
md2 : active raid1 sdb3[1]
1073741688 blocks super 1.0 [2/1] [_U]
 
md1 : active raid1 sda2[0] sdb2[1]
524276 blocks super 1.0 [2/2] [UU]
 
md0 : active raid1 sda1[0] sdb1[1]
33553336 blocks super 1.0 [2/2] [UU]
 
unused devices: <none>


so

Code:
md2 : active raid1 sda3[0](F) sdb3[1]
1073741688 blocks super 1.0 [2/1] [_U]

changed to

Code:
md2 : active raid1 sdb3[1]
1073741688 blocks super 1.0 [2/1] [_U]

and I cant re-add the 2nd device,
If I run
Code:
mdadm --zero-superblock /dev/sda3

would what erase my data from the partion? or would that create any other damage?

I've searched the manual which says:

Code:
--zero-superblock
If the device contains a valid md superblock, the block is overwritten with zeros.
With --force the block where the superblock would be is overwritten even if it doesn't appear to be valid

but I'm not sure if this erases data and since the partition mounts to / in which all the data is, I'm scared to try it without verification.

If anyone knows, that would be really helpfull.

---------- Post updated at 08:35 PM ---------- Previous update was at 06:40 PM ----------

after lots of research I decided to go on with it

Code:
[root@node ~]# mdadm --zero-superblock /dev/sda3
[root@node ~]# mdadm /dev/md2 -a /dev/sda3
mdadm: added /dev/sda3

[root@node ~]# cat /proc/mdstat
Personalities : [raid1]
md3 : active raid1 sda5[0] sdb5[1]
      1822445428 blocks super 1.0 [2/2] [UU]

md2 : active raid1 sda3[2] sdb3[1]
      1073741688 blocks super 1.0 [2/1] [_U]
      [>....................]  recovery =  1.1% (12009408/1073741688) finish=313.7min speed=56397K/sec

md1 : active raid1 sda2[0] sdb2[1]
      524276 blocks super 1.0 [2/2] [UU]

md0 : active raid1 sda1[0] sdb1[1]
      33553336 blocks super 1.0 [2/2] [UU]

as you can see the result is the raid is recovering so everything is ok and --zero-superblock didn't damage any data.

Last edited by Scrutinizer; 01-20-2013 at 02:38 PM.. Reason: code tags
Login to Reply

|
Thread Tools Search this Thread
Search this Thread:
Advanced Search

Similar Threads More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Unable to understand RAID PARTITION scriptor UNIX for Dummies Questions & Answers 15 04-23-2014 07:51 AM
RAID 10 Failed Drive Swap mpeter05 AIX 5 01-21-2014 11:20 AM
RAID Configuration for IBM Serveraid-7k SCSI RAID Controller @dagio Red Hat 0 04-30-2013 10:11 AM
SPARC T4-1/Solaris 11/Add 2 new HDDs in RAID 0 configuration julumme Solaris 13 09-10-2012 11:42 PM
Software RAID on top of Hardware RAID KhawHL Solaris 4 12-16-2011 02:52 AM
Identify failed disk in Linux RAID Loic Domaigne UNIX for Advanced & Expert Users 2 11-01-2011 05:28 PM
How to add partition? Agat Solaris 8 08-02-2011 12:23 AM
SCSI PCI - X RAID Controller card RAID 5 AIX Disks disappeared filosophizer AIX 0 06-14-2011 03:20 PM
RAID software vs hardware RAID presul UNIX for Dummies Questions & Answers 2 07-20-2010 03:09 PM
Add new disk to Sun StorEdge 3310 RAID jamie_collins Solaris 4 06-22-2010 03:16 PM
Partition management: lvm? fdisk? parted? (on RAID) builder88 Filesystems, Disks and Memory 1 05-03-2010 03:22 AM
add lvm space from a regular partition itik Red Hat 6 10-22-2009 12:50 AM
Help: root partition crashed, fsck failed. Disk problem? steeles Solaris 2 02-11-2008 07:09 PM
Need to add aditional space on an exsisting Linux Partition.. amitsayshii UNIX for Dummies Questions & Answers 1 07-21-2006 12:02 PM
All times are GMT -4. The time now is 03:03 AM.

Unix & Linux Forums Content Copyright 1993-2018. All Rights Reserved.
UNIX.COM Login
Username:
Password:  
Show Password





Not a Forum Member?
Forgot Password?