LVM Logical Volume Management-Soft RAID disk array

Source: Internet
Author: User

LVM Logical Volume Management
Soft RAID disk array management
#################################################

First, LVM logical volume management

1. Basic Concepts
Logical Volume Manager
* * Multiple physical partitions/disk ==> are combined into a single ==> logical storage unit, i.e. logical volume
* * The size of the logical partition can be enlarged and scaled down as needed
*/boot is used to store boot files and cannot use LVM logical volumes (the kernel will not be found at startup)

PV (physical Volume, physical volume):
Physical partition, or entire physical disk
"PE default 4MB" consisting of PE (physical Extent, basic unit)
VG (Volume Group, Volume group)
Logical whole of one or more physical volumes
LV (Logical Volume, logical volume)
A piece of logical storage space that is split from a volume group
Formatted to create file system

2. LVM Management Tools Overview
Manage physical volumes: Pvscan, Pvcreate, Pvdisplay, Pvremove
Manage volume groups: Vgscan, Vgcreate, Vgdisplay, Vgremove, Vgextend, Vgreduce
Manage logical volumes: Lvscan, Lvcreate, Lvdisplay, Lvremove, Lvextend, Lvreduce

Graphical management tools: SYSTEM-CONFIG-LVM


3. Basic use Process
1) Create a physical volume
Fdisk partition ... "type 8e"
Partprobe disk Device "Update partition Table"
Pvcreate Device Name
2) integration into volume group
Vgcreate Volume group name physical volume ...
Or
Vgcreate-s PE Size Volume group name physical volume ...
3) Dividing logical volumes
Lvcreate-l size-N Logical Volume name volume group name
Lvcreate-l PE number-N Logical Volume name volume group name

* * L disk Capacity (MB, GB, TB)
* * Built logical volume devices are located in:/dev/Volume Group name/Logical volume name

4) MKFS format--Mount Mount

4. Expansion of logical volumes
If you have insufficient volume group space, you need to expand the volume group first:
Vgextend existing Volume group name the physical volume to be added ...

To extend an existing logical volume:
Lvextend-l + size/dev/Volume group name/Logical volume name
Or
Lvextend-l +pe number/dev/Volume group name/Logical volume name

Identify adjusted logical volume capacity
resize2fs/dev/Volume group name/Logical volume name
DF-HT mount point

Second, soft RAID disk array management

1. Introduction to RAID technology
Inexpensive redundant disk array, redundant Arrays of inexpensive Disks
Consolidate multiple small/low-speed disks into one large disk, providing hardware fault tolerance and improved I/O performance

2. Common RAID Array levels

RAID0, stripe mode:
Read and write multiple disks in parallel (minimum 2 blocks required) to improve read and write efficiency
No redundancy, disk utilization 100%

RAID1, mirroring mode
Read and write multiple disks in parallel (minimum 2 blocks), half of which are used for backup to improve reading efficiency
One-fold redundancy, disk utilization 50%

RAID10, stripe + mirror mode
Features of fusion RAID0+RAID1 (minimum 4 disks required) for improved read and write efficiency
One-fold redundancy, disk utilization 50%

RAID5, cost-effective array
Compromise with raid 0 and RAID 1 (minimum 3 disks required)
Check disk: Provides capacity of 1 member disk to store calibration information for recovering data and improving reliability
Redundant disks: Additional one or more redundant disks can be prepared to enable automatic replacement when member disks fail (hot backup)
Redundant space = Check disk + redundant disk
Maximum Disk utilization = (N-1)/n

3. How RAID arrays are implemented
Hard raid: Managed array by raid control card
Motherboard----array------disk----data
Soft raid: The array is managed by the operating system
Motherboard-to-disk-operating system-->raid software-Data

LVM Logical Volume Management-Soft RAID disk array

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.