LVM problem

Mark Komarinski mkomarinski at wayga.org
Fri Dec 14 13:07:51 EST 2007


On 12/14/2007 12:23 PM, Dan Coutu wrote:
> Ben Scott wrote:
>   
>> On Dec 14, 2007 10:45 AM, Dan Coutu <coutu at snowy-owl.com> wrote:
>>   
>>     
>>> Do a pvcreate /dev/sdb and it reports that all
>>> is well. mkfs on /dev/sdb also goes well.
>>>     
>>>       
>>   Did you do those in that order?  If so, you've likely overwritten
>> the PV header (written by pvcreate) with a filesystem header (written
>> by mkfs).
>>
>>   The order of operations is:
>>
>> 1. Add physical drive(s) to system
>> 2. pvcreate on the device nodes for the new drive(s), to create PVs
>> 3. vgextend to add the PVs to the VG
>> 4. lvextend to add the new space to the LV
>> 5. ext2online (or whatever) to expand the filesystem to use the space in the LV
>>
>>   I think you'll have to write a new PV header with pvcreate again.
>>   
>>     
> Yes, I did them in that order. The reason that I did the mkfs when I did 
> was because, and I forgot to mention this,
> when I did the vgextend it said:
>
> # vgextend VolGroup00 /dev/sdb
>   /dev/cdrom: open failed: No medium found
>   Volume group "VolGroup00" successfully extended
>   
Probably doing a check of the various mountable filesystems?  You could 
check that /dev/sdb was added with pvdisplay.
> cdrom open failed? Huh? This really threw me off. The /dev/cdrom device 
> is a symlink to /dev/hda so where did that come from?
>
> I've tried a new pvcreate but can't get rid of the uuid error message 
> and cannot do any vg* commands at all because of it.
>   
If you did a mkfs of /dev/sdb after the pvcreate, then you've blown away 
the LVM metadata on /dev/sdb and thus messed up that volume group.  LVM 
still thinks that /dev/sdb is part of the volume group.

I'm not sure how to fix this, but if you're using RHEL, contact Red Hat 
support and they may be able to help you.

-Mark



More information about the gnhlug-discuss mailing list