3

I have two 8TB disks configured as RAID1 using mdadm on Ubuntu 18.04 server. They way I created software RAID was on the whole device - /dev/sdb and /dev/sdc - instead of the partition such as /dev/sdb1 and /dev/sdc1.

The problem is, the RAID does not assemble on reboot and the only way to get back the md devices is by recreating - running the same command used to create the RAID1 volume initially. I've read here that for the md device to assemble automatically upon reboot one needs to create RAID on partitions instead of the whole device .

I have LVM on top of the RAID1 and use it as store for VMs managed using Ganeti. I already have few VMs running and using about 2TB of the total 7.6TB capacity.

If I create a partition on these disks spanning the whole device and create RAID again as I currently do, is there hope in getting back the LVM and the partitions on it?

4
  • I tried to test this out under VirtualBox using 10GB disks and it looks like this is not possible. After recreating RAID on the new partitions I do not get back the volume group.
    – Lungten
    Commented Jan 1, 2019 at 5:42
  • This is doable, but high risk. You need to back up first, then ensure the LVM has space free at the end, then shrink RAID (using --grow ! ) then finish a full rebuild RAID, remove first disk, partition, add back.
    – davidgo
    Commented Jan 1, 2019 at 6:58
  • I should have explicitly stated you need to shrink the PV under LVM.
    – davidgo
    Commented Jan 1, 2019 at 7:00
  • @davidgo Shrinking RAID and rebuilding makes sense. I will try this.
    – Lungten
    Commented Jan 1, 2019 at 9:17

0

You must log in to answer this question.

Browse other questions tagged .