硬重启后丢失RAID 6arrays+ LVM卷

重新启动后,我做了硬重启,现在mdadm不能再看到RAID 6arrays,LVM找不到那个RAIDarrays上的音量。 我已经看过/etc/mdadm/mdadm.conf ,它不包含我的/dev/md2 (RAID 6arrays)。

如何恢复RAID 6arrays,然后恢复LVM卷而不丢失任何数据?


好的,所以我做了一个mdadm --assemble --scan ,重新安装了/dev/md2 ,但是错过了其中一个驱动器。 缺less的驱动器似乎已被添加到一个新的非活动数组:

 md_d2 : inactive sdb1[3](S) 1953511936 blocks 

现在将其删除并手动添加到/dev/md2

仍然不确定丢失的LVM组和卷…


好的,重新组装arrays后,我得到了LVM:

 root@freetunes:~# pvdisplay --- Physical volume --- PV Name /dev/md2 VG Name lvm-raid PV Size 5.46 TiB / not usable 43.50 MiB Allocatable yes (but full) PE Size 256.00 MiB Total PE 22356 Free PE 0 Allocated PE 22356 PV UUID sJxydW-lMTJ-fsQn-Bln1-z6Cj-Dt6F-OPxMtr root@freetunes:~# lvdisplay --- Logical volume --- LV Name /dev/lvm-raid/lvm0 VG Name lvm-raid LV UUID D7Wj1A-wiJk-NxlM-IDdH-0uM4-aF1r-Fbpjjr LV Write Access read/write LV Status available # open 0 LV Size 5.46 TiB Current LE 22356 Segments 1 Allocation inherit Read ahead sectors auto - currently set to 1536 Block device 251:0 

你是依靠内核来为你自动组装数组吗? 如果是,请检查所有驱动器上的卷是否设置为正确的types。 这是msdos分区表的0xfd或gpt表的raid标志。 以下是适用于自动组装的每种分区types的示例。

 # parted /dev/sda GNU Parted 1.8.1 Using /dev/sda Welcome to GNU Parted! Type 'help' to view a list of commands. (parted) print Model: ATA INTEL SSDSA2M080 (scsi) Disk /dev/sda: 80.0GB Sector size (logical/physical): 512B/512B Partition Table: msdos Number Start End Size Type File system Flags 1 4194kB 273MB 268MB primary ext3 boot, raid 2 273MB 80.0GB 79.8GB primary raid # parted /dev/sda GNU Parted 2.4 Using /dev/sda Welcome to GNU Parted! Type 'help' to view a list of commands. (parted) print Model: ATA WDC WD20EADS-32R (scsi) Disk /dev/sda: 2000GB Sector size (logical/physical): 512B/512B Partition Table: gpt Number Start End Size File system Name Flags 1 262kB 1074MB 1074MB ext3 boot raid 2 1074MB 35.4GB 34.4GB linux-swap(v1) swap raid 3 35.4GB 104GB 68.7GB ext4 root raid 4 104GB 2000GB 1896GB vg00 raid