In addition to Weibo, there is also WeChat
Please pay attention

WeChat public account
Shulou
2025-11-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/03 Report--
Ext4 file system, capacity expansion and reduction are relatively slow, I like to use the xfs file system.
But today I just know that the lvm of xfs cannot directly reduce the space online, so I must pay attention to the lvm partition of the xfs file system, which is as small as possible. Once online, it will only expand and not decrease!
If you forcibly use the previous lvm expansion method of the ext4 file system to reduce space, it will lead to a superblock error that cannot be mounted.
When it is a last resort to reduce the lvm partition space of the xfs file system, be sure to pay attention to the order.
Step zero, yum install-y xfsdump
The first step is to backup the target data. Take / home as an example.
Xfsdump-f "absolute path to dump file plus file name"directory that needs to be reduced"
such as
Xfsdump-f / opt/home.dump / home
Step two, uninstall the directory you mounted
Umount / home
Step three
Lvresize-L 7G / dev/mapper/centos-home
Whether to turn your original logical volume into 7G or to expand or shrink it will judge for itself.
Step 4 format to update to the latest size
Mkfs.xfs-f / dev/mapper/centos-home
Step 5: mount the empty partition
Mount / dev/mapper/centos-home
Finally, the data of dump is restored.
Xfsrestore-f / opt/home.dump / home
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.

The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope





About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.