Assorted _ VMware Extended virtual machine-disk space __ Assorted

Source: Internet
Author: User

Original address: https://blog.csdn.net/HowieXue/article/details/51326122


You will not encounter the initial allocation of Linux virtual machine hard drive late, (because I used the friendly arm of the virtual machine with the ARM board to learn, only 20G, not enough AH) The following is the solution:

Operation Steps:

1, first in the open virtual machine settings, in the selected hard drive options, select the Extended option (expand), set the size of the expansion (need to shut down the state, and can not have virtual machine snapshots), such as I was 20G, through the settings to expand to 40G. After this step, Linux will be more than 20G of free disk.

But this is just VMware to the virtual machine to split the hard disk, as you add a hard disk to the computer, the following will also be configured in the Linux system so that the hard disk space mount correctly:

2. Terminal input > FDISK/DEV/SDA

Then enter "P" (print partition information) to view the current information

(for local SDA hard disk partition management, where SDA refers to the SATA interface of the hard disk, general SDA generally refers to the first hard drive, the second is SDB. The corresponding HDA generally refers to the IDE interface's hard disk.

At this point, there are typically only sda1, sda2 two partitions, so you need to create a new partition for the added disk:

or enter "n" in the Fdisk command (new one) at this point, enter the extension, primary partition selection, enter "P" to select the primary partition, and select the partition number of 3.

Finally, you will be prompted to select the starting and ending addresses of the partition, usually by default. At this point, enter p again to see the sda3 of the already divided area.

At this point, enter W (write writing) to save the partition results, and then restart or enter > Partprobe/dev/sda3 to update the partition information.

3, this step to extend the LVM (logical volume):

Enter > Pvcreate/dev/sda3 to create the physical volume PV (physical volume) first.

In this you can enter > Vgdisplay to view the current volume group (volumegroup)


4, Input > Vgextend/dev/mapper/vg_name/dev/sda3 will add new PV to the original VG:


Hint success is successful, where the name of VG is the VG name of its own system, which can be viewed through df–h


5, expand the current (root file system) Logical volume LV, from the VG to take the rest of the space here is 20G, but there are reserved address, directly 20G will be an error, so I took 19G here:

command is:> lvextend-l + xxg/dev/mapper/vg_name-lv_root




6, the last input command: > RESIZE2FS dev/mapper/vg_name-lv_root

This step refreshes the file system size again, then DF looks at it again, and you can see that the current root file system is already 37G.


Original works, reprint please add URL Portal: http://blog.csdn.net/howiexue/article/details/51326122

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.