Linux logical Volumes

Source: Internet
Author: User

Logicalvolume Manager Logical Volume Manager

Ability to dynamically adjust disk capacity for increased disk management flexibility

/boot mount partition cannot be created based on LVM

You can use graphics or character terminals to manage LVM


The process of establishing LVM

PV (physicalvolume) Physical volume

Physical volumes can be converted from the entire hard drive to a separate partition

Physical volumes include many PE (physicalextent) basic units with a default size of 4MB

VG (volumegroup) Volume group

The whole of a volume group consisting of one or more physical volumes

LVM Build Process

LV (logicalvoluem) Logical Volume

part of the space taken from the volume group , file system can be established.

Raid

RAID 0

650) this.width=650; "Src=" https://s4.51cto.com/wyfs02/M01/99/F4/wKioL1lPZbyiio4wAAAjEPX5NVQ127.jpg-wh_500x0-wm_ 3-wmp_4-s_2362426170.jpg "title=" r0.jpg "alt=" Wkiol1lpzbyiio4waaajepx5nvq127.jpg-wh_50 "/>

There's that two hard drive that makes up the disk array.

Significantly improves overall read performance by spreading continuous data across multiple disk reads

RAID 1

Have a mirrored backup disk

When a disk fails, the system can automatically switch to read and write on the mirrored disk without having to reorganize the failed data.

RAID 5

Minimum three drives required

Read and write speed with R0, with R1 backup function (redundant check) Linux

The establishment of Linuxraid

Lee Build RAID5 with 3 hard drives

Mdadm-c/DEV/MD0-N3-L5/DEV/SD[BCD]

-C Create an array storage device

-N Add the number of disks

-L RAID level

View RAID Status

mdadm-d/dev/md0 Viewing UUID

Since the MD0 device file is temporarily created, it will be invalidated after rebooting the system, and the configuration file of the array needs to be established for permanent operation.

Vim/etc/mdadm.conf

Array/dev/md0 uuid=xxxxxxxxxxxxxxxxxxxxxxx

Pvcreate/dev/md0 establishing a physical volume volume group Logical Volume


Fault handling of RAID5

Mdadm--manage/dev/md0--fail/dev/sdb

--fail set the device to an error state

--remove removing the device from the array

--add adding devices into the array

Deactivate array

UMOUNT/DEV/MD0 Uninstalling the device

Vim/etc/fstab

#/dev/vg_raid/lv_raid/mnt/raid5 EXT4 defaults 00 Comment Valid content

Vim/etc/mdadm.conf

# array/dev/md0uuid=xxxxxxxxxxxxxxxxxxxxxxx Comment Valid content

Mdadm-s/dev/md0 Stop md0

Cat/proc/mdstat validation Status


Linux logical Volumes

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.