I bought a pair of 3Tb disks to replace some existing 2Tb disks in my Kubuntu system. I partitioned them both using GPT, making a small "bios_grub" partition on both:
root@allhats2:~# parted /dev/sda print Model: ATA WDC WD30EFRX-68E (scsi) Disk /dev/sda: 3001GB Sector size (logical/physical): 512B/4096B Partition Table: gpt Number Start End Size File system Name Flags 1 1049MB 2097MB 1049MB 1 bios_grub 2 2097MB 3001GB 2998GB primary raid root@allhats2:~# parted /dev/sdc print Model: ATA WDC WD30EFRX-68E (scsi) Disk /dev/sdc: 3001GB Sector size (logical/physical): 512B/4096B Partition Table: gpt Number Start End Size File system Name Flags 1 1049MB 2097MB 1049MB boot bios_grub 2 2097MB 3001GB 2998GB primary root@allhats2:~#
Then I did a
mdadm --create /dev/md127 --level=1 --raid-devices=2 /dev/sda2 /dev/sdc2 to make them into a raid-1, did a pvcreate, vgextend, pvmove, vgreduce, pvremove to move all the content from the old disks to the new ones. Ran
dpkg-reconfigure on both of my installed kernels to make sure they had gpt support in the ramdisk. Ran
grub-install /dev/sda and attempted to boot.
I got two messages from grub telling me something about bad sectors in fd0 (which is odd, because I don't have a floppy drive), and then it complained it couldn't find lvm/lvm2-boot, which is the boot partition, and dropped me to the dreaded grub-rescue prompt.
If I plug the old disks back in, it boots fine. The old disks are not in the vg, although their raid re-assembled itself. I don't want to keep these old disks on my system doing nothing - as a matter of fact, I wanted to run SEATOOLS on them and get a report so I can send them back to Seagate for a replacement.
Any suggestions for booting from a GPT RAID LVM system? This is Kubuntu 13.04 with kernel 3.11.0-15-generic x86_64, and:
ii grub2-common 2.00-19ubunt amd64 GRand Unified Bootloader (common ii mdadm 3.2.5-5ubunt amd64 tool to administer Linux MD array ii lvm2 2.02.98-6ubu amd64 Linux Logical Volume Manager ii parted 2.3-16ubuntu amd64 disk partition manipulator
Update Looking through the output from
grub-install --debug, it appears that
grub-bios-setup goes through the various partitions of the old disks looking for stuff, it doesn't do so for the new disks. So while I see stuff like this:
/usr/sbin/grub-bios-setup: info: Scanning for mdraid1x devices on disk hostdisk//dev/sdb. /usr/sbin/grub-bios-setup: info: Found array md/128. /usr/sbin/grub-bios-setup: info: Inserting hostdisk//dev/sdb into md/128 (mdraid1x)
for the old disks, I don't see any such scanning going on for /dev/sda. Consequently, there is no mention of md/127, the raid on the two new disks. That would at least explain why it couldn't boot - it's unable to assemble the raid, and so unable to start the lvm that lives on it.