Home > System Tutorial > LINUX > The company server Linux server needs to be expanded. Let's organize and record it.

The company server Linux server needs to be expanded. Let's organize and record it.

WBOY
Release: 2024-02-09 17:45:23
forward
421 people have browsed it

If your company's server needs to be expanded, you can search for information online and record it.

The following are the steps to expand the Linux root directory. Follow these steps and you will be successful.

If you find this information useful, please don't forget to like it.

Query disk usage

df -hl

The company server Linux server needs to be expanded. Lets organize and record it.

Query disk

fdisk -l

The company server Linux server needs to be expanded. Lets organize and record it.

Use the added disk

fdisk /dev/sdb

After entering this command, the following picture will appear. Just follow the operation command

The company server Linux server needs to be expanded. Lets organize and record it.

Create physical volume

pvcreate /dev/sdb1

Query the created physical volume

WeChat search public account: front-end technical programming, reply: front-end to receive information.

pvdisplay

The company server Linux server needs to be expanded. Lets organize and record it.

Add the newly added volume to the volume group centos through vgextend

vgextend centos /dev/sdb1

View volume group free block Free PE

vgdisplay

The company server Linux server needs to be expanded. Lets organize and record it.

Add expansion capacity to the directory to be expanded

Extend the root directory mount point /dev/mapper/centos-root through the lvextend command

lvextend -L 60G /dev/mapper/centos-root

The company server Linux server needs to be expanded. Lets organize and record it.

xfs_growfs /dev/mapper/centos-root

The company server Linux server needs to be expanded. Lets organize and record it.

df -hl View expansion status

The company server Linux server needs to be expanded. Lets organize and record it.

If you see the red box in the picture above, it means the expansion is successful.

The above is the detailed content of The company server Linux server needs to be expanded. Let's organize and record it.. For more information, please follow other related articles on the PHP Chinese website!

source:lxlinux.net
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template