Anaconda issues with LVM when using an entire disk as a LVM physical partition

Adam Gibson static at xstatica.com
Mon Apr 3 19:04:00 UTC 2006


Peter Jones wrote:
> On Sat, 2006-04-01 at 13:13 -0500, Adam Gibson wrote:
>> I created a second disk /dev/hdb as an LVM partition manually in FC4. 
>> There are no partitions like /dev/hdb0, etc.  /dev/hdb is the partition.
> 
> You shouldn't do that.  Instead, create a partition of type 0x8e, and
> make the PV on that.
> 
>> When Anaconda first starts up it says that the disk is not initialized 
>> and asks if you want to initialize it(which would have hosed my LVM on 
>> that disk).
>>
>> As long as you answer no to the initialization when you get to disk 
>> druid, it does show the LVM partition but you can not do anything with it.
>>
>> I am ok that it can not edit it because it does not expect the entire 
>> disk to be a partition, but the scary part was when it said the disk was 
>> uninitialized and asked to initialize it.  Someone might accidentally 
>> say yes to that not realizing that it is already initialized in a sense 
>> that the entire disk is an LVM partition.
> 
> The disk doesn't have a partition table, and detecting LVM metadata
> correctly is not simple.
> 
> There's no good way for anaconda to handle this until somebody writes a
> real library to deal with LVM metadata, rather than trying to call out
> to to the executable for everything.

So it won't be easily fixable then.

  Even then, creating a PV on a
> non-partitioned drive is the wrong approach.
> 

Is this documented somewhere about using an entire disk (without 
partitions) is the wrong approach?  The information I used which 
prompted me to go this route is from the main how-to on how to 
initialize a disk for use with LVM at TLDP.org.  Why worry about 
partitions when you know that the disk will be 100% used for a single 
LVM PV.

http://www.tldp.org/HOWTO/LVM-HOWTO/initdisks.html

The how-to is even pointed to from the redhat site at 
http://sources.redhat.com/dm/ .

"11.1. Initializing disks or disk partitions

Before you can use a disk or disk partition as a physical volume you 
will have to initialize it:

For entire disks:

    *

       Run pvcreate on the disk:

       # pvcreate /dev/hdb


       This creates a volume group descriptor at the start of disk.
     *

"

Not a big deal... I am aware of it but others might not be that follow 
the how-to.




More information about the fedora-test-list mailing list