Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
software raid got messed up.. [resolved]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
dirtbag
Guru
Guru


Joined: 18 Feb 2003
Posts: 508
Location: NC

PostPosted: Fri Mar 15, 2013 8:51 pm    Post subject: software raid got messed up.. [resolved] Reply with quote

I upgraded my system and kernel last weekend and my md1 and md3 started showing up as
md126 and md127.. After freaking out and trying to "rebuild" them as md1 and md3, i finally figured out there was something else wrong with my system that wouldnt let it boot.

anyway, everything is booting fine now, but now I have somehow ended up with the following for my raid ..

Code:

jason@beast ~ $ cat /proc/mdstat
Personalities : [raid0] [raid1]
md1 : active raid1 sdb1[1] sda1[0]
      88256 blocks [2/2] [UU]
     
md127 : active raid1 sda3[0]
      193310080 blocks [2/1] [U_]
     
md3 : active raid1 sdb3[1]
      193310080 blocks [2/1] [_U]
     
unused devices: <none>
jason@beast ~ $


and im looking for advice on how to fix this.
md1 is /boot
md3 is /

mount says
/dev/md3 on / type ext3 (rw,noatime,errors=continue,barrier=1,data=ordered)

is it as simple as
http://www.howtoforge.com/replacing_hard_disks_in_a_raid1_array

I dont think that the disk is actually bad, i will probably remove it and fsck it and then re-add it back..

so im thinking something like the following:
Code:

mdadm --manage /dev/md127 --fail /dev/sda3
mdadm --manage /dev/md127 --remove /dev/sda3
mdadm --manage /dev/md3 --add /dev/sda3



regards,
db


Last edited by dirtbag on Sat Mar 16, 2013 12:37 pm; edited 1 time in total
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54096
Location: 56N 3W

PostPosted: Fri Mar 15, 2013 10:13 pm    Post subject: Reply with quote

dirtbag,

Thats pretty much it. There are a few details.
As your raid is split, you probably want to keep the newest half and sync the oldest half to it.

Code:
mdadm -E /dev/sd[ab]3
will help you determine which is the 'old' half.

The
Code:
 mdadm --manage /dev/md3 --add /dev/sda3
may fail as mdadm will detect that /dev/sda3 (or whatever) is a member of a different raid set.
You may need to remove the raid superblock from it before you can use --add
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
dirtbag
Guru
Guru


Joined: 18 Feb 2003
Posts: 508
Location: NC

PostPosted: Fri Mar 15, 2013 10:45 pm    Post subject: Reply with quote

thanks for the tip..

-db
Back to top
View user's profile Send private message
dirtbag
Guru
Guru


Joined: 18 Feb 2003
Posts: 508
Location: NC

PostPosted: Sat Mar 16, 2013 12:36 pm    Post subject: fixed.. whew.. Reply with quote

jason@beast ~ $ cat /proc/mdstat
Personalities : [raid0] [raid1]
md1 : active raid1 sdb1[1] sda1[0]
88256 blocks [2/2] [UU]

md127 : active raid1 sdb3[1] sda3[0]
193310080 blocks [2/2] [UU]

unused devices: <none>


all I had to do was stop the md group and then add that disk to the other md group.
but when the server came up, i had to adjust the grub.conf to use 127 instead of 3

-db
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum