标签:evel article file for wait work hand pen hang
centos -- how to add a new disk into a mdadm raid5 /dev/md0 whick lost a /dev/sdc1 disk and revoery at another machine?
fdisk -l mdadm --stop /dev/md0
# to force active the raid by remaind 3 disks. mdadm -A --force /dev/md0 /dev/sdb1 /dev/sde1 /dev/sdd1
# add a new disk into /dev/md0 mdadm --manage /dev/md0 --add /dev/sdc1
------------------------------------------------------------------------------------------------------
we build a /dev/md0 on a Unitek (removeable usb storadge with 4 disks inside) by mdadm software, and mdadm -create /dev/md0 operated on a HUAWEI server, our recovery work was done on my laptop ,and we meet many many problems during recovery.
we miss a disk --/dev/sdc1 from the raid /dev/md0, and now have a new disk -- same compable with the lost /dev/sbc1, on hand.
and then our joury is startiing
ll /dev/
nothing about /dev/md0 .
cat /proc/mdstat
Personalities :
unused devices: <none>
...nothing( for this is a totally new machine to the /dev/md0 no conf file ,no superblock...)
mdadm --assemble --run --force /dev/md0
mdadm -A --force /dev/md0 /dev/sdb1 /dev/sde1 /dev/sdd1
we get "can‘t open /dev/md0 array info" or "/dev/sdb1 is busying" and many other error response info;
mdadm --manage /dev/md0 --add /dev/sdc1 mdadm: Cannot get array info for /dev/md0
[root@localhost dev]# mdadm --assemble /dev/md0 --scan --force
mdadm: /dev/md0 not identified in config file.
mdadm --stop /dev/md0
mdadm: stopped /dev/md0
[root@localhost dev]# mdadm --assemble /dev/md0 --scan --force mdadm: /dev/md0 not identified in config file. [root@localhost dev]# cat /proc/mdstat Personalities : unused devices: <none>
mdadm --force start by remain 3 disks, and add a new disk into /dev/md0, and get into recovery state.
[root@localhost dev]# mdadm -A --force /dev/md0 /dev/sdb1 /dev/sde1 /dev/sdd1 mdadm: /dev/md0 has been started with 3 drives (out of 4). [root@localhost dev]# mdadm --manage /dev/md0 --add /dev/sdc1 mdadm: added /dev/sdc1 [root@localhost dev]# cat /proc/mdstat Personalities : [raid6] [raid5] [raid4] md0 : active raid5 sdc1[5] sdd1[0] sde1[4] sdb1[2] 8790402048 blocks super 1.2 level 5, 512k chunk, algorithm 2 [4/3] [U_UU] [>....................] recovery = 0.0% (184776/2930134016) finish=1321.3min speed=36955K/sec bitmap: 0/22 pages [0KB], 65536KB chunk unused devices: <none>
conclusion:
-----other relate info reference
1. http://blog.csdn.net/waityoualife/article/details/5612243
mdadm Raid5 /dev/md0 lost a disk and recovery from another machine
标签:evel article file for wait work hand pen hang
原文地址:http://www.cnblogs.com/mousean/p/6050205.html