LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 08-19-2005, 03:54 PM   #1
XaViaR
Member
 
Registered: Dec 2004
Distribution: RHEL, CentOS, SuSE
Posts: 170

Rep: Reputation: 31
Logical Volume Management 2


Hello,

I want to create a volume group with two drives, and make one big logical partition. I am wondering if one of the two drives crash...will all my data be destroyed in my volume group? Would their be anyway for me to get data off the "good" drive that did not crash?

Thanks for your help!

-xaviar

P.S.
I will be using LVM2.
 
Old 08-19-2005, 04:09 PM   #2
ctkroeker
Senior Member
 
Registered: May 2005
Posts: 1,565
Blog Entries: 1

Rep: Reputation: 50
I don't see why you would want to make 1-out-of-2... Why not just keep them seperate, as that would be more reliable then making them in to one big one. Your choice...
 
Old 08-19-2005, 04:33 PM   #3
IsaacKuo
Senior Member
 
Registered: Apr 2004
Location: Baton Rouge, Louisiana, USA
Distribution: Debian Stable
Posts: 2,546
Blog Entries: 8

Rep: Reputation: 465Reputation: 465Reputation: 465Reputation: 465Reputation: 465
I've been reading up on LVM(2) and as far as I can tell, it's pretty ugly if one of the drives fail. Any partitions which were entirely on one drive should be okay, but you may have to replace the failed hard drive and do some "stuff" before you can really do things (I'm not entirely clear on this). Any partitions which span across the failed hard drive are toast, although you might be able to recover some data (I get the impression this isn't easy or straightforward in any way).

I'm left with the impression that the only "good thing" about a multi-drive LVM volume is that it may make it easier to migrate data around if disc space is tight and/or you want to migrate "live" data transparently. LVM seems more useful with single drive volumes, when you want a lot of subpartitions.
 
Old 08-20-2005, 01:00 AM   #4
WhatsHisName
Senior Member
 
Registered: Oct 2003
Location: /earth/usa/nj (UTC-5)
Distribution: RHEL, AltimaLinux, Rocky
Posts: 1,151

Rep: Reputation: 46
XaViaR: The lvm --partial option will attempt to provide access to “damaged” volume groups where some logical volumes are unavailable/missing, such as would be the case if you had the problem you described. As always, there is no substitute for regular backups.

You can direct the creation of a logical volume to one or more partitions/physical volumes in a volume group, thus giving you the ability to keep it on a single disk when the volume group is spread across two drives. There can be read/write speed advantages if you do this selectively.

For instance, if you were using the system as an Apache server, placing the logical volume containing /var on one drive and placing the logical volume containing /usr on the other drive will probably give you a significant speed boost when compared to them sharing the same drive.

Last edited by WhatsHisName; 08-20-2005 at 01:01 AM.
 
Old 08-20-2005, 01:06 AM   #5
WhatsHisName
Senior Member
 
Registered: Oct 2003
Location: /earth/usa/nj (UTC-5)
Distribution: RHEL, AltimaLinux, Rocky
Posts: 1,151

Rep: Reputation: 46
IsaacKuo: Two selling points for LVMs are their flexibility and ease of administration. Safety isn't on the list, but can be accomplished in other ways.

Multidrive LVMs are usually implemented on top of drive redundancy (e.g., Raid5, Raid50, Raid1n, Raid10n, etc.), so drive failure is not such a big deal (unless you are the one who has to replace it). On smaller systems, regular backups are probably your best option. On a small LAN, there is nothing like having an old P-3 system set up for storing hourly/daily backups of your critical data.

Back to your comment about LVMs on smaller systems, two advantages of LVMs on small systems are (1) the ability to easily resize logical volumes to accommodate changing needs and (2) the ability to “hot” backup the system without unmounting the filesystem by using a logical volume snapshot. Both advantages are more pronounced for ext3 filesystems than for reiserfs.

In the case of two drives, I usually go more for speed than for reliability. Did you know that you can create the functionality of Raid0 without using mdadm or raidtools by “scattering” the LVM across drives? Look at the lvcreate -i and -I options. They give you the speed of a Raid0 with the functionality of a LVM. The surprising thing is that the scattered LVM seems to be slightly faster than a mdadm Raid0.

And if you decide later on that you don't want Raid0 functionality, then just create a new “linear” logical volume and move your stuff out of the scattered logical volume. Again, the word for the day about LVMs is “flexibility”.

One big disadvantage of using LVMs is that it is just something else that you have to learn about to use it effectively/efficiently. From my point of view, it is worth learning, but like most things in linux, it requires a lot of reading and some practice to get it right.

Last edited by WhatsHisName; 08-20-2005 at 01:07 AM.
 
Old 08-20-2005, 07:48 AM   #6
XaViaR
Member
 
Registered: Dec 2004
Distribution: RHEL, CentOS, SuSE
Posts: 170

Original Poster
Rep: Reputation: 31
Thanks for all your help! :-)
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Logical volume management question smoker Linux - Software 2 08-17-2005 12:50 AM
logical volume manager plythgam Linux - Software 1 11-08-2004 10:47 AM
Setting up logical volume management... [FAILED] userini Linux - Software 0 06-28-2004 12:56 PM
Logical Volume Management jatimon Linux - General 0 04-17-2002 02:57 PM
Logical Volume Groups concoran Linux - General 3 06-03-2001 06:29 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 06:34 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration