Re: LVM and bad disk...

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

 



On Wed, Nov 26, 2008 at 07:41:24AM -0500, John Burton wrote:
> I've never used LVM under Fedora. I did use something similar under AIX  
> probably 10-15 years ago. I've been using linux for since slackware (on  
> floppies) and kernel version 0.99.4, but I've always used the old  
> standard of partitioning hard drives and creating filesystems on those  
> partitions (even terabyte raids :-). Now I'm considering using LVM for a  
> fedora 10 system I'm setting up, but have one question. Under the "old  
> way" if a disk dies, you lose the files on that disk that weren't backed  
> up, but only that disk. Under LVM, if I have a logical volume that is  
> made up of more than one physical volume, what happens if one of the  
> physical volumes goes bad? Is the logical volume toast? Do you have to  
> recreate the whole logical volume from scratch?

These are great questions, John.  If you combine multiple physical
volumes (PVs) into a volume group (VG), and as a result one of the
logical volumes (LVs) spreads physically across several PVs, the file
system on that LV could be susceptible to damage if one PV gets
damaged.  

It would be much the same as if a stretch of sectors on a single
partitioned hard disk went bad.  You could probably recover some of
the data, but it would be an unpleasant situation.  It's also much
like RAID, in that if you made a RAID-0 volume (i.e. concatenating
disks together), you actually are multiplying your risk while adding
zero redundancy -- not a good situation!

That's why people using PVs on multiple physical disks tend to combine
LVM with a RAID level that provides redundancy.  For example, I have a
server box at home on which I have three disks.

First disk -- simple partitioning, provides /boot, /usr, /, and other
things I can easily recreate if needed.

Second + third disks -- RAID-1 (mirrored), then using LVM so I can
adjust the sizes of volumes in the future as needed.  These provide
things like /home, /var, and other places where I'd want data to
survive if a disk goes bad.

Obviously that's just a simple example, and you have a better idea of
your needs because you know what data is most valuable to you.

This is *not* to say that LVM isn't useful without RAID, because
that's not the case at all.  I use LVM in my single-disk laptop so I
can adjust partition sizes on the fly if I need extra space somewhere
from time to time as I experiment.  But if you're going to do LVM
across several disks, you do want to understand the risks and rewards.

-- 
Paul W. Frields                                http://paul.frields.org/
  gpg fingerprint: 3DA6 A0AC 6D58 FEC4 0233  5906 ACDB C937 BD11 3717
  http://redhat.com/   -  -  -  -   http://pfrields.fedorapeople.org/
  irc.freenode.net: stickster @ #fedora-docs, #fedora-devel, #fredlug

Attachment: pgpScSHPVnnYr.pgp
Description: PGP signature

-- 
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines

[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux