LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 05-30-2013, 01:44 PM   #1
clahti
LQ Newbie
 
Registered: May 2013
Posts: 1

Rep: Reputation: Disabled
file-based locking initialization failed after pvresize


Hello all:

I have a VMWare virtual CentOS 6 server with the following disk layout:

/dev/sda 15GB
/dev/sdb 100GB

Standard CentOS LVM setup

on sda1
/dev/vg_centos6/lv_root mounted on /
/dev/vg_centos6/lv_swap

on sdb1
/dev/vg_centos6/lv_var mounted on /var

I was starting to run low on disk space for /var, so I shut down the machine gracefully, extended the disk in VMWare to 250G and rebooted in single user mode. I then ran the following two commands:

pvresize --setphysicalvolumesize 250G /dev/sdb1
lvresize -L250G /dev/vg_centos6/lv_var

I then rebooted expecting the /var to now be 250G instead of 100G. What I got was:

No such file or directory trying to open /dev/vg_centos6/lv_var

After dropping to a maintenance shell I could not run any pv* or lv* commands, always resulting in the error:

File-based locking initialization failed

After Googling forever I found some lv* and pv* commands take --ignorelockingfailure as a parameter, so now I can "see" the pv and lv information but I do not know how to recover this partition:

pvdisplay --ignorelockingfailure /dev/sdb1
File-based locking initialization failed
--- Physical volume ---
PV Name /dev/sdb1
VG Name vg_centos6
PV Size 250 GiB / not useable 3.00 MiB
Allocatable yes
PE Size 4.00 MiB
Total PE 63999
Free PE 25599
Allocated PE 38400

lvdisplay --ignorelockingfailure /dev/vg_centos6/lv_var
File-based locking initialization failed
--- Logical volume ---
LV Path /dev/vg_centos6/lv_var
LV Name lv_var
VG Name vg_centos6
LV Write Access read/write
LV Status suspended
# open 0
LV Size 150.00 GiB
Current LE 38400
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:2

I cannot mount this, I cannot fsck, /dev/mapper/vg_centos6/lv_var does not even get created. This is a critical server, can anyone please tell me how to reverse this or at least recover the data?

Thanks!

/Christian
 
Old 07-31-2013, 04:50 PM   #2
shaker.abdo
LQ Newbie
 
Registered: Jul 2013
Posts: 1

Rep: Reputation: Disabled
file based locking

maybe its a bit late , anyhow to make a reference or to fill the KB ;

this happens when you resize your LVM partition without resizing the file system , which the command typically look like this

lvreside -L -/+MG(unit) -r(resize your file system) /dev/vg_(path to your lv) .

so basically whats happening , your system read the old(before resizing) superblock and finds out that its different than the new one
cause no file system resizing happened , once you reboot your system will ask you to run e2fsck manually without any other option
and the / fs will be mounted as ro , which is the reason why you see "file based locking .."

solution :

1-remount your / partition : mount -o remount,rw /
2-remove the file .autofsck : rm -rf /.autofsck
3-either you reverse it by adding the extracted space again or resizing the file system
A- lvextend -r -L +(reduced size) /dev/path_to_your_lv
B- resize2fs /path_to_lv

i hope this is useful and will suite you well
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
openmpi - initialization failed jkobori Programming 12 09-10-2012 02:51 PM
10Gbps NIC initialization failed austinbravo Linux - Newbie 2 05-20-2011 08:02 PM
RAMDISK driver initialization Failed rosh_linux Linux - Kernel 1 04-13-2011 02:19 PM
QT4's QGLFramebufferObject Initialization Failed shreks Linux - Software 0 12-12-2007 09:18 AM
Device eth0 initialization failed Inirah Linux - Newbie 1 04-07-2005 01:23 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:01 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration