Разделы «появляются» в моем массиве raid 1 после перезагрузки, а разделы в массиве меняют имена

669
Michael

Я перевожу установку Ubuntu на lvm через raid 1. Сначала я создал массивы только с одним диском, планируя добавить второй диск позже. Я переместил файлы, и система успешно загрузилась на новый диск, но массивы и разделы, казалось, изменили имена. Первоначально я разбил диск следующим образом:

Device Boot Start End Blocks Id System /dev/sda1 * 1 20 153600 fd Linux raid autodetect /dev/sda2 20 243202 1953359960 fd Linux raid autodetect 

Затем я создал 2 деградированных рейдовых массива, соответствующих этим разделам, md0для /bootи md1для lvm со всем остальным на нем. После установки grub и загрузки с нового диска все, кажется, работает, за исключением странных вещей в движении. У / dev / md1 есть разделы, хотя я всего лишь сделал pvcreate /dev/md1:

Device Boot Start End Blocks Id System /dev/md1p1 * 257 38656 153600 fd Linux raid autodetect /dev/md1p2 38657 488378646 1953359960 fd Linux raid autodetect 

Дополнительно /proc/mdstatпоказывает (я уже добавил второй диск):

md0 : active raid1 sdc1[1] md1p1[0] 153536 blocks [2/2] [UU]  md1 : active raid1 sdc2[2] sda[0] 1953359872 blocks [2/1] [U_] 

Откуда md1p1взялся, а почему не /proc/mdstatпоказывает sda1и sdc1, и sda2и sdc2?

1

1 ответ на вопрос

2
Lee G

A late reply, but hey:

Unfortunately you didn't show the relevant parts, for example, which units your fdisk output shows (sectors? cylinders?)

Nonetheless it looks like you got bitten by the bug of the 0.90 meta data block:

0, 0.90 

Use the original 0.90 format superblock. This format limits arrays to 28 component devices and limits component devices of levels 1 and greater to 2 terabytes. It is also possible for there to be confusion about whether the superblock applies to a whole device or just the last partition, if that partition starts on a 64K boundary.

That means if you have a 0.90 meta data block on the last partition, and it starts on a 64k boundary, mdadm will assume the whole disk belongs to the raid. What you're seeing is the partition table of /dev/sda within the RAID. Of course this will give you massive corruption if you try to access anything within that RAID.

Upgrade ASAP (I can speak out of experience).

Похожие вопросы