Skip to content

Fatih Acar's blog

About of Database Systems and Information Technologies

Menu
  • Home
  • About Me
  • Contact Me
Menu

Linux Logical Volume Manager Configuration And Extend Disk Operation

Posted on 18/02/201517/12/2019 by Fatih Acar

Logical Volume Manager is a disk partitioning solution on linux systems. This architecture provides advantages. You can extend disk size easily with lvm without losing exist data. But, If you use fdisk that is classical method for partition, you can not resize this partitions without losing data.

You can follow below steps to configure lvm.

LVM Creation Steps

1- Disk partition “cfdisk”
2- Create physical volume “pvcreate”
3- Create virtual group “vgcreate”
4- Create logical volume “lvcreate”
5- Format logical volume “mkfs.ext4”
6- Add Fstab “vi /etc/fstab”

LVM Architecture

Logical Volume Manager Architecture
Logical Volume Manager Architecture

Configure LVM Disks

We will configure sdf disk that is new disk.
[root ~]# ll /dev/sd*
cfdisk_0
Create Partitions
[root ~]# cfdisk /dev/sdf
cfdisk_1

cfdisk_2

cfdisk_3

cfdisk_4

cfdisk_5

cfdisk_6

cfdisk_7

cfdisk_8

cfdisk_9

cfdisk_10
List Partitions
[root ~]# fdisk -l
cfdisk_11
Create Physical Volumes
cfdisk_12

cfdisk_13
Create Virtual Group
cfdisk_14
Create Logical Volumes
cfdisk_15

If you want to give %100 area to logical vol, you can use “lvcreate -n voldisk01 -l 100%FREE vgpart”

Format Logical Volumes
cfdisk_16

cfdisk_17
Create Directory, Mount Logical Disk, Add Test Values
cfdisk_18
Logical Volume Add to Fstab
[root ~]# vi /etc/fstab
cfdisk_19

Extend LVM Disk

Display sdf Disk After Extend Disk Size As Physical
[root ~]# fdisk -l
extend_lvm_1
Create Partitions
[root ~]# cfdisk /dev/sdf
extend_lvm_2

extend_lvm_3

extend_lvm_4

extend_lvm_5

extend_lvm_6
Create Physical Volumes
If you get an error that do not recognize new disk, you can reboot system to resolve.
extend_lvm_7
Extend Virtual Group
extend_lvm_8

extend_lvm_9
Extend Logical Volume

If you want to use all free space to extend,  you can use lvextend -l +100%FREE /dev/vgpart/voldisk01
extend_lvm_10
Resize Logical Volume
extend_lvm_11

 

If resize2fs do not work, you can use   xfs_growfs /dev/vgpart/voldisk01  command to resize logical volume.
Display New Disk Size and Test Values
extend_lvm_12

Share this:

  • Click to share on LinkedIn (Opens in new window) LinkedIn
  • Click to share on X (Opens in new window) X
  • Click to share on Facebook (Opens in new window) Facebook

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Time limit is exhausted. Please reload CAPTCHA.



View Fatih ACAR's profile on LinkedIn

Categories

  • Databases (329)
    • MsSQL Server (18)
      • Administration (16)
      • Errors and Solutions (4)
      • SQL (2)
    • MySQL (5)
      • Administration (4)
      • Backup And Recovery (1)
      • Errors and Solutions (1)
    • Oracle (290)
      • Administration (79)
      • Backup And Recovery (29)
      • Errors and Solutions (195)
      • Procedure (10)
      • SQL (32)
    • PostgreSQL (16)
      • Administration (15)
      • Errors and Solutions (3)
      • SQL (2)
    • Redis (1)
  • Microsotf Dynamics CRM (1)
  • Operating Systems (47)
    • Linux & Unix (34)
    • Windows (13)
  • Programing (5)
    • Python (5)
  • SAP (15)
    • Errors and Solutions (4)
    • SAP Basis (12)
  • Security (8)
    • Database Security (6)
    • Information Security (1)
    • System Security (4)
  • VMware (4)

Recent Posts

  • Redis 7 Sentinel Infrastructure Installation
  • Oracle Database 19c Multi Data Guard and DML Redirect, Switchover-Failover Operations on Oracle Linux 8
  • Oracle Database 23ai Free Installation Steps on Oracle Linux 9
  • Oracle Database 19c Active Data Guard Installation and DML Redirect, Switchover-Failover Operations on Oracle Linux 8
  • Oracle Database 19c Installation and 19.22 RU Patch Apply on Oracle Linux 8

Resources

  • Oracle
  • PostgreSQL

Blogroll

  • Gökhan Atıl
  • H. Koray Gündüz
  • Hakan Talip Öztürk
  • Zekeriya Beşiroğlu

Web Pages

  • BT Çözümleri

Tag Cloud

Administration Backup and Recovery Cluster Systems Database Administration Database Security Linux Linux Administration MsSQL Server MsSQL Server Error and Solutions MySQL MySQL Administration ORA-00018 ORA-00020 Oracle Oracle 12c Oracle 19c Oracle Administration Oracle Backup and Restore Oracle Data Guard Oracle Data Guard Failover Oracle Data Guard Switchover Oracle Error Solutions Oracle Linux Oracle Rman Backup Oracle Security Oracle SQL Query PostgreSQL PostgreSQL Administration PostgreSQL High Availability PostgreSQL Hot Standby Python SAP Basis Sap Errors and Solutions Sap System Administration SQL SQL Server Administration SQL Server Availability Group Stored Procedure System Administration System Security VMware VMware Administration Windows Windows Batch Script Windows Server

Social

  • View facar1987’s profile on Twitter
  • View facar’s profile on LinkedIn

Subscribe to Blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 16 other subscribers
©2026 Fatih Acar's blog | Built using WordPress and Responsive Blogily theme by Superb