For Linux extended disk space under VMware (for example, CentOS6.3), go to

Source: Internet
Author: User

#查看挂载点:
Df-h
#显示:
File system capacity has been used with available percent mount points
/dev/mapper/vg_dc01-lv_root
47G 12G 34G 25%/
Tmpfs 504M 88K 504M 1%/DEV/SHM
/DEV/SDA1 485M 31M 429M 7%/boot

One, extend VMware hard disk space
Turn off VMware's Linux system so that it can be set in the VMware menu:
VM---Settings, Hardware, Hard Disk, Utilities, Expand
Enter how many grams you want to expand to. This article assumes that you have added a new 30G
Second, the newly added hard disk partition, format
Here is a very simplified introduction, very simplified, but very comprehensive, above already known to increase the space of the hard disk is/DEV/SDA.
Partition:
FDISK/DEV/SDA Operation/DEV/SDA Partition table
P View the number of partitions (I see two/dev/sda1/dev/sda2)
n Add a new partition
P Partition Type we select Primary partition
Select 3 for the area code (because it has already been used, see above)
Enter default (Start sector)
Enter default (end sector)
T modify the partition type
Select Partition 3
8e modified to LVM (8e is LVM)
W Write partition Table
Q Complete, exit the FDISK command
The system prompts you to reboot, reboot, Dick Silk.
After booting, format:
Mkfs.ext3/dev/sda3
Iii. adding new LVM to existing LVM groups for capacity expansion
LVM into LVM Management
Lvm> Pvcreate/dev/sda3 This is the initialization of the partition just now, must be
Lvm> Vgextend Vg_dc01/dev/sda3 joins the initialized partition to the virtual volume Group VG_DC01
Lvm>lvextend-l +29.9g/dev/vg_dc01/lv_root expands the capacity of existing volumes (29.9G this number is explained later)
Lvm>pvdisplay view volume capacity, you will see a large volume
Lvm>quit exit
How did the 29.9G come from above? Because you have added 30G to VMware, but these spaces are not fully used by LVM, you can use one of the above lvextend operations, such as 29.9G, 29.8G ... Until no error, so that you can fully use the new increase in hard disk space, of course, this is because I do not understand the stupid way to use, the master smiled on it. (I do not understand Ah, the original author, I directly on the 29.9G, the result is OK)
The above is only the volume expansion, the following is the real expansion of the file system, enter the following command:
Resize2fs/dev/vg_dc01/lv_root
Now, Dick Silk, run again: df-h
Check out our machine's sexy hard drive.

For Linux extended disk space under VMware (for example, CentOS6.3), go to

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.