Monday, April 22, 2013

Recover Miss Drive in Linux Software Raid


1.       When do “more /proc/mdstat”, it shows there is a missing  drive

 

Personalities : [raid1]

md5 : active raid1 sda1[0]

 3068288 blocks [2/1] [U_]

 

 md2 : active raid1 sda2[0]

 10241344 blocks [2/1] [U_]

 

 md1 : active raid1 sda3[0]

 10241344 blocks [2/1] [U_]

 

 md3 : active raid1 sda6[0]

 2048192 blocks [2/1] [U_]

 

 md4 : active raid1 sda7[0]

 128592192 blocks [2/1] [U_]

 

 md0 : active raid1 sdb5[1] sda5[0]

 2096384 blocks [2/2] [UU]

 

2.       Do, “mdadm -D /dev/md1”, it seems the missing unit has been removed

 

/dev/md1:

 Version : 00.90.01

 Creation Time : Wed Nov 2 03:44:57 2005

 Raid Level : raid1

 Array Size : 10241344 (9.77 GiB 10.49 GB)

 Device Size : 10241344 (9.77 GiB 10.49 GB)

 Raid Devices : 2

 Total Devices : 1

 Preferred Minor : 1

 Persistence : Superblock is persistent

 

Update Time : Thu Mar 30 18:05:31 2006

 State : clean, degraded

 Active Devices : 1

 Working Devices : 1

 Failed Devices : 0

 Spare Devices : 0

 

 

Number Major Minor RaidDevice State

 0 8 3 0 active sync /dev/sda3

 1 0 0 -1 removed

 UUID : 1d16a55f:71fed86c:5a198cc1:1db31dfa

 Events : 0.1147282

 

3.       Add the missing unit back by “mdadm /dev/md1 -a /dev/sdb3”

4.       Check again with “mdadm –D /dev/md1”

 

Personalities : [raid1]

md5 : active raid1 sdb1[1] sda1[0]

 3068288 blocks [2/2] [UU]

 

 md2 : active raid1 sdb2[1] sda2[0]

 10241344 blocks [2/2] [UU]

 

 md1 : active raid1 sdb3[1] sda3[0]

 10241344 blocks [2/2] [UU]

 

 md3 : active raid1 sdb6[1] sda6[0]

 2048192 blocks [2/2] [UU]

 

 md4 : active raid1 sdb7[1] sda7[0]

 128592192 blocks [2/2] [UU]

 

 md0 : active raid1 sdb5[1] sda5[0]

 2096384 blocks [2/2] [UU]

 

 unused devices: <none>

No comments:

Post a Comment