Re: [Hampshire] LVM problems

Top Page
Author: Hugo Mills
Date:  
To: lug, Hampshire LUG Discussion List
Subject: Re: [Hampshire] LVM problems

Reply to this message
gpg: failed to create temporary file '/var/lib/lurker/.#lk0x56c9c100.hantslug.org.uk.13991': Permission denied
gpg: keyblock resource '/var/lib/lurker/pubring.gpg': Permission denied
gpg: Signature made Tue Oct 26 15:09:33 2010 BST
gpg: using DSA key 20ACB3BE515C238D
gpg: Can't check signature: No public key
On Tue, Oct 26, 2010 at 03:03:47PM +0100, Vic wrote:
>
> > Partition Table: msdos
>
> That's that theory dead, then :-)
>
> OK, here comes the next one. sda5 is reported as:
>
> >  5      257MB   125GB  125GB   logical                lvm

>
> But in the pvdisplay output, we get:
>
>   PV Name               /dev/sda5
>   VG Name               pooky_vg
>   PV Size               148.81 GiB / not usable 2.00 MiB
>   Allocatable           yes
>   PE Size               4.00 MiB
>   Total PE              38095
>   Free PE               10452
>   Allocated PE          27643
>   PV UUID               6vjc8d-5N80-0HrF-JzFb-l8o7-NcBD-bOn76g

>
> So it's trying to cram 148GB of PV onto a 125GB partition :-(


I think you've got it.

Chris: Can you show us the output of pvdisplay --maps /dev/sda5,
please?

If you're lucky, the missing bit of the PV is entirely unmapped,
and it can be shrunk to fit the partition. If not, you've probably
lost some data.

> Have you resized these partitions after creating the PVs?


It looks like it.

> My advice would be to borrow another drive, add it into the VG, then
> pvmove all your data off sda5. Recreate the PV, add it back into the VG,
> then move it all back again. sda5 looks to be unstable in its current
> state.


I think it should be possible simply to resize the PV down to the
partition size.

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
                      --- vi: The core of evil. ---