After a certain treasure purchased the monthly payment of the VPS, installed Linux under the CentOS system, installed a Web server environment impressively found only 10G partition available (df-h), but when the original purchase, package there is clearly written hard drive is 50G, Then after an open mind to ask Baidu just learned that some host provider VPS under the Linux default installation of only 10G less than the partition available, the rest of the partition needs their own processing. Below I share the general method of how to partition the system disk in Vpslinux (
using the dynamic extended LVM partition ).
First use the command fdisk-l to view the contents of the system partition:
Found/dev/sdb there is no partition Ah, then the next will be/DEV/SDB partition slightly.
The image above is to partition the/DEV/SDB into DEV/SDB1 and partition it into an LVM format (8e).
Perform VGS view Volume group, you can see only one volume group
When you perform a VGS view of a volume group, you can see that only one volume group (VG) is named: Vg_cloud
Create a physical volume and join the physical volume to group V
Create a physical volume and add a physical volume to the volume group Vg_cloud
Vgdisplay View Volume Group space
You can see that about 39.99GB is available.
Enlarge the Lv_root under the volume group 39.99G
Lvresize-l +39.99g/dev/vg_cloud/lv_root
Resize2fs/dev/vg_cloud/lv_root
After the run is complete, we can see that the corresponding space has been expanded to use.
Finally, the available partition sizes are viewed through df-h (because these VPS providers have created the VG and LV by default, so they can be used directly).