[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: (solved)Re: Can I resize partition?



Hi,

On Mon, Nov 12, 2007 at 02:43:25PM +0800, H.H. Ding wrote:
> Will I lost all my data if one of my physical partitions in LV failed?

The short answer you are probably loking for is "Yes, maybe.  At
least some.  This isn't what LVM is for.  Use RAID."  The longer
answer is:

LVs don't have physical partitions, volume groups (VGs) do.  If
physical volume (partition) fails then you will not be able to
activate the VG that it is part of (which may contain many LVs, some
or all or which have data on the failed PV).

At this point you have a few nasty options.  You could run "vgreduce
--removemissing" which will delete any LV that has any data on the
failed PV.  That would allow you to activate the VG again so that
the LVs that did not have any data on the failed PV would work
again.

Alternatively you could do some tricks with replacing a failed PV
with a null device that never stores or returns any data.  This may
allow you to ring up the VG and its LVs and get a copy of data with
holes in where the failed PV was.

The idea is to not ever get into the position of having a VG with
failed PVs.  LVM is not for redundancy, it is purely volume
management.  You should use redundant block devices underneath LVM
for that, such as software RAID (MD).  A failed MD component device
is not exposed to LVM at all.

Cheers,
Andy

-- 
http://bitfolk.com/ -- No-nonsense VPS hosting
Encrypted mail welcome - keyid 0x604DE5DB

Attachment: signature.asc
Description: Digital signature


Reply to: