In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly explains "what are the methods of lvm expansion under Centos". The content of the article is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn "what are the methods of lvm expansion under Centos"?
Due to the need of production, the capacity of / data directory is expanded from 90g to 190g, increasing 100g of space.
The production environment is a RHEL server, and the back end is EMC storage connected through a fibre switch. First of all, RAID the idle hard disk on EMC storage, divide the LUN, and map it to the production RHEL server.
(note: the premise of this expansion is that the partition must be completed in LVM format)
Disk information of the original server
# df-H
/ dev/datavg/lv_data
90g 81g 9G 90% / data
# lvdisplay
-Logical volume
LV Name / dev/datavg/lv_data
VG Name datavg
LV UUID Sgpcu1-7Xhr-0gwH-qjJ6-QwBB-k2KA-9DJvFt
LV Write Access read/write
LV Status available
# open 1
LV Size 90.00 GB
Current LE 24882
Segments 10
Allocation inherit
Read ahead sectors auto
-currently set to 256
Block device 253:1
Restart the server, identify the newly added LUN on the EMC, and expand the datavg volume on the server side
# powerrmt display dev=all
Pseudo name=emcpowery
CLARiiON ID=CKM00110900942 [SG_DRAGON]
Logical device ID=6006016003602C00F0154D04917BE011 [LUN 211]
State=alive; policy=CLAROpt; priority=0; queued-IOs=0
Owner: default=SP A, current=SP An Array failover mode: 1
=
-Host-- Stor-I take O Path-Stats--
# HW Path I/O Paths Interf. Mode State Q-IOs Errors
=
7 qla2xxx sdan SP B0 active alive 0 0
5 qla2xxx sdas SP B1 active alive 0 0
7 qla2xxx sdbo SP A1 active alive 0 0
5 qla2xxx sdq SP A0 active alive 0 0
# powerrmt config
# powerrmt save
3. Steps:
Fdisk / dev/emcpowery1 then press n to add a new partition
Enter p to create the primary partition, and enter twice to allocate all the space to this partition.
Enter t to convert the partition type; enter 8e to convert to linux lvm partition
Enter w to write save and exit.
Create PV
[root@linuxas /] # pvcreate / dev/ emcpowery1
Add to an existing logical volume group
[root@linuxas /] # vgextend datavg / dev/ emcpowery1
Expand the capacity of LVM
[root@linuxas /] # lvextend-L + 100G / dev/datavg/lv_data
Check the relationship between inode and block corresponding to LVM devices
[root@linuxas /] # e2fsck-f / dev/datavg/lv_data
Make the increased capacity effective
[root@linuxas /] # resize2fs / dev/datavg/lv_data
IV. Verification
# df-H
/ dev/datavg/lv_data
190G 81G 109G 43% / data
# lvdisplay
-Logical volume
LV Name / dev/datavg/lv_data
VG Name datavg
LV UUID Sgpcu1-7Xhr-0gwH-qjJ6-QwBB-k2KA-9DJvFt
LV Write Access read/write
LV Status available
# open 1
LV Size 190.00 GB
Current LE 39882
Segments 10
Allocation inherit
Read ahead sectors auto
-currently set to 256
Block device 253:1
Thank you for your reading. The above is the content of "what are the methods of lvm expansion under Centos". After the study of this article, I believe you have a deeper understanding of the methods of lvm expansion under Centos, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!
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.