Skip to contentSkip to conversation

grub and lvm

linux-lvm rich turner 4 participants 7 messages Jun 6, 2005 – Jun 7, 2005

lore
Share & tools
lore
#0 lore raw

i have a volume group built on a physical volume that is the disk /dev/hdb. when i write the grub bootloader to that disk, it appears that the bootloader overwrites part or all of the lvm data on that disk, essentially wiping out my volume group. does anyone know if that is normal or if lvm and grub indeed share the same place on the disk?

#1 lore raw

an additional question, does lvm write anything into the mbr when a disk is used as a physical volume, as opposed to a partition?

Quoted 11 lines · rich turner

i have a volume group built on a physical volume that is the disk /dev/hdb. when i write the grub bootloader to that disk, it appears that the bootloader overwrites part or all of the lvm data on that disk, essentially wiping out my volume group. does anyone know if that is normal or if lvm and grub indeed share the same place on the disk?

_______________________________________________
linux-lvm mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/

#2 lore raw
In reply to rich turner

You may want to create a Linux LVM partition, and using that in lvm (pvcreate /dev/hdb1)...

Quoted 13 lines · rich turner

i have a volume group built on a physical volume that is the disk /dev/hdb. when i write the grub bootloader to that disk, it appears that the bootloader overwrites part or all of the lvm data on that disk, essentially wiping out my volume group. does anyone know if that is normal or if lvm and grub indeed share the same place on the disk?

_______________________________________________
linux-lvm mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/

Signature · 2 lines
----------------------------------------------------------------------
Alan W. Jurgensen - Berbee Information Networks - [email protected] 
#3 lore raw

using a partition works fine. but i am trying to understand why i can't write my grub bootloader to a disk that is being used as a physical volume. is grub and lvm using the same part of the disk for its own use?

Quoted 20 lines · Alan Jurgensen

You may want to create a Linux LVM partition, and using that in lvm (pvcreate /dev/hdb1)...

Quoted 13 lines · rich turner

i have a volume group built on a physical volume that is the disk /dev/hdb. when i write the grub bootloader to that disk, it appears that the bootloader overwrites part or all of the lvm data on that disk, essentially wiping out my volume group. does anyone know if that is normal or if lvm and grub indeed share the same place on the disk?

_______________________________________________
linux-lvm mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/

#4 lore raw

for what it is worth ...

i have found that you can only write the grub boot loader to a disk that is partitioned. perhaps something they will fix in grub2.

Quoted 32 lines · rich turner

using a partition works fine. but i am trying to understand why i can't write my grub bootloader to a disk that is being used as a physical volume. is grub and lvm using the same part of the disk for its own use?

Quoted 4 lines · Alan Jurgensen

You may want to create a Linux LVM partition, and using that in lvm (pvcreate /dev/hdb1)...

Quoted 16 lines
Quoted 13 lines · rich turner

i have a volume group built on a physical volume that is the disk /dev/hdb. when i write the grub bootloader to that disk, it appears that the bootloader overwrites part or all of the lvm data on that disk, essentially wiping out my volume group. does anyone know if that is normal or if lvm and grub indeed share the same place on the disk?

_______________________________________________
linux-lvm mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/

_______________________________________________
linux-lvm mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/

#5 lore raw
In reply to rich turner

Just a guess, but maybe what you're seeing is grub's inability to read LVM partitions?

ISTR that grub has built-in knowledge of common linux filesystems, which is why you don't have to rerun grub like you do with lilo - because ISTR that lilo is saving a list of blocks to read somewhere for boot time, so that it won't need filesystem knowledge.

But I wouldn't be surprised a bit of an ext3 over LVM2 isn't represented on-disk differently from just ext3, which might mean that grub would need LVM2 knowledge.

Just a totally-wild-guess. HTH.

Quoted 33 lines · rich turner

using a partition works fine. but i am trying to understand why i can't write my grub bootloader to a disk that is being used as a physical volume. is grub and lvm using the same part of the disk for its own use?

Quoted 4 lines · Alan Jurgensen

You may want to create a Linux LVM partition, and using that in lvm (pvcreate /dev/hdb1)...

Quoted 16 lines
Quoted 13 lines · rich turner

i have a volume group built on a physical volume that is the disk /dev/hdb. when i write the grub bootloader to that disk, it appears that the bootloader overwrites part or all of the lvm data on that disk, essentially wiping out my volume group. does anyone know if that is normal or if lvm and grub indeed share the same place on the disk?

_______________________________________________
linux-lvm mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/

_______________________________________________
linux-lvm mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/

#6 lore raw
In reply to rich turner
Quoted 3 lines · rich turner

using a partition works fine. but i am trying to understand why i can't write my grub bootloader to a disk that is being used as a physical volume. is grub and lvm using the same part of the disk for its own use?

Yes. Grub uses the same sectors as are used by the partition table. So, even if this 'limitation' were removed, you wouldn't get even one sector of extra space.

Have fun (if at all possible),

Signature · 3 lines
The best we can hope for concerning the people at large is that they
be properly armed.  -- Alexander Hamilton
-- Eric Hopper ([email protected]  http://www.omnifarious.org/~hopper) --