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

What is the method of expanding directory capacity under Linux system

2025-02-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

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

What is the method of directory expansion under the Linux system? in view of this problem, this article introduces the corresponding analysis and solution in detail, hoping to help more partners who want to solve this problem to find a more simple and feasible method.

1. Phenomenon:

The log server was ill-considered at the beginning, and the partition was not reasonable:

2. Goal:

Reduce / home disk space and expand the new disk partition to the / root directory

Uninstall / home partition and compress partition

The target is prompted to be busy when uninstalling / home, and there is no fuser command when fuser-m / home checks who uses / home

[root@localhost zabbix] # umount / homeumount: / home: target busy.

(in some cases, useful information about processes using the device can be found through lsof (8) or fuser (1).)

[root@localhost zabbix] # fuser-m / home-bash: fuser: command not found

Resolve issues where there is no fuser command:

The fuser command was not found on CentOS/RHEL 7

-bash: fuser: command not foundyum install psmisc

Fuser-m / home / / continue to find out who is using / home

Kill-9 11757 / / stop the process umount / home / / unmount / home file system

Compressed Partition:

Resize2fs-p / dev/mapper/centos-home 100G

Confirm that it is a xfs format system

Cat / etc/fstab | grep centos-home

Xfsdump tools must be installed for xfs file system expansion.

Yum install xfsdump-y

Reduce / home space to 100GB, increase root directory, extend / directory space

Then remount / home

[root@localhost ~] # mount / homemount: / dev/mapper/centos-home: cannot read super block

The / home partition must be formatted before it can be mounted-so the contents of / home must be backed up before reducing the / home partition (remember!! )

Remount mount / home

The answer to the question about what is the method of directory expansion under the Linux system is shared here. I hope the above content can be of some help to you. If you still have a lot of doubts to be solved, you can follow the industry information channel to learn more about it.

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

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report