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 does LVM expand the disk size of the linux file system

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

Share

Shulou(Shulou.com)05/31 Report--

This article introduces the knowledge of "how LVM expands the disk size of linux file system". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!

LVM is a commonly used disk management technology under Linux, which can dynamically expand the size of logical volumes online.

1. View disk status

# fdisk-l

two。 Create a partition on the newly added hard disk with a partition type of 8e

# fdisk / dev/vdb

Command (m for help): new

Command action

E extended

P primary partition (1-4) p

Partition number (1-4): 1

First cylinder (1,512, default 1):

Last cylinder or + size or + sizeM or + sizeK (1,512,512):

Command (m for help): t

Partition's system id: 8e / / LVM logo

Command (m for help): W

3. Create a physical volume

# pvcreate / dev/vdb1

4 add a new physical volume to the volume group

# vgextend vg_centos / dev/vdb1

5. Expand logical volume siz

# lvextend-Log 1G / dev/mapper/vg_centos-lv_root

6. Extend the file system siz

# resize2fs-p / dev/mapper/vg_centos-lv_root

If it is a gfs2 file system,

Gfs2_grow / dev/mapper/vg_centos-lv_root

7. View the amount of disk space after configuration

# df-h

8. View volume groups and logical volume statu

# vgdisplay

# lvdisplay

This is the end of the introduction to "how LVM expands the disk size of the linux file system". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!

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