Linux system PV VG Lv__linux

Source: Internet
Author: User
Tags mkdir

I. Establishment of LVM

1. Generate PV Information



2. #mkdir/dev/vg02

3. #vgcreate/dev/vg02/dev/dsk/c0t3d0/dev/dsk/c0t4d0

Description: The meaning of this command is to create VG02, and c0t3d0 and c0t4d0 these two hard drives, of course, you can also include a hard disk, the next time you need to expand the second hard disk, the operation is as follows:


#vgextend/dev/vg02/dev/dsk/c0t4d0 (This command is to extend the second hard drive to VG02)

4.lvcreate-l N my_lvol1 vg02

The name of the logical volume is defined with the n parameter. If we don't use the-l parameter to specify the size of the logical volume, the default size is 0M, which sometimes brings convenience to our work, such as when doing mirror, first specify the size of the logical volume of 0, so that the speed of synchronization will be very fast, synchronized later to expand the logical volume.

5.newfs-f Vxfs-o Largefiles/dev/vg02/rlvol1

Note: the-f parameter specifies the file system type, where the VxFS file system is what we often say the Jfs file system, O used to specify the file system to support large format files, that is, supporting a single file greater than 2G file system, otherwise, in the future with the file-especially the database file-the increase There is a good chance of problems. Also, if the database files are in bare files, do not do this step.


7. Mount/dev/vg02/lvol1/vg02_lvol1

Second, extended file system

1. #lvextend-L 200/dev/vg02/lvol1

2. #umount/dev/vg02/lvol1

3. #extendfs-F Vxfs/dev/vg01/lvol2

Related Article

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: 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.