[Gllug] Which path is easier, Transfer swapout or swapout transfer?

Kostas Georgiou k.georgiou at imperial.ac.uk
Tue Aug 19 13:50:09 UTC 2008


On Tue, Aug 19, 2008 at 12:02:45AM +0100, Nix wrote:

> On 18 Aug 2008, Justin Perreault outgrape:
> > Unfortunately this is where I got stuck. There is an LV that spans the
> > two drives. With one of the drives not connected the system refused to
> > run LVM and related commands. I suspect due to LVM not being able to see
> > what it expected.
> 
> This is why it's generally considered unwise to have VGs that span PVs
> that are likely to fail independently (so it's fine to have a VG
> spanning multiple RAID-6 arrays, say, because they don't fail much, but
> having it span multiple ordinary disks is risky).
> 
> > I am now exploring how to reduce a LV so that it resides wholly on the
> > old 1TB drive.
> 
> If the LV is actually spanning both drives and has any significant data on
> the failed drive, you're likely out of luck :(
> 
> Firstly, there isn't a command-line tool that will do this: vgreduce
> will vape the missing disk out of the VG, but will remove any LVs
> partially on that PV. So you're reduced to editing the metadata by hand.
> Fortunately this is easy as it's all textual :)

If you have enough (free) space in the vg on the 1TB disk you can just
do a pvmove -v /dev/sdaX to move all logical volumes out of /dev/sdaX.
It will work in a live system so you don't need any downtime either.

Kostas
-- 
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug




More information about the GLLUG mailing list