RedHat5LVM adds hard disk records

Source: Internet
Author: User
During RedHat usage, we often encounter the problem of hard disk space usage. Today, the server's hard disk space is used up to increase the hard disk space and add the existing space to the LVM. For details, see the internal document. 1. Collect related data and execute the following command: vgsVG # PV # LV # SNAttrVSizeVFre

During RedHat usage, we often encounter the problem of hard disk space usage. Today, the server's hard disk space is used up to increase the hard disk space and add the existing space to the LVM.

For details, see the internal document.

1. Collect relevant data
Run the following command:

Vgs

VG # PV # LV # SN Attr VSize VFree
VolGroup00 1 2 0 wz-n-49.88G 0

Lvs-a-o + devices

Lv vg Attr LSize Origin Snap % Move Log Copy % Convert Devices
LogVol00 VolGroup00-wi-ao 44.06G/dev/sda2 (0)
LogVol01 VolGroup00-wi-ao 5.81G/dev/sda2 (1410)

2. Basic configuration of the newly added Hard Disk
Run the following command:

Fdisk-l

Disk/dev/sdb: 53.6 GB, 53687091200 bytes
255 heads, 63 sectors/track, 6527 cylinders
Units = cylinders of 16065*512 = 8225280 byte

Fdisk/dev/sdb

Divide the hard disk into one partition. The result is as follows:

Device Boot Start End Blocks Id System
/Dev/sdb1 1 6527 52428096 83 Linux

3. LVM Configuration
Run the following command:

Vgextend VolGroup00/dev/sdb1 # Add sdb1 to VolGroup00

Lvextend-l + 100% FREE/dev/VolGroup00/LogVol00 # expand all FREE space

Resize2fs-f/dev/VolGroup00/LogVol00

4. Check
Run the following command:

Vgs

VG # PV # LV # SN Attr VSize VFree
VolGroup00 2 2 0 wz-n-99.84G 0

Lvs-a-o + devices

Lv vg Attr LSize Origin Snap % Move Log Copy % Convert Devices
LogVol00 VolGroup00-wi-ao 94.03G/dev/sda2 (0)
LogVol00 VolGroup00-wi-ao 94.03G/dev/sdb1 (0)
LogVol01 VolGroup00-wi-ao 5.81G/dev/sda2 (1410)

Df-h

Filesystem Size Used Avail Use % Mounted on
/Dev/mapper/VolGroup00-LogVol00
92G 43G 44G 50%/
/Dev/sda1 99 M 13 M 82 M 14%/boot
Tmpfs 2.0G 0 2.0G 0%/dev/shm

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.