P
P
Panfilov2014-05-05 05:31:36
Debian
Panfilov, 2014-05-05 05:31:36

Raid1 + lvm (mirror recovery)

Good afternoon.
Hetzner, debian, 2 disks of 3TB each (sda, sdb) are available.
Sda1 and sdb1 are connected in raid1 /dev/md0, sda2+sdb2 are connected in raid1 /dev/md1 (mdadm)
sda disk failed, it was decided to replace it.
before replacing md0, the partition looked like this ( Array Size : 524276):
mdadm --detail /dev/md0
/dev/md0:
Version : 1.2
Creation Time : Fri May 3 18:18:43 2013
Raid Level : raid1
Array Size : 524276 (512.07 MiB 53686 MB)
Used Dev Size : 524276 (512.07 MiB 536.86 MB)
Raid Devices : 2
Total Devices : 1
Persistence : Superblock is persistent
Update Time : Sun May 4 12:54:22 2014
State : clean, degraded
Active Devices : 1
Working Devices : 1
Failed Devices : 0
Spare Devices : 0
Name : rescue:0
UUID : 9d2c2f1e:8e784305:b40630ca:df86cbd6
Events : 83
Number Major Minor RaidDevice State
0 0 0 0 removed
1 8 1 1 active sync /dev/sda1
After adding a new disk, the OS did not start normally, in the rescue shell md0 and md1 disappeared from the system (didn't get together?).
After adding sda and sdb to raid using commands like
mdadm --create --verbose --assume-clean /dev/md0 --level=1 --raid-devices=2 missing /dev/sdb1
it turned out that Array Size : 523968 decreased
/dev/md0:
Version : 1.2
Creation Time : Mon May 5 04:22:30 2014
Raid Level : raid1
Array Size : 523968 (511.77 MiB 536.54 MB)
Used Dev Size : 523968 (511.77 MiB 536.54 MB)
Raid Devices : 2
Total Devices : 1
Persistence : Superblock is persistent
Update Time : Mon May 5 04:22:30 2014
State : clean, degraded
Active Devices : 1
Working Devices : 1
Failed Devices : 0
Spare Devices : 0
Name : rescue:0 (local to host rescue)
UUID : 56d53f14:f12e534b:0543932d:839f2d29
Events : 0
Number Major Minor RaidDevice State
0 0 0 0 removed
1 8 17 1 active sync /dev/sdb1
Why? Is there a solution?
Because of this (probably), the lvm partitions that are on md1 are not mounted.
The partition table looks like it is, but is offset by 4096kb.
How can I resolve the situation with the restoration of the mirror?
Thank you.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
P
Puma Thailand, 2014-05-05
@opium

the new disk is smaller than the old ones in volume

V
Vlad Zhivotnev, 2014-05-05
@inkvizitor68sl

"Almost" doesn't count. The disk had to be exactly that size or larger.
It is better to let the system administrator into rescue-mode, let someone experienced restore it. Now the chance of losing all the data is huge.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question