Linux LVM Snapshots Create detailed steps (use PE complete) _unix Linux

Source: Internet
Author: User

Complete the operating system centos5.8 external 10G hard drive under the VM9 virtual machine.

1. First of all, the hard disk SDB is divided into 4 areas per district size 200M, respectively, sdb{5,6,7,8}. Four partitions will be built after PV

2. PV is then added to VG here to introduce the concept of PE .

Since VG is composed of multiple PE (blocks), the maximum number of PE per VG block is 65534. The default size of each PE is 4m

That is, the default of each VG is the maximum of 4m multiply 65534=256g, so the size of the PE block determines the size of the final VG.

Here we define the size of the PE block to be 16m. Since the size of each PV is 200m in total 800m, the total number of PV is 48.

Establish the command below Vgcreate-s 16M lvm_vg/dev/sdb{5,6,7,8}.

3. Next we use the number of PE blocks to create LV because each PV can be divided out of PE is 12 so to create a 600M need 36 PE. The command below Lvcreate-l 36-n LVM_LV LVM_VG will be established by the LV format and mounted to/MNT/LVM. Also in it established three folders AAA BBB CCC.

4. Next, we use the remaining PE in VG to create snapshots lvm_lv this volume .

As there are 12 of the remaining PE we are all used to take snapshots.

The command follows Lvcreate-l 12-s-n lvm_ss lvm_ss/dev/lvm_vg/lvm_lv The snapshot is established and we mount it under/mnt/snapshot

When we get to the directory can see the original AAA BBB CCC three directory.

The key command established by the snapshot is the Lvcreate plus-s parameter. And if you want to update the snapshot content simply uninstall it and delete the volume and then build it again.

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.