Detailed steps to expand LVM disk in Linux

Detailed steps to expand LVM disk in Linux

1. Add a hard disk

2. Check the partition status: fdisk -l

3. Set up partitions:

fdisk /dev/sdb Enter

m Enter

n Enter

p Enter

w Enter

4. Check the partition again: fdisk /dev/sdb and press Enter

LVM disk expansion in Linux_Disk expansion

t Enter

3 Enter

L Enter

8e Enter

w Enter

5. Look at the partition again:

LVM disk expansion in Linux_Disk expansion_02

6. Format the new partition as ext3: mkfs.ext3 /dev/sdb1

7. Convert the partition to a physical volume: pvcreate /dev/sdb1

LVM disk expansion in Linux_Disk expansion_03

8. Use the pvdisplay command to view physical volume information: pvdisplay

LVM disk expansion in Linux_Disk expansion_04

9. Use the vgdisplay command to view VG information: vgdisplay

LVM disk expansion in Linux_Disk expansion_05

10. Add the physical volume just initialized to the physical volume of the primary partition: vgextend cl /dev/sdb1

LVM disk expansion in Linux_Disk expansion_06

11. Use the vgdisplay command to view VG information: vgdisplay

LVM disk expansion in Linux_Disk expansion_07

12. Check the mounted disk: df -h

13. Use the lvextend command to expand the /home partition: lvextend -l +5119 /dev/mapper/cl-root

LVM disk expansion in Linux_Disk expansion_08

14. Mount: xfs_growfs /dev/mapper/cl-root

LVM disk expansion in Linux_Disk expansion_09

15. Check the mounted disk: df -h

How to expand LVM disk in Linux_Disk expansion_10

This is the end of this article about the detailed steps of LVM disk expansion in Linux. For more relevant Linux LVM disk expansion content, please search 123WORDPRESS.COM's previous articles or continue to browse the following related articles. I hope everyone will support 123WORDPRESS.COM in the future!

You may also be interested in:
  • LVM disk expansion problem in Centos7 in Linux
  • Linux disk management LVM usage
  • Detailed examples of Linux disk device and LVM management commands
  • Detailed explanation of LVM seamless disk horizontal expansion based on Linux

<<:  Introduction to the differences between HTML name, id, class (format/application scenario/features), etc.

>>:  The difference between Display, Visibility, Opacity, rgba and z-index: -1 in CSS

Recommend

Detailed process of changing apt source to Alibaba Cloud source in Ubuntu 18.04

Table of contents Preface: Ubuntu 18.04 changes a...

TypeScript problem with iterating over object properties

Table of contents 1. Problem 2. Solution 1. Decla...

Do you know why vue data is a function?

Official website explanation: When a component is...

Vue+Router+Element to implement a simple navigation bar

This project shares the specific code of Vue+Rout...

How to receive binary file stream in Vue to realize PDF preview

Background Controller @RequestMapping("/getP...

Detailed introduction to Mysql date query

Query the current date SELECT CURRENT_DATE(); SEL...

Detailed steps for creating a Vue scaffolding project

vue scaffolding -> vue.cli Quickly create a la...

Dissecting the advantages of class over id when annotating HTML elements

There are very complex HTML structures in web pag...

Vue implements Modal component based on Teleport

Table of contents 1. Get to know Teleport 2. Basi...

Web Design Help: Web Font Size Data Reference

<br />The content is reproduced from the Int...

Detailed explanation of MySQL redo log (redo log) and rollback log (undo logo)

Preface: The previous article described several c...

Pycharm2017 realizes the connection between python3.6 and mysql

This article shares with you how to connect pytho...

How to install and use Cockpit on CentOS 8/RHEL 8

Cockpit is a web-based server management tool ava...