#1  
Old 10th June 2007, 14:52
Daisy Daisy is offline
Senior Member
 
Join Date: Dec 2006
Posts: 112
Thanks: 0
Thanked 3 Times in 1 Post
Default software raid problem

Ok. So I don't have a drive that failed but I just noticed that two of my partitions aren't mirrored anymore. They used to be. Can anyone give some helpful tips or point me in the right direction on how to fix this? Everything I'm reading is on drive failure only. I think I may just need to resynchronize them but I'm not sure if you can do that.

Code:
[root@server ~]# cat /proc/mdstat
Personalities : [raid1] 
md0 : active raid1 sdb1[0]
      104320 blocks [2/1] [U_]
      
md1 : active raid1 sdb2[0] sda2[1]
      4192896 blocks [2/2] [UU]
      
md2 : active raid1 sdb3[0]
      308271168 blocks [2/1] [U_]
      
unused devices: <none>
Code:
[root@server ~]# fdisk -l

Disk /dev/sda: 320.0 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          13      104391   fd  Linux raid autodetect
/dev/sda2              14         535     4192965   fd  Linux raid autodetect
/dev/sda3             536       38913   308271285   fd  Linux raid autodetect

Disk /dev/sdb: 320.0 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *           1          13      104391   fd  Linux raid autodetect
/dev/sdb2              14         535     4192965   fd  Linux raid autodetect
/dev/sdb3             536       38913   308271285   fd  Linux raid autodetect

Disk /dev/md2: 315.6 GB, 315669676032 bytes
2 heads, 4 sectors/track, 77067792 cylinders
Units = cylinders of 8 * 512 = 4096 bytes

Disk /dev/md2 doesn't contain a valid partition table

Disk /dev/md1: 4293 MB, 4293525504 bytes
2 heads, 4 sectors/track, 1048224 cylinders
Units = cylinders of 8 * 512 = 4096 bytes

Disk /dev/md1 doesn't contain a valid partition table

Disk /dev/md0: 106 MB, 106823680 bytes
2 heads, 4 sectors/track, 26080 cylinders
Units = cylinders of 8 * 512 = 4096 bytes

Disk /dev/md0 doesn't contain a valid partition table
# mdadm.conf written out by anaconda
DEVICE partitions
MAILADDR root
ARRAY /dev/md2 level=raid1 num-devices=2 uuid=ae0c2514:084a7067:2f452462:3d34e6ea
ARRAY /dev/md0 level=raid1 num-devices=2 uuid=722785de:74ec7f53:38daed28:0929896a
ARRAY /dev/md1 level=raid1 num-devices=2 uuid=44f67f49:e88f3958:dea4af5b:d7863e55
~
Reply With Quote
Sponsored Links
  #2  
Old 11th June 2007, 15:10
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,748 Times in 2,579 Posts
Default

Take a look at this tutorial: http://www.howtoforge.com/replacing_..._a_raid1_array
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #3  
Old 12th June 2007, 03:35
Daisy Daisy is offline
Senior Member
 
Join Date: Dec 2006
Posts: 112
Thanks: 0
Thanked 3 Times in 1 Post
Default

awesome, that looks like exactly what I'm looking for. Question:

Personalities : [raid1]
md0 : active raid1 sdb1[0]
104320 blocks [2/1] [U_]

see how is says sdb1? I have sda1 and sdb1. Which one failed? How do I know which one the underscore is for?
Reply With Quote
  #4  
Old 12th June 2007, 15:06
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,748 Times in 2,579 Posts
Default

I think that in your case sdb is ok and sda failed.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #5  
Old 12th June 2007, 15:47
Daisy Daisy is offline
Senior Member
 
Join Date: Dec 2006
Posts: 112
Thanks: 0
Thanked 3 Times in 1 Post
Default

for anyone who reads this.... Software RAID on fedora Core 5 using CLI.

ok, so let's break down the cat /proc/mdstat first
Code:
[root@phoenix-nest /]# cat /proc/mdstat
Personalities : [raid1] 
md0 : active raid1 sdb1[0]
      104320 blocks [2/1] [U_]
      
md1 : active raid1 sdb2[0] sda2[1]
      4192896 blocks [2/2] [UU]
      
md2 : active raid1 sdb3[0]
      308271168 blocks [2/1] [U_]
      
unused devices: <none>
ok, so there are two raid arrays here missing a drive/partition. md0 and md2. How can you tell? well, notice md1 where there are two U's? [UU] That means it's working. I have two hard drives. sda and sdb. You'll notice that both drives with both partitions are listed. i.e. active raid1 sdb2[0] sda2[1]

(If the hdd had actually died and needed to be replaced, you would have had to manually mark them as failed following the steps provided in the link above. Thanks Falco! Mine was just missing the drive in the first place.)

The other two, (md0 and md2) only have one drive and partition listed. All I had to do was re-add these using:
Code:
[root@phoenix-nest /]# mdadm --manage /dev/md0 --add /dev/sda1
mdadm: re-added /dev/sda1
[root@phoenix-nest /]# mdadm --manage /dev/md2 --add /dev/sda3
mdadm: re-added /dev/sda3
and I got this:
Code:
[root@phoenix-nest /]# cat /proc/mdstat
Personalities : [raid1] 
md0 : active raid1 sda1[1] sdb1[0]
      104320 blocks [2/2] [UU]
      
md1 : active raid1 sdb2[0] sda2[1]
      4192896 blocks [2/2] [UU]
      
md2 : active raid1 sda3[2] sdb3[0]
      308271168 blocks [2/1] [U_]
      [>....................]  recovery =  0.1% (544896/308271168) finish=122.3min speed=41915K/sec
      
unused devices: <none>
Ta da. I hope this helps someone.

Last edited by Daisy; 12th June 2007 at 15:50.
Reply With Quote
The Following 3 Users Say Thank You to Daisy For This Useful Post:
Check (26th February 2008), falko (13th June 2007), manuelperezf (19th December 2008)
  #6  
Old 6th January 2010, 14:02
Tommy Silver Tommy Silver is offline
Junior Member
 
Join Date: Nov 2009
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

it seems like both disks aren't synchronized with each other. you better google 'raid recovery online' for a quick solution
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
sending e-mail using mail() function linuxuser1 HOWTO-Related Questions 38 21st April 2009 13:20
HOWTO: SUSE 10.0 and Software RAID a.k.a FakeRAID crushton HOWTO-Related Questions 35 16th January 2009 20:40
software raid during installation Daisy Installation/Configuration 0 17th May 2007 15:07
RAID 1, debian, installation small problem TheRudy Installation/Configuration 4 12th June 2006 12:38
SATA Software RAID 1 on Linux mphayesuk Installation/Configuration 2 21st February 2006 12:31


All times are GMT +2. The time now is 01:18.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.