Linux root partition extensions

Source: Internet
Author: User

Linux Root partition expansion

Today's web site upload pictures problems, at first thought it was a program problem, and then found that the original server storage space is not enough, obviously there is 200G of disk space, no reason to use up so quickly, check the partition situation, originally there are two disk, the root partition only mounted on the large and small only 10g disk above, And it's already used 100%! The root partition will then be expanded: (Environment: Redhat 5.2 x64)

1: View partition status

Shell>fdisk-l

DISK/DEV/SDA doesn ' t contain a valid partition table, this sentence indicates that the 190g disk is not partitioned

2: Disk Partitioning

SHELL>FDISK/DEV/SDA (process slightly, only one partition was built here)

3: Another look at the partition

Shell>fdisk-l

You can see that the 2nd step has already built a partition/dev/sda1

4: Create PV

Shell>pvcreate/dev/sda1

5: Check the current volume group situation

Shell>vgdisplay

Here free pe/size 0/0 indicates no available expansion space

6: Extended Volume Group VolGroup00

Shell>vgextend/dev/volgroup00/dev/sda1

7: View the volume group again

Shell>vgdispaly

See free pe/size 5692/177.88GB Description Extension successful, 177.88GB available

8: Expand the capacity of the logical volume LogVol00 (mount point of the root directory "/")

Shell>lvextend-l +1024m/dev/volgroup00/logvol00

Shell>/sbin/resize2fs/dev/volgroup00/logvol00

9: After the expansion of the partition situation

The root partition more than a G, success!

Linux root partition extensions

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.