From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <51A8C4EC.1010706@redhat.com> Date: Fri, 31 May 2013 17:42:36 +0200 From: Zdenek Kabelac MIME-Version: 1.0 References: <51A7BE6D.3090609@gmail.com> <1369952053.99499.YahooMailClassic@web181504.mail.ne1.yahoo.com> In-Reply-To: Content-Transfer-Encoding: 7bit Subject: Re: [linux-lvm] Fwd: file-based locking initialization failed after pvresize Reply-To: LVM general discussion and development List-Id: LVM general discussion and development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , List-Id: Content-Type: text/plain; charset="us-ascii"; format="flowed" To: LVM general discussion and development Dne 31.5.2013 11:04, Gabriel Barazer napsal(a): > 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) For couple years lvresize has the option '-r' so it knows how to resize common filesystems (via fsadm script) - so it keeps the right order of commands (very important in case you are reducing size) Zdenek