Re: [Hampshire] lvm nightmare

Top Page

Reply to this message
Author: Jacqui Caren-home
Date:  
To: Hampshire LUG Discussion List
Subject: Re: [Hampshire] lvm nightmare
Hugo Mills wrote:
> On Thu, Jul 08, 2010 at 12:08:24AM +0100, Jacqui Caren-home wrote:
>> OK I freely admit I did not RTFM.
>
>> Anyway on reboot the machine hangs as fsync on the above
>> fails saying that the superblock says 179994624 blocks
>> but the physical size is 121102336 blocks.
>
>    I hope you mean fsck, not fsync.


Yes - its been a *really* long day :-(

>> I tried a couple of rescue CD's but non of these could see
>> the PV data as non of these have the LVM installed.
>
>    You could use a Debian/Ubuntu install CD, both of which have fairly
> full-featured rescue environments.

>
>> So the question is
>>
>> 1) is there a way to recover from my stupidity without wiping the PV/LV
>
>    If you didn't expand the filesystem into the enlarged LV, then you
> should be able to recover the original state without data loss by
> restoring from one of the backups, which are normally in
> /etc/lvm/backup or /etc/lvm/archive. The tool to do the restore is
> vgcfgrestore (do RTFM first ;) ).


RTFM'd and tried this but get locking problems.

IIRC the message is

"Locking type -1 initialisation failed..."

I assume this is because the / fs is read only...

>    Even if you did expand the filesystem into the enlarged LV, you'll
> need to fsck the filesystem, but you'll only lose the data that was
> written to the (now-missing) extra disk, which is presumably a small
> part of the total.


Thanks!

>>  2) if not can I mount the Lv within a live rescue disk so that I can
>>     pull off my data before re-installing?

>
>    You need to make the LVM config sane first. This is generally
> through recovering the old config.


makes sense.

>    Hugo.