You are here

Grub2 fails booting from second VG

I just got a new harddisk, because my old RAID of 3x 1 TB disks are getting filled and I'm running out of space. In the end I'll have replaced my old disks by 3x 4 TB disks. Currently the setup is as this: 

Disk /dev/sda: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x38d543a1

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *          63      514079      257008+  83  Linux
/dev/sda2          514080     4707044     2096482+  82  Linux swap / Solaris
/dev/sda3         4707045    13092974     4192965   83  Linux
/dev/sda4        13092975  1953520064   970213545    5  Extended
/dev/sda5        13093038    15197489     1052226   83  Linux
/dev/sda6        15197553  1953520064   969161256   83  Linux

Same to the other 2 disks, of course. So, I have (for x=[abc]): 

  • sdx1: RAID1 for /boot
  • sdx2: RAID1 for swap
  • sdx3: RAID1 for a rescue system
  • sdx5: RAID1 for /
  • sdx6: RAID5 for LVM for /usr, /var, /home & everything else

For the new disks I want a more simple layout like this maybe:

  • sdx1: RAID1 for /boot
  • sdx2: RAID1 for swap
  • sdx3: RAID5 for LVM for /, /usr, /var, /home & everything else

If it works, I would be fine without any special /boot partition anyway, but there's another problem: on the old disk set I have LVM and a Volume Group named "vg" and on the new disk I have a Volume Group named "lv": 

PV         VG   Fmt  Attr PSize PFree 
/dev/md4   vg   lvm2 a--  1.81t 129.53g
/dev/md6   lv   lvm2 a--  3.64t   3.58t

I made some Logical Volumes on "lv", copied over my system, ran update-grub and grub-install /dev/sdX and rebooted. In the grub menu I can select my desired new root partition, but when I try to boot from it, grub is not able to find the root device. Config lines within grub looks like this (from memory): 

root='(lv-root)'
search --no-floppy  --fs-uuid --set-root=0d54bd89-6628-499f-b835-e146a6fd895f

The UUID within grub matches the same UUID of /dev/lv/root, but grub states that I can't find the disk. The needed modules like for LVM and RAID are loaded, so I assume a problem with multiple Volume Groups, because a simple "ls" from within grub just shows Logical Volumes for Volume Group "vg", but not a single one of the second Volume Group "vg".

Is there a limitation in Grub2 for the number of supported Volume Groups? Does it only find the first created Volume Group? Is there a way to work around this limitation or is it a bug?

UPDATE:

  • The mainboard is an Asus P5P43TD PRO with latest BIOS firmware (version 0710) from Asus website.
  • The 4 TB disk is a Hitachi HDS724040ALE640 and the disk is recognized in BIOS as 4 TB
  • The disk is labeled with a GPT partition table.
  • Filesystem on /boot is ext3 and XFS on all other partitons/LVs.
Kategorie: 
 

Comments

GRUB 2 supports multiple volume groups, so that can't be the reason it isn't working. The problem might be that your bios doesn't support disks larger than 2 TB or there is a bug in GRUB somewhere. Does the "ls" command show your raid array members and the md6 raid device? If not, then the problem is probably not in the LVM code.

Did you run grub-install from a chroot into the new installed system? If you ran it from the old system, try to either chroot into your new system and run grub-install from there or use grub-probe directly to see whether GRUB can parse the RAID/LVM metadata on your new disks. It will use the raw block devices and its own RAID/LVM code that's also used at boot time in a much nicer environment to debug things. If that also fails you could try whether the latest version from testing also fails if you're running stable. If that's the case, you should probably file a bug report with verbose log output of grub-probe attached.

The mainboard is an Asus P5P43TD PRO with latest BIOS firmware from the Asus website. The 4 TB disk is recognized as such in BIOS and the disk itself does have a GPT partition table, of course. But when I used BIOS boot menu selector (pressing F8) and select the 4 TB disk, I'm thrown back into booting the BIOS code instead the grub boot code from the disk, as I found out in the meanwhile.

I've run the grub-install from within the running (old) system

Are your new disks GPT while the old ones were msdos partitioned perhaps (so you are missing the part_gpt module)?

lvm also has different metadata versions and there have been some people having issues with odd metadata (not sure if there are fixed upstream yet let alone in sid's grub).

It might also help someone if you mention what version of grub you are using and even what filesystems are involved.

Nice you have a preview on the commenting but I couldn't figure out how to make a line or paragraph break!

I think I can remember that part_gpt is loaded, but I'm quite unsure at the moment if my memory serves me right. I'm running on Unstable/Sid and using ext3 for /boot and XFS for everything else.
Regarding the preview: yes, something seems to be broken with plain text input filter in Drupal7 stripping the line breaks.

Why swap on raid1? Set sda2, sdb2 and sdc2 as swap and let the kernel manage it (as Raid0). If one disk fails, everything will work.

Well, I know that using the disks themselves instead of RAID1 will have a speed improvement. But when one disk fails you'll risk kernel panic because of this. Anyway, having 8 GB of RAM enables me to even run without swap at all.

Pages

Add new comment

Theme by Danetsoft and Danang Probo Sayekti inspired by Maksimer