使用降级 RAID5 引导 GRUB2

使用降级 RAID5 引导 GRUB2

我正在使用 Debian Jessie 构建自定义 NAS。拥有三个采用软件 RAID5 配置的 4TB 硬盘。当所有三个驱动器都存在时,工作完美。

我正在尝试测试如果驱动器坏了并且我是否可以在降级状态下启动机器时会发生什么。当我拔下任何驱动器并尝试启动计算机时,我从 grub 中看到以下内容。

Unable to find LVM volume system/root
  Volume group "system" not found
  Skipping volume group system

最后,grub 放弃并将我放入 initramfs shell 中。

所有三个驱动器的分区如下:

$ sudo parted /dev/sda print
Model: ATA ST4000VN000-1H41 (scsi)
Disk /dev/sda: 4001GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Disk Flags: 

Number  Start   End     Size    File system  Name  Flags
 1      1049kB  2097kB  1049kB                     bios_grub
 2      2097kB  4001GB  4001GB                     raid

这是我的 RAID 设置...

$ sudo mdadm --detail /dev/md0
/dev/md0:
        Version : 1.2
  Creation Time : Tue Jun 30 12:56:49 2015
     Raid Level : raid5
     Array Size : 7813769216 (7451.79 GiB 8001.30 GB)
  Used Dev Size : 3906884608 (3725.90 GiB 4000.65 GB)
   Raid Devices : 3
  Total Devices : 3
    Persistence : Superblock is persistent

  Intent Bitmap : Internal

    Update Time : Wed Jul  1 14:37:11 2015
          State : clean 
 Active Devices : 3
Working Devices : 3
 Failed Devices : 0
  Spare Devices : 0

         Layout : left-symmetric
     Chunk Size : 512K

           Name : kai:0  (local to host kai)
           UUID : 2743ad66:6b1df25a:5c41ca14:19084f56
         Events : 10286

    Number   Major   Minor   RaidDevice State
       0       8        2        0      active sync   /dev/sda2
       1       8       18        1      active sync   /dev/sdb2
       2       8       34        2      active sync   /dev/sdc2

逻辑卷设置...

$ sudo lvdisplay
--- Logical volume ---
LV Path                /dev/system/root
LV Name                root
VG Name                system
LV UUID                1A55Kr-IR4x-O1Z8-YXFj-BvUJ-PMcs-uRjEsv
LV Write Access        read/write
LV Creation host, time kai, 2015-06-30 12:57:39 -0400
LV Status              available
# open                 1
LV Size                29.80 GiB
Current LE             7629
Segments               1
Allocation             inherit
Read ahead sectors     auto
- currently set to     4096
Block device           253:0

--- Logical volume ---
LV Path                /dev/system/home
LV Name                home
VG Name                system
LV UUID                h6Piot-XXYn-TBdK-s1Ja-YN1z-Fbdn-Nv72IT
LV Write Access        read/write
LV Creation host, time kai, 2015-06-30 12:57:49 -0400
LV Status              available
# open                 1
LV Size                14.90 GiB
Current LE             3814
Segments               1
Allocation             inherit
Read ahead sectors     auto
- currently set to     4096
Block device           253:2

--- Logical volume ---
LV Path                /dev/system/swap
LV Name                swap
VG Name                system
LV UUID                yh7WRj-w4OW-WV4M-q0hN-NlCx-RPiL-usSz6j
LV Write Access        read/write
LV Creation host, time kai, 2015-06-30 12:57:57 -0400
LV Status              available
# open                 2
LV Size                3.72 GiB
Current LE             953
Segments               1
Allocation             inherit
Read ahead sectors     auto
- currently set to     4096
Block device           253:1

--- Logical volume ---
LV Path                /dev/system/storage
LV Name                storage
VG Name                system
LV UUID                U9M7g3-sL2j-Gut6-TaNJ-BNWN-P3KM-DPpa4z
LV Write Access        read/write
LV Creation host, time kai, 2015-06-30 12:58:03 -0400
LV Status              available
# open                 1
LV Size                7.23 TiB
Current LE             1895262
Segments               1
Allocation             inherit
Read ahead sectors     auto
- currently set to     4096
Block device           253:3

/etc/fstab

/dev/mapper/system-root /               xfs     noatime         0       1
/dev/mapper/system-home /home           xfs     nodev           0       2
/dev/mapper/system-storage /mnt/storage xfs     nodev,noexec    0       2
/dev/mapper/system-swap none            swap    sw              0       0

我确实在所有三个驱动器上安装了 grub,如下所示:

$ grub-install /dev/sda
$ grub-install /dev/sdb
$ grub-install /dev/sdc

有什么想法为什么我无法启动降级的阵列吗?我很感激你的时间。

相关内容