Re: [Hampshire] lvm nightmare

Top Page
Author: Hugo Mills
Date:  
To: Hampshire LUG Discussion List
Subject: Re: [Hampshire] lvm nightmare

Reply to this message
gpg: failed to create temporary file '/var/lib/lurker/.#lk0x58036100.hantslug.org.uk.18102': Permission denied
gpg: keyblock resource '/var/lib/lurker/pubring.gpg': Permission denied
gpg: Signature made Thu Jul 8 00:19:50 2010 BST
gpg: using DSA key 20ACB3BE515C238D
gpg: Can't check signature: No public key
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.

> 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 ;) ).

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.

>  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.

Hugo.

-- 
=== Hugo Mills: hugo@... carfax.org.uk | darksatanic.net | lug.org.uk ===
  PGP key: 515C238D from wwwkeys.eu.pgp.net or http://www.carfax.org.uk
                       --- Strive for apathy! ---