RHCE experiment: Managing LVM logical volumes

Source: Internet
Author: User
RHEL5.4 is installed in Vmware, but the allocated disk is only 7 GB at the beginning. After various services are installed, the disk space is getting tighter. After the virtual machine is adjusted to a larger space, the additional space is allocated to the LVM volume group: 1. create a pv (physicalvolume) on/dev/sda3. Before adding a physical partition to the vg, initialize: # pvcrteate/dve/sda32. add pv (p) to the vg (volumegroup ).

RHEL 5.4 is installed in Vmware, but the allocated disk is only 7 GB. After various services are installed, the disk space is getting tighter. After the virtual machine is adjusted to a larger space, the additional space is allocated to the LVM volume group:

1. Create a pv (physical volume) on/dev/sda3. initialize the pv (physical volume) before adding the physical partition to the vg:
# Pvcrteate/dve/sda3

2. Add pv (physical volume) for vg (volume group ):
# Vgextend/dev/VolGoup00/dev/sda3

3. Add space for lv (logical volume)
# Lvextend-L + 7G/dev/VolGroup00/LogVol00
Note: before adding space for the lv, you must first adjust the vg size, that is, you must first increase the pv to the vg.

4. Adjust the ext3 partition size. The RHEL kernel supports extonline adjustment without uninstalling:
# Resize2fs/dev/VolGroup00/LogVol00
NOTE: For the/directory mounted to/dev/VolGroup00/LogVol00, to adjust the size of other directories, you only need to adjust the corresponding lv when executing lvextend.

5. view the current system partition size
[Roy @ rhel5 ~] $ Df-ah
File System capacity used available % mount point
/Dev/mapper/VolGroup00-LogVol00
13 Gb 4.4G 7.6G 37%/
Proc 0 0 0-/proc
Sysfs 0 0 0-/sys
Devpts 0 0 0-/dev/pts
/Dev/sda1 99 M 12 M 82 M 13%/boot
Tmpfs 506 M 0 506 M 0%/dev/shm
None 0 0 0-/proc/sys/fs/binfmt_misc
Sunrpc 0 0 0-/var/lib/nfs/rpc_pipefs

 

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.