I
I
Ivan2017-02-13 18:01:57
linux
Ivan, 2017-02-13 18:01:57

How to restore software RAID1?

Hello. There is network storage wd book live duo. Due to problems with one of the disks, the RAID fell apart, we bought a new disk. Now the RAID does not want to be assembled. There are several partitions - md1 md2 md3, system partitions are collected, the data partition is not. The data partitions are sda4 and sdb4.
:MyBookLiveDuo:~# mdadm -D /dev/md3
/dev/md3:
Version : 1.0
Creation Time : Sat Mar 3 21:27:07 2012
Raid Level : raid1
Used Dev Size : 1948998520 (1858.71 GiB 1995.77 GB)
Raid Devices : 2
Total Devices : 1
Persistence : Superblock is persistent
Update Time : Mon Feb 13 14:07:42 2017
State : active, FAILED, Not Started
Active Devices : 0
Working Devices : 1
Failed Devices : 0
Spare Devices : 1
Number Major Minor RaidDevice State
0 0 0 0 removed
2 8 4 1 spare rebuilding /dev/sda4
MyBookLiveDuo:~# mdadm --examine /dev/sda4
/dev/sda4:
Magic : a92b4efc
Version : 1.0
Feature Map : 0x2
Array UUID : 53bed504:758610bc:926b436a:618cd97f
Name : MyBookLiveDuo:3 (local to host MyBookLiveDuo)
Creation Time : Sat Mar 3 21:27:07 2012
Raid Level : raid1
Raid Devices
Avail Dev Size : 3897997040 (1858.71 GiB 1995.77 GB)
Array Size : 3897997040 (1858.71 GiB 1995.77 GB)
Super Offset : 3897997296 sectors
Recovery Offset : 3693470336 sectors
State : active
Device UUID : adf4ee48:15769af1:3ffe0bfb
:
a2bbf3d8
Events : 1189711
Device Role : Active device 1
Array State : AA ('A' == active, '.' == missing)
Every 2.0s: cat /proc/mdstat Mon Feb 13 17:42:48 2017
Personalities : [linear] [raid0] [raid1] [raid10] [raid6] [raid5] [raid4]
md3 : inactive sda4[2]
1948998520 blocks super 1.0
md2 : active raid1 sda3[1]
500724 blocks super 1.0 [2/1 ] [_U]
md1 : active raid1 sda2[0] sda1[1]
1999808 blocks [4/2] [UU__]
unused devices:

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
Andrey Mikhalev, 2017-02-14
@Endru9

What manual did you use to replace a disk in an array?
As far as I remember, the order is as follows:
1. mark the sdb1 partition in the md0 array as bad:
2. Delete the sdb1 partition from the md0 array:
3. copy the markup from the sda ​​disk to the new sdb disk. ( You need to do it with a clear head, so as not to overwrite all the data at all !!! )
4. Add a new section to the md0 array
mdadm --manage /dev/md0 --add /dev/sdb1

V
Victor Taran, 2017-02-13
@shambler81

did you transfer the partitions to the new disk?

I
Ivan, 2017-02-14
@Amigo83

In general, I copied the data to another disk, and rebuilt from scratch. Really faster it will turn out, than to sit is excruciated. That's why I don't like linux) Thank you all for your participation.
Yes, about mdadm --manage /dev/md0 --fail /dev/sdb1. It's all good, but all sections are "device is busy", another problem looms here))

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question