Failed raid 1 partition cannot re-add


 
Thread Tools Search this Thread
Special Forums Hardware Filesystems, Disks and Memory Failed raid 1 partition cannot re-add
# 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 or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Unable to understand RAID PARTITION

Hi i am studying about raid partion.i am not able to understand RAID level 5. below is excerpt taken from tutorial. RAID level 5 are they trying to say that the will be one extra disk which contain all the data. let says there are 4 disk. out of 4 , 3 disk are used for storing data and... (15 Replies)
Discussion started by: scriptor
15 Replies

2. AIX

RAID 10 Failed Drive Swap

I am new to the AIX operating system and am seeking out some advice. We recently have had a drive go bad on our AIX server that is in a RAID 10 array. We have a replacement on the way. I was wondering what the correct steps are to swap out this drive. Does the server need to be powered off? Or can... (5 Replies)
Discussion started by: mpeter05
5 Replies

3. Red Hat

RAID Configuration for IBM Serveraid-7k SCSI RAID Controller

Hello, I want to delete a RAID configuration an old server has. Since i haven't the chance to work with the specific raid controller in the past can you please help me how to perform the configuraiton? I downloaded IBM ServeRAID Support CD but i wasn't able to configure the video card so i... (0 Replies)
Discussion started by: @dagio
0 Replies

4. Solaris

SPARC T4-1/Solaris 11/Add 2 new HDDs in RAID 0 configuration

Hi, Couple of sentences for background: I'm a software developer, whose task was to create a server software for our customer. Software is ready for deployment and customer has a new T4-1 SPARC, but somehow it also became my task also to setup the server. I have managed to get the server is up... (13 Replies)
Discussion started by: julumme
13 Replies

5. UNIX for Advanced & Expert Users

Identify failed disk in Linux RAID

Good Evening, 2 years ago, I set up an Ubuntu file-server for a friend, who is a photograph amateur. Basically, the server offers a software RAID-5 that can be accessed remotely from a MAC. Unfortunately, I didn't labeled the hard drives (i.e. which physical drive corresponds to the /dev/sdX... (2 Replies)
Discussion started by: Loic Domaigne
2 Replies

6. AIX

SCSI PCI - X RAID Controller card RAID 5 AIX Disks disappeared

Hello, I have a scsi pci x raid controller card on which I had created a disk array of 3 disks when I type lspv ; I used to see 3 physical disks ( two local disks and one raid 5 disk ) suddenly the raid 5 disk array disappeared ; so the hardware engineer thought the problem was with SCSI... (0 Replies)
Discussion started by: filosophizer
0 Replies

7. Solaris

Add new disk to Sun StorEdge 3310 RAID

HI guys. Bit of a noob so bear with me. I have 2 new disks I want to add to my StorEdge 3310 but am getting lost in the steps. We have another 3310 (JBOD) that I was able to plug the disks into and they instantly showed up. Did a few minor commands after (drvconfig, devfsadm etc..) and I was... (4 Replies)
Discussion started by: jamie_collins
4 Replies

8. Filesystems, Disks and Memory

Partition management: lvm? fdisk? parted? (on RAID)

Hello, I have a RHEL system with two 500GB hard drives in RAID 1 (I think hardware, but not 100% certain - any way to tell?). It looks like it was just set up in default configuration with a small boot partition and one huge partition for the rest, which composes a LVM volume. I want... (1 Reply)
Discussion started by: builder88
1 Replies

9. Solaris

Help: root partition crashed, fsck failed. Disk problem?

recently this sunfire 280R (solaris 10) is having problme, it was able to boot up, then all suddent, it failed, and I can't even mount the first disk which contains root partition when I boot up from cdrom. 2 X 36G hard drive, I scan first hard drive by "read", there is no bad block. The... (2 Replies)
Discussion started by: steeles
2 Replies
Login or Register to Ask a Question