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. ...
随机推荐
- 用JavaScript实现一个简单的树结构
数据源用数组混json结构,实现了基本的功能.效率一般,跟 dhtree 梅花雪树对比了下,都差不多. (ps感觉比dhtree快点,跟梅花雪树差不多,个人测试) 这个实现树的原理是根据json,不断 ...
- git使用笔记(七)版本回退和撤销
By francis_hao Nov 21,2016 从版本库初始化开始,每一步的撤销操作 添加第一个文件 在空的版本库中创建了一个文件并git add到了缓存区,这时候怎么撤销呢? 撤销单个文 ...
- 手动安装GCC
01sunxiaoqiang的博客 Centos离线手动安装gcc.g++教程 转载 2016-11-06 17:35:18 标签:linux应用笔记 在安装LINUX系统的时候很可能会没有安装gcc ...
- Centos系统修改hostname
1.用命令临时修改 hostname oier 这样,服务器的hostname就变成oier了,但是重启之后会变回去 2.编辑配置文件永久修改 vi /etc/sysconfig/network HO ...
- 【BZOJ2286】【SDOI2011】消耗战 [虚树][树形DP]
消耗战 Time Limit: 20 Sec Memory Limit: 512 MB[Submit][Status][Discuss] Description 在一场战争中,战场由n个岛屿和n-1 ...
- bzoj1833: [ZJOI2010]count 数字计数 && codevs1359 数字计数
bzoj1833 codevs1359 这道题也是道数位dp 因为0有前导0这一说卡了很久 最后发现用所有位数减1~9的位数就okay.....orzczl大爷 其他就跟51nod那道统计1出现次数一 ...
- GitLab 密码重设
内容全部来自: CSDN bisal GitLab 密码重设方法 假设注册邮箱为: abc@test.com 步骤 1) 登录 git 服务器 2) 执行: gitlab-rails console ...
- 【洛谷 P3306】[SDOI2013]随机数生成器 (BSGS)
题目链接 怎么这么多随机数生成器 题意见原题. 很容易想到\(BSGS\)算法,但是递推式是\(X_{i+1}=(aX_i+b)\mod p\),这显然不是一个等比数列. 但是可以用矩阵乘法来求出第\ ...
- 如何使主机和虚拟机IP处于同一网段(内网渗透专用)
先说一下正常流程: 1.打开虚拟机网络设置选项,选择桥接模式(Bridged)[如果是Kali 2.0的话,执行第一步后就OK了(90%)] 2.打开Kali里面的网络设置 3.设置一个ip4或者ip ...
- [bzoj2186][Sdoi2008]沙拉公主的困惑——数论
题目大意 求 \[\sum_{i = 1}^{N!} [gcd(i, M!) = 1]\] 题解 显然,题目就是求 \[N!(1-\frac{1}{p_1})(1-\frac{1}{p_2})...\ ...