Home > Operation and Maintenance > Linux Operation and Maintenance > How to reinstall the linux system

How to reinstall the linux system

王林
Release: 2019-12-17 10:45:11
Original
7781 people have browsed it

How to reinstall the linux system

The original partition /data of the Linux system has data. To reinstall the system without formatting the /data partition
need to prepare a virtual machine with a /data partition

How to reinstall the linux system

How to reinstall the linux system

Then load the ISO and start reinstalling and keep the /data partition
Load directly to the partition interface
Follow what you learned at the beginning The /data partition is 2048MB, so just choose to keep this partition
How to reinstall the linux system

Free online learning video tutorial recommendation: linux video tutorial

Then delete the other partitions Then repartition

How to reinstall the linux system

Then wait for the system to be reinstalled as usual
After the system is reinstalled, go in and check the /data partition file, which still proves that it has been successful.

How to reinstall the linux system

Add a disk to the system and use LVM management to expand the existing volume group
Enter the system and view the partition df -h

How to reinstall the linux system
You can see the two partitions using LVM when installing the system: /, /var
View the volume group name and volume group usage vgdisplay
How to reinstall the linux system

Check the space status of the current logical volume, as shown below:
How to reinstall the linux system
. Now I feel that 8G of /var is not enough, and I want to expand it to 28G.
Insert a new 20G hard disk; use 'fdisk -l' to view

How to reinstall the linux system
Format partition operation 'fsdisk /dev/sdb'

How to reinstall the linux system

Set the newly added disk to LVM mode
How to reinstall the linux system

Confirm the partition
How to reinstall the linux system

Create the newly added partition /dev/sdb1 as a physical volume

How to reinstall the linux system
Expand the volume group centos. Expand the physical volume /dev/sdb1 to centos

How to reinstall the linux system
At this time, centos has 20G free space. Expand all /dev/sdb1 to /var

How to reinstall the linux system
At this time, although the 20G disk has been extended to /var, it has not been written to the file system. Enter /etc/fstab to confirm

How to reinstall the linux system
Write to the file system to make the expansion effective

How to reinstall the linux system

Recommended related articles and tutorials: linux tutorial

The above is the detailed content of How to reinstall the linux system. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
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