How to Create a logical volume using the logical volume manager after redhatlinux Installation

Source: Internet
Author: User
After redhatlinux is installed, you can use the logical volume manager to create a logical volume-Linux Enterprise Application-Linux server application. For details, see the following. LVM can be created during operating system installation, but sometimes it needs to be created after installation.

You can follow the steps below to create a logical volume after installation: for example, assume there are three available disk partitions:/dev/sda3,/dev/sdb1, And/dev/hda2. Create an LVM volume group named test_vg.

1. Change the partition type of the three partitions to ox8e when fdisk is used, that is, LVM partition. View pvcreate (8) (man 8 pvcreate ).

2. pvcreate/dev/sda3/dev/sdb1/dev/hda2 3.
Vgcreate test_vg/dev/sda3/dev/sdb1/dev/hda2

The logical volume can be created after the volume group test_vg is online. for example, create a MB logical volume named/dev/test_vg/lvol1 and a my_test_lv with three physical volumes of MB.

1. lvcreate-L 100 test_vg2.

Lvcreate-L 200-n my_test_lv-I 3 test_vg

Note: You can run the lvcreate-L 100 test_vg command to create a MB logical volume named/dev/test_vg/lvol1. Run the lvcreate-L 200-n my_test_lv-I 3 test_vg command to create a logical volume named my_test_lv (use-n. -The I option indicates the number of physical volumes where the strip is located. In this case, it is case 3.

Create a file system in the array. For example, create an ext2 File System in my_test_lv:

Mkfs-t ext2/dev/test_vg/my_test_lv

Run the following command to mount the LV:

Mount/dev/test_vg/my_test_lv/usr1

To create an LV in the boot program, you can add an appropriate entry to the file/etc/fstab.
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: 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.