In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly introduces how to expand the partition capacity under linux, the article is very detailed, has a certain reference value, interested friends must read it!
In daily work, we often encounter the problem of insufficient remaining capacity of a partition, so we need to master how to expand the partition under linux server. For partition expansion, there are two cases
Expansion of LVM partitions
Expansion of Non-LVM Partitions
Expansion of LVM partitions
In general, we recommend using LVM to facilitate Auto Scaling of partitions. For an introduction to LVM, physical volumes, logical groups, logical volumes, etc., I won't go into detail here. You can go to my other two articles on LVM.
Scenario: The/www directory is our directory related to the website. The partition mounted in this directory uses LVM. Originally, this directory has a space size of 1G, but with the operation of the system, the remaining space is less than 100M. The partition now needs to be expanded.
Preparation, implementation of scenarios
# pvcreate /dev/sdb1# vgcreate vgwww /dev/sdb1# lvcreate -l 255 vgwww# mkfs.ext4 /dev/vgwww/lvol0 # mount /dev/vgwww/lvol0 /www# dd if=/dev/zero of=/www/bigfile bs=1M count=900# df -h……/dev/mapper/vgwww-lvol0 988M 903M 19M 98% /www
the partition expansion
First of all, we have to see if there is any space left in vgwww, if not, we need to add pv to vgwww first.
# vgdisplay vgwww …… Free PE / Size 0 / 0
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.