Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to partition Linux VPS system disk

2025-04-02 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly introduces "how to partition the Linux VPS system disk". In the daily operation, I believe many people have doubts about how to partition the Linux VPS system disk. The editor consulted all kinds of data and sorted out a simple and easy-to-use method of operation. I hope it will be helpful to answer the doubts about "how to partition the Linux VPS system disk". Next, please follow the editor to study!

After using vps to install the Linux system, it is found that the available partitions are insufficient, which is mainly due to the lack of relevant configuration after vps installation. The following editor will introduce how to partition the Linux vps system disk, and friends who feel that different partitions can come to learn.

After purchasing the monthly payment of VPS, install the centos system under linux, and after installing the web server environment, I was surprised to find that only less than 10G partitions are available (df-h). Later, I learned that only the partitions less than 10G are available by default under some host provider VPS, and the rest of the partitions need to be handled by themselves.

First use the command fdisk-l to view the contents of the system partition:

It is found that / dev/sdb has no partition at all, then / dev/sdb will be partitioned next.

The image above partitions / dev/sdb into dev/sdb1 and the partition into LVM format (8e).

Execute vgs to check the volume group. You can see that there is only one volume group.

Execute vgs to check the volume group, and you can see that there is only one volume group (VG) named: vg_cloud.

Create physical volumes and add physical volumes to group v

Create a physical volume and add the physical volume to the volume group vg_cloud

Vgdisplay to view volume group space

You can see that there is probably a 39.99GB that can be used.

Lvdisplay View lv name:

Expand the lv_root under the volume group by 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 and ready to use.

Finally, check the available partition size through df-h (because these VPS providers have created VG and LV by default, they can use them directly)

At this point, the study on "how to partition the Linux VPS system disk" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report