LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   difference between hardware raid and logical volume manager (https://www.linuxquestions.org/questions/linux-general-1/difference-between-hardware-raid-and-logical-volume-manager-268311/)

pve 12-20-2004 03:11 AM

difference between hardware raid and logical volume manager
 
I am not able to understand the difference between the hardware raid and the logical volume manager. Both of their functions appear similar. Are they replacement for each other or they both can exist on a system to configure the disks. Please suggest me any site which explains the differences in detail.

XavierP 12-20-2004 04:18 AM

Moved: This thread is more suitable in Linux-General and has been moved accordingly to help your thread/question get the exposure it deserves.

trickykid 12-20-2004 08:00 AM

Okay, this is easy.

RAID is "Redundant Array of Independent Disks". Think of it in simplest terms, with say RAID and if you have RAID1 setup with two disks, they basically mirror one another.

Disk 1 has 5 partitions and Disk 2 has the same setup.. If Disk 1 has a partition failure on say hda2, Disk 2 will pick up and take over..

Its redundant array of disks for better reliability. In more simply terms, both of those disks will mirror one another, so the data is in two locations instead of just one.

LVM on the other hand is a way to spread data or partitions across multiple disks or partitions, etc. Say you have two hard drives, each 80GB, you could with LVM make it look and act like one big disk, instead of having two disks.

MasterC 12-21-2004 01:40 AM

So could you use RAID to perform the function of LVM?

Cool

me23askdf 12-23-2004 08:03 PM

RAID is designed for system reliability. Other than RAID0 which is used to make multiple disks appear as one big one, all RAID levels ensure that loss of a disk will not lead to data loss or system crash.

LVM is RAID0 in that you put together multiple disks into one or more volume groups. Then within each volume group you create logical volumes where you build your filesystems. The real power of LVM is that if you have unallocated space in your volume group, then you can unmount a logical volume, extend it in size, extend the filesystem, and then remount the logical volume. In the event, that you don't have free space in the volume group, you can add more disks to your system, use them to extend the volume group's size, and then extend the logical volumes. If you don't use LVM and you need a filesystem to be bigger, then your only choice is to unmount the filesystem, back it up to tape, resize the partition, and then restore. Depending on the sizes this could take quite awhile.

LVM and RAID solve two different problems, and should be used to provide maximum reliability and maximum flexibility.

trickykid 12-23-2004 08:44 PM

Quote:

Originally posted by MasterC
So could you use RAID to perform the function of LVM?

Cool

Why not use them together? ;)

RAID isn't designed to extend partitions or drives across multiple disks to be used as one big drive.. like mentioned above by me23askdf, RAID is for reliability and used in case of data corruption or catastrophe. One disk dies or partition, the other mirrored one picks up the duties until the other is either fixed or replaced.

LVM, well, you setup LVM across multiple disks and say the second disk fails.. there's a good chance the data on it is gone if no RAID or backups were made.

me23askdf 12-28-2004 10:37 PM

Well, I do use them both.

Also, there is RAID level 0 (what I called RAID0). That is either concatenating multiple disks into one big "disk" or else striping across mutliple disks, again making for one bigger "disk". You don't get any redundancy though, but for example, striping could be used to try to get a little bit more I/O performance. Finally, RAID doesn't really protect you from data corruption. If you overwrite a file, or remove it, or if there is some other problem, then corruption will occur with or without RAID.


All times are GMT -5. The time now is 08:51 AM.