Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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.

share|improve this question
    
Personally, I'd create an un-RAIDed /boot partition outside of the RAID/LVM setup. I know that GRUB is supposed to be able to handle this, but it's yet more stuff to cram into your GRUB setup that might go wrong. –  Rod Smith Jan 11 at 18:05
    
Except it was working just fine until I replaced the 2Tb fdisk-partitioned drives with 3Tb gpt drives. Everything else is exactly the same as what I've been running for years. –  Paul Tomblin Jan 11 at 19:24
    
GRUB for MBR and GRUB for GPT aren't identical. It could be that the features you need aren't working for GPT. It could also be there's a 2TiB (2 tebibyte; not 2Tb, or 2 terabit) limit somewhere, and LVM is putting the kernel above that limit. Having a separate /boot partition below the 2TiB mark will help guarantee you don't run into such a problem. –  Rod Smith Jan 11 at 19:34

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.