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

Virtual machine hard disk space is not enough. Add a new hard disk LVM and expand it to the root directory online.

2025-01-15 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

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

The company has a virtual machine, the hard disk is only 100G, slowly using space is not enough, so it is necessary to add a new hard disk, fortunately, the virtual machine is more convenient to add a hard disk, remember one operation

Newly added hard disk

View the volume names of PVS and VG

Directly expand the newly added hard disk to the volume group

If there is no error, the increase should be successful.

Then

Lvextend-L + 140g / dev/ubuntuzm3-vg/root

Add 140g of capacity to the root directory. / dev/ubuntuzm3-vg/root is the path of the root directory, and the parameter-L is capitalized.

After the command succeeds, the space does not change and resize2fs / dev/mapper/ubuntuzm3--vg-root needs to be executed again.

The format of the root partition is EXT4, so use resize2fs

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