mdadm Raid5 /dev/md0 lost a disk and recovery from another machine
centos -- how to add a new disk into a mdadm raid5 /dev/md0 which 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
- check /dev list
ll /dev/
nothing about /dev/md0 .
- check /dev/md0 state :
cat /proc/mdstat
Personalities :
unused devices: <none>
...nothing( for this is a totally new machine to the /dev/md0 no conf file ,no superblock...)
- we try force mdadm to assembly to force mdadm auto recovery itself:
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;
- then we try add a new disk into
mdadm --manage /dev/md0 --add /dev/sdc1
mdadm: Cannot get array info for /dev/md0
- try get into manage mode, can't get config file
[root@localhost dev]# mdadm --assemble /dev/md0 --scan --force
mdadm: /dev/md0 not identified in config file.
- a key operated is coming, and lead us to a success result.
all the steps above, we NOT stop the /dev/md0 and get many wrong try and get many failed resulte.
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 drives (out of ).
[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[] sdd1[] sde1[] sdb1[]
blocks super 1.2 level , 512k chunk, algorithm [/] [U_UU]
[>....................] recovery = 0.0% (/) finish=.3min speed=36955K/sec
bitmap: / pages [0KB], 65536KB chunk unused devices: <none>
conclusion:
- remember to stop /dev/md0 at first step, then do other operates;
- mdadm create raid5 array, every raid array info were storaged at every physical disk , no matter how their position was changed, madadm can recognize the correct raid array info.
- mdadm is realy a stronger sofeware at protect our data, if use correctly we need not worry about our data's safety --- if only lost ONE disk, we can find them back;
-----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的更多相关文章
- vmware启动虚拟机报错VMware Workstation has paused this virtual machine because the disk on which the virtual machine is stored is almost full. To continue, free an additional 1.4 GB of disk space.
报错VMware Workstation has paused this virtual machine because the disk on which the virtual machine i ...
- How to Add Memory, vCPU, Hard Disk to Linux KVM Virtual Machine
ref: https://www.thegeekstuff.com/2015/02/add-memory-cpu-disk-to-kvm-vm/ In our previous article of ...
- the algebra of modulo-2 sums disk failure recovery
x=y x_+_y=0 The bit in any position is the modulo-2 sum of all the bits in the corresponding positio ...
- 使用mdadm创建磁盘RAID10整列,RAID5出现故障,自动替换硬盘
首先需了解mdadm的参数使用 . 第一步: 先在虚拟机中添加四块硬板 第二步:使用mdadm命令创建RAID10名称为"/dev/md0" -C代表创建操作,v 显示创建过程,- ...
- 专题:mdadm Raid & LVM
>FOR FREEDOM!< {A} Introduction Here's a short description of what is supported in the Linux R ...
- mdadm命令详解及实验过程
一.概念 mdadm是multiple devices admin的简称,它是Linux下的一款标准的软件 RAID 管理工具,作者是Neil Brown 二.特点 mdadm能够诊断.监控和收集详细 ...
- mdadm语法
mdadm命令详解及实验过程 一.概念 mdadm是multiple devices admin的简称,它是Linux下的一款标准的软件 RAID 管理工具,作者是Neil Brown 二.特点 ...
- [daily][archlinux][mdadm][RAID] 软RAID
一, 使用mdadm创建RAID 参考:https://wiki.archlinux.org/index.php/RAID 1. 安装 mdadm /home/tong [tong@TStation ...
- mdadm详细使用手册
1. 文档信息 当前版本 1.2 创建人 朱荣泽 创建时间 2011.01.07 修改历史 版本号 时间 内容 1.0 2011.01.07 创建<mdadm详细使用手册>1.0文档 1. ...
随机推荐
- [Leetcode] Reorder list 重排链表
Given a singly linked list L: L 0→L 1→…→L n-1→L n,reorder it to: L 0→L n →L 1→L n-1→L 2→L n-2→… You ...
- SCOI2005 互不侵犯 [状压dp]
题目传送门 题目大意:有n*n个格子,你需要放置k个国王使得它们无法互相攻击,每个国王的攻击范围为上下左走,左上右上左下右下,共8个格子,求最多的方法数 看到题目,是不是一下子就想到了玉米田那道题,如 ...
- codeforces 1015B
B. Obtaining the String time limit per test 1 second memory limit per test 256 megabytes input stand ...
- C ------ 标准函数介绍
sprintf() 函数原型:int sprintf( char *buffer, const char *format [, argument] ... ); 功能介绍: 1.把一个字符串赋值(拷贝 ...
- vue+koa+mysql简易demo
功能支持网址收藏编辑 代码: https://github.com/lanleilin/lanOdyssey/tree/master/vueKoa/webCollection1 运行方法: 在serv ...
- 转:增强学习(二)----- 马尔可夫决策过程MDP
1. 马尔可夫模型的几类子模型 大家应该还记得马尔科夫链(Markov Chain),了解机器学习的也都知道隐马尔可夫模型(Hidden Markov Model,HMM).它们具有的一个共同性质就是 ...
- HDU 5685 Problem A | 快速幂+逆元
Problem A Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total S ...
- 谈pkusc2016的几道数学题
题面搬来的qwq(忘记出处了 水印应该能表示) [题解] 1. 我们看到这题先想到令(x+y+z)^3 展开得到一坨,稍微减减,得到我们要求证 delta = 3xy^2+3xz^2+3yx^2+3y ...
- [BZOJ2190&BZOJ2705]欧拉函数应用两例
欧拉函数phi[n]是表示1~n中与n互质的数个数. 可以用公式phi[n]=n*(1-1/p1)*(1-1/p2)*(1-1/p3)...*(1-1/pk)来表示.(p为n的质因子) 求phi[p] ...
- mysql 四 表操作
表介绍 表相当于文件,表中的一条记录就相当于文件的一行内容,不同的是,表中的一条记录有对应的标题,称为表的字段 id,name,qq,age称为字段,其余的,一行内容称为一条记录 本节重点: 1 创建 ...