• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1491
  • Last Modified:

How to start broken Linux Software RAID ?

Hi,

May i know how to start broken linux software raid ?

I have the following :

[root@vps-svr1 ~]# cat /proc/mdstat
Personalities : [raid1]
md0 : active raid1 sdb1[1] sda1[0]
      200704 blocks [2/2] [UU]

md1 : active raid1 sdb3[1] sda3[0]
      2048192 blocks [2/2] [UU]

md3 : active raid1 sdb5[1]
      473845056 blocks [2/1] [_U]

md2 : active raid1 sdb2[1] sda2[2](F)
      12289600 blocks [2/1] [_U]

unused devices: <none>
[root@vps-svr1 ~]#



I have tried the following but no luck ?


[root@vps-svr1 ~]# mdadm --manage /dev/md3 --fail /dev/sdb5
mdadm: set /dev/sdb5 faulty in /dev/md3
[root@vps-svr1 ~]#

[root@vps-svr1 ~]# mdadm --manage /dev/md3 --remove /dev/sdb5
mdadm: hot remove failed for /dev/sdb5: Device or resource busy
[root@vps-svr1 ~]#

[root@vps-svr1 ~]# mdadm --manage --stop /dev/md3
mdadm: fail to stop array /dev/md3: Device or resource busy
[root@vps-svr1 ~]#

[root@vps-svr1 ~]# mdadm --add /dev/md3 /dev/sdb5
mdadm: Cannot open /dev/sdb5: Device or resource busy
[root@vps-svr1 ~]

Appreciates if anybody can provide a step by step on how to update/start the raid.

Thank you.


0
smksa
Asked:
smksa
  • 3
  • 3
1 Solution
 
kyleb84Commented:
Hmm I did this not long ago with a RAID 5 array....

If i can remember properly, I just force started the array with the 2 drives and then added the 3rd after...

I think the command your looking for is:

mdadm --manage --run /dev/md3 /dev/sdb5

then

mdadm --manage /dev/md3 --add /dev/sdXX

give that a shot...
0
 
smksaAuthor Commented:
Ehm...

I've tried that but no luck, the following is the result :

[root@vps-svr1 ~]# mdadm --manage --run /dev/md3 /dev/sdb5
mdadm: internal error - devmode[/dev/sdb5]=0
[root@vps-svr1 ~]# mdadm --manage /dev/md3 --add /dev/sdb5
mdadm: Cannot open /dev/sdb5: Device or resource busy
[root@vps-svr1 ~]#
0
 
kyleb84Commented:
"mdadm: Cannot open /dev/sdb5: Device or resource busy"

Same error I was getting for a bit...

Hmm what do you get when you type:

# mdadm --detail /dev/md3

0
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

 
smksaAuthor Commented:
Hi,

I managed to rebuild using "mdadm --manage /dev/md3 --add /dev/sda5"

It seems the active raid was sdb5 , i gues that is why the first command did't work.
0
 
kyleb84Commented:
Ahh... Well, glad to hear its back up.
0
 
smksaAuthor Commented:
Thanks....
0

Featured Post

The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now