DistributedNetworks DistributedNetworks


Data Loss Prevention   «Prev  Next»
Lesson 10 Hardware vs. software RAID
Objective Compare and contrast hardware and software RAID.

Hardware versus Software RAID

You can implement RAID in either hardware or software.

Hardware RAID

Hardware RAID requires special disk arrays and controllers and thus is more expensive, but it's the simplest to implement from the OS standpoint because the kernel views the hardware RAID as a single SCSI device. Setup for the hardware RAID involves making sure the kernel has the proper driver for the RAID SCSI controller. This is basically the same setup as is required for any new SCSI controller that is added to the system.
The hardware RAID controller improves processing performance by carrying out some of the RAID handling calculations and reducing the load on the CPU.

Software RAID

Software RAID can be used with any disks. Red Hat Linux supports software RAID at install time and post-installation. With increasing CPU-processing speeds, software RAID performance can exceed hardware RAID.
For more information about software RAID and about hot-swapping SCSI devices, see the Resources page.
The next lesson concludes this module.

Question: One Logical Volume named lv1 is created under vg0. The initial aize of that logical volume is 100MB. Now you are required to increase the size to 500MB. You are required to make the size of that logical volume 500M without losing any data. In addition, you are required to increase the size online.
Answer and Explanation:
The LVM system organizes hard disks into Logical Volume (LV) groups. Essentially, physical hard disk partitions (or possibly RAID arrays) are set up in a bunch of equal sized chunks known as Physical Extents (PE). As there are several other concepts associated with the LVM system, let's start with some basic definitions:
  1. Physical Volume (PV) is the standard partition that you add to the LVM mix. Normally, a physical volume is a standard primary or logical partition. It can also be a RAID array.
  2. Physical Extent (PE) is a chunk of disk space. Every PV is divided into a number of equal sized PEs. Every PE in a LV group is the same size. Different LV groups can have different sized PEs.
  3. Logical Extent (LE) is also a chunk of disk space. Every LE is mapped to a specific PE.
  4. Logical Volume (LV) is composed of a group of LEs. You can mount a filesystem such as /home and /var on an LV.
  5. Volume Group (VG) is composed of a group of LVs. It is the organizational group for LVM. Most of the commands that you'll use apply to a specific VG.
  1. Verify the size of Logical Volume: lvdisplay /dev/vg0/lv1
  2. Verify the Size on mounted directory: df –h or df –h mounted directory name
  3. Use : lvextend –L+400M /dev/vg0/lv1
  4. resize2fs /dev/vg0/lv1 to bring extended size online.
  5. Again Verify using lvdisplay and df –h command.