Online logical volume expansion in RHEL5

Source: Internet
Author: User
In earlier versions of RHEL4, The ext2online command was used to expand the logical volume online. In RHEL5, The ext2online command has been replaced by resize2fs. The following describes how to expand the logical volume online in RHEL5: 1. In this example, we use LVM. The first step is to assume that we have 5g air separation zone, in addition, the device Number of the partition is/dev/hdc32, and we create a 2 GB logical volume on this device # pvcreate/dev/

In earlier versions of RHEL4, The ext2online command was used to expand the logical volume online. In RHEL5, The ext2online command has been replaced by resize2fs. The following describes how to expand the logical volume online in RHEL5:

1 in this example, we use LVM. The first step is to assume that we have a 5g air separation zone and the device number of this partition is/dev/hdc3.

2. Create a 2 GB logical volume on the device.

# Pvcreate/dev/hdc3

# Vgcreate vg0/dev/hdc3

# Lvcreate-L 2G-n lv0 vg0

# Mkfs. ext3/dev/vg0/lv0

# Mkdir/mnt/test

# Mount/dev/vg0/lv0/mnt/test

3. After completing the preceding steps, run df-h to view the new partition information.

4. Now we can see that we have 2 GB of free partitions, and we still have 3 GB of free space on vg0. Next we will add 2 GB space to lv0.

# Lvextend-L + 2G/dev/vg0/lv0

5. Run the df-h command to check whether/mnt/test displays 2 GB of data. In order to expand the data to 4 GB online, run

# Resize2fs/dev/vg0/lv0

After 6,/mnt/test will be expanded to 4 GB.

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.