[linux-lvm] Fwd: file-based locking initialization failed after pvresize

Gabriel Barazer gabriel at oxeva.fr
Fri May 31 09:04:10 UTC 2013


Hi,

Did you try booting off another system (e.g. live usb ) and restoring the LVM meta data ? If your root filesystem is still bootable, you can find a backup of the LVM metadata in /etc/lvm/backup, and then start over your data resizing procedure. Look for the vgcfgrestore command.

The right procedure to resize a LV after growing a PV is :
- adjust the partition table on sdb with fdisk, the simple way is deleting the partition table and creating a new one with the main partition having the same start offset (_very_ important)
- THEN pvresize the device (no need to add any --setphysicalwhatever argument)
- then lvresize, but if you want to be safe always check that the size you set is larger than the current volume size otherwise you can damage your data pretty bad. A good way to do this is to add a "+" in the lvresize command : lvresize -L +100G /device adds 100G to volume.
- then run a filesystem resize command, depending on the filesystem used (xfs_growfs for XFS, resize2fs for ext4)

Anyway, If you are going to use full disks with LVM, it's always easier to not even bother creating a partition table : use the whole device with LVM (/dev/sdX) instead of a partition (/dev/sdX1).

HTH,

Gabriel


On May 31, 2013, at 5:37 AM, Christian Lahti <clahti at gmail.com> wrote:

> Sorry forgot to copy the list.
> 
> ---------- Forwarded message ----------
> From: Christian Lahti <clahti at gmail.com>
> Date: Thu, May 30, 2013 at 8:36 PM
> Subject: Re: [linux-lvm] file-based locking initialization failed after pvresize
> To: matthew patton <pattonme at yahoo.com>
> 
> 
> Thank you for your reply, I realize that I must have done something rather bone-headed and I am usually pretty clued.  That being said I am still in the same pickle I was in to begin with, something constructive would be fantastically appreciated.  If there were proper documentation *anywhere* google-able I would not have bothered the mailing list.  I am pretty sure the data must be in tact since this was done in single user mode and no writes to the disk/volume have occurred since the two commands were run, I have /etc/lvm in tact with information prior to and after the event.  If someone would be so kind as to please let me know exactly what information they might need, I will do my level best with minimum "back and forth" to provide such information to get out of said pickle.  And I furthermore promise not to do it again.
> 
> /Christian
> 
> 
> 
> On Thu, May 30, 2013 at 3:14 PM, matthew patton <pattonme at yahoo.com> wrote:
> What's with people and "extending" disks? DO NOT DO THAT!!!! But if you do, then you can't forget to do all the rest of the necessary steps. You have to fix the partition table. And you have to make sure your PVresize doesn't run off the end of the media. Is VMware's 250G really 250G when probed by PVscan? Doubt it very much.
> 
> Next time don't partition disks for starters. And "grow" filesystems by ADDing disks and adding them to the volume group and then resize2fs. Just because Windows was written for dummies and lets you get away with what you did, doesn't mean you should attempt it in Linux if you don't know what you're doing.
> 
> 
> _______________________________________________
> linux-lvm mailing list
> linux-lvm at redhat.com
> https://www.redhat.com/mailman/listinfo/linux-lvm
> read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/linux-lvm/attachments/20130531/edfe43b8/attachment.htm>


More information about the linux-lvm mailing list