How to reinstall linux system

王林
Release: 2019-12-18 10:09:05
Original
9445 people have browsed it

How to reinstall linux system

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

How to reinstall linux system

How to reinstall linux system

Then load the ISO, start reinstalling and retain the /data partition, and load it directly to the partition interface

Online learning video tutorial Share: linux video tutorial

I learned from the beginning that the /data partition is 2048MB, so I directly chose to keep this partition

How to reinstall linux system
Then delete the other partitions , and then repartition

How to reinstall 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 to still prove that it has been successful

How to reinstall 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 linux system
You can see the two partitions using LVM when installing the system: /, /var, check the volume group name and volume group usage vgdisplay
How to reinstall linux system

View the current logical volume The space status is as shown below:
How to reinstall linux system

How to reinstall linux system

Now I feel that 8G of /var is not enough. I want to expand it to 28G. Insert a new 20G hard disk; use 'fdisk -l'View

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

How to reinstall linux system

Put the newly added disk Set to LVM mode

How to reinstall linux system
Confirm partition

How to reinstall linux system
Create the newly added partition /dev/sdb1 as a physical volume

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

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

How to reinstall 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 linux system
Write to the file system to make the expansion effective

How to reinstall linux system

Recommended related articles and tutorials: linux tutorial

The above is the detailed content of How to reinstall 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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!