Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Help with LVM on a VMware VM with Multiple Disks

If none of the specific sub-forums seem right for your thread, ask here.
Post Reply
Message
Author
tangles
Posts: 1
Joined: 2023-05-24 19:55

Help with LVM on a VMware VM with Multiple Disks

#1 Post by tangles »

Hello.

I'm fairly new to Linux and I'm trying to wrap my head around how to present new space from a virtual disk to the OS when it's using LVM and inside a Volume Group with two Logical Volumes (Root and Swap)

I'm on Debian 11 and the VM has two disks. A 20 GB disk that has been grown to 50 GB in VMware. There's also a second disk that is in its own Volume Group that I have figured out how to extend after many support articles.
I'm really getting stuck on extending the first vDisk and growing the Root partition. Everything I've tried so far renders the OS unbootable. (Thankfully I have a snapshot in place after growing the second vdisk and extending the first vdisk so I can easily revert when things go haywire)

I'm not sure what info is needed to get help here. I can paste results of lsblk, pvdisplay, lvdisplay, df -Th, etc. if that would be helpful.

CwF
Global Moderator
Global Moderator
Posts: 2625
Joined: 2018-06-20 15:16
Location: Colorado
Has thanked: 41 times
Been thanked: 190 times

Re: Help with LVM on a VMware VM with Multiple Disks

#2 Post by CwF »

No need to double post your issue. You do understand this is an unpaid volunteer support forum. Someone needs to be somewhat familiar in order to answer, and take the time to first see, then respond. There seems to be ample google results for extending the lvm root,

Code: Select all

man lvextend 
I've stepped through it before and my takeaway was simple, plan ahead.

First, no VMWare. I typically ignore the subject. I suspect your Debian VM is on a windows host? If so, you're doing it wrong! It should be the other way around! I tease, but seriously...

Under qemuy/kvm on a Debian host most VM's work very well, Linux VM's exceptionally well. In that scenario there is no good reason to have excessive complexity within the VM since that layer of function should be implemented by the host. If your VM's image FILE resides on a host LVM hardware, why nest more of the same...

On the other hand, for rescue/repair/update/forensics I have passed the physical disk of bare-metal installs and made cow images. I'll forget the exercise days later. A LVM should usually be 'device' size which is now hard to find the minimum 120GB devices, but that size would not be a random size. Encrypted LVM doesn't compress, so make poor subjects for efficient imaging, aka backups and snapshots, especially if those FILES reside on a host already with that benefit.

Passing the entire device to the vm and enabling Debian to run bare metal or virtualized and be portable is another strength of the official way. In that case the disk is raw to the vm, and one could make the case for luks/lvm. In those cases, and this one, the manipulation is done in the guest. Shouldn't be a problem. Multiple disk/images per vm is not a complication.

With a file based guest image at least you have infinite tries. Our resident lvm expert seems to be MIA, be patient.

Post Reply