In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces the relevant knowledge of "how to expand the capacity of the partition under Linux". The editor shows you the operation process through the actual case. The operation method is simple, fast and practical. I hope this article "how to expand the capacity of the partition under Linux" can help you solve the problem.
View unallocated space under disk
# check the usage of system space df-h
Use fdisk + disk name, for example
Fdisk / dev/sda
Now you can see the partition under the disk, like this
Now that there is still 200G of space left under the disk, I want to hang it under the / dev/mapper/centos-root file system.
The first step is to create a partition of the remaining space. Refer to the previous article and use the fdisk command to partition the disk.
The newly added partition here is called / dev/sda4
Step 2 create a physical volume
Pvcreate / dev/sda4
If the prompt cannot find / dev/sda4. Please type partprobe this and you should be prompted when you create the partition.
The third step is to view the volume group using vgscan
Vgscan
It's called centos.
The fourth step is to extend centos with the new physical volume
Vgextend centos / dev/sda4
The fifth step is to extend lv. This assumes that the new partition size above is 180G, followed by the partition name to be extended.
Lvextend-L + 180G / dev/mapper/centos-root
It may be suggested that there is not enough space here, perhaps because the calculation error can be reduced appropriately.
Step 6 let the file system recognize the newly added disk file system
Xfs_growfs / dev/mapper/centos-root
Using the command df-h here, you can find that the space under / dev/mapper/centos-root has been expanded by 180G.
This is the end of the content about "how to expand the capacity of the partition under Linux". Thank you for your reading. If you want to know more about the industry, you can follow the industry information channel. The editor will update different knowledge points for you every day.
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.