3

I am building a custom NAS with Debian Jessie. Has three 4TB hard drives in a software RAID5 configuration. Works perfectly when all three drives are present.

I am trying to test what happens when if a drive goes bad & if i can boot the machine in a degraded state. When i unplug any of the drives & try to boot the computer, I see the following from grub.

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

Finally, grub gives up & drops me in an initramfs shell.

All three drives are partitioned as follows:

$ 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

Here's my RAID set up...

$ 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

Logical Volume setup...

$ 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

And /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

I did install grub on all three drives like so:

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

Any ideas why i cannot boot off a degraded array? I appreciate your time.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.