W
W
whoami3122019-10-13 10:35:04
linux
whoami312, 2019-10-13 10:35:04

LVM increasing disk size on VDS?

Greetings!
I have little experience with lvm, need help, please share your experience.
I read man, searched Google, but did not manage to figure out the situation.
There are several VMs on centos, lvm is configured on them. There was a need to expand the size of the additional disk.
Expanded the volume of the VM disk in the admin panel.
we see that the volume of the device has increased

[[email protected] opt]# fdisk -l

Disk /dev/vda: 20.4 GB, 20401094656 bytes, 39845888 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk label type: dos
Disk identifier: 0x00094fc6

   Device Boot      Start         End      Blocks   Id  System
/dev/vda1   *        2048    39845854    19921903+  83  Linux

Disk /dev/vdb: 3221 MB, 3221225472 bytes, 6291456 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/mapper/LVM-DATA: 2143 MB, 2143289344 bytes, 4186112 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


All the articles on the internet that I could find say to make a new section on the added space and then include it in the VG.
But here is the difficulty, all articles are described for such a markup hierarchy:
[[email protected] opt]# lsblk
NAME       MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
vda        253:0    0  19G  0 disk
└─vda1     253:1    0  19G  0 part /
vdb        253:16   0   2G  0 disk
└─vdb1 253:1    0  2G  0 part
   └─LVM-DATA 252:0    0   2G  0 lvm

and in my case, lvm was already preconfigured like this:
[[email protected] opt]# lsblk
NAME       MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
vda        253:0    0  19G  0 disk
└─vda1     253:1    0  19G  0 part /
vdb        253:16   0   3G  0 disk
└─LVM-DATA 252:0    0   2G  0 lvm  /opt


The VG itself is not on the /dev/vdb1 partition, but on the entire /dev/vdb drive.
And if you follow the instructions for fdisk /dev/vdb and create a partition for all free space, the entire vg will be overwritten.
The question is, is it possible to somehow increase the size of VG without vgextend LVM /dev/vdb1.

In advance, I apologize for the incorrect wording.

Answer the question

In order to leave comments, you need to log in

[[+comments_count]] answer(s)
W
whoami312, 2019-10-13
@whoami312

Question removed.
Thanks to all!

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question