Quantcast
Channel: linuxadmin: Expanding Linux SysAdmin knowledge
Viewing all articles
Browse latest Browse all 17822

How to extend an LVM partition on a virtual machine (like a neanderthal) aka should we even be using LVM in virtualised environments?

$
0
0

Hello fellow Tux-loving brethern :)

This is my followup post to this thread I made last week asking about how to extend an LVM volume on a virtual machine.

I did not want to compromise on three things:

  • I did not want to shutdown / reboot
  • I did not want to add an additional harddisk (I do not like seeing my VMs having numerous virtual hard disks attached to them, fugly)
  • I didn't want to add an additional partition after extending the virtual disk.

Why did I not want to do these things? Because I am a stubborn motherfucker, and because my spidey-sense was telling me that we shouldn't have to do these things in 2015.

Anyway see here my little imgur album I have made of how to successfully achieve this. This took me a week and trial and error and I am not done yet, but I just wanted to reach out to me from last week and say 'no you are not losing your mind'.

It's worth noting I could not achieve one of the objectives, I was forced to reboot, this is something I want to battle with.

But the next step of my research around this is, should we even be using LVM in virtualised environments? After all the hypervisor is already handling some of the functionality. Is it best to go back to pre-LVM practices, keep all your partitions in one big harddrive, and extend that when you need to? Anyone want to argue (discuss) the pros and cons for this? There is no right answer, it all depends on your situation. In my case, it was for a application server hosting everything, the app, the database, the webserver, all in the root lvm partition.

TTFN, hope this helps someone else who foolishly deploys a linux VM with the default (i.e. LVM activated) settings

EDIT: tough crowd. I never said this was the right way of doing things, only that this was the state of the VM and I did not want to make any changes such as adding additional virtual HDs or adding additional partitions. I had a problem with a OS I enjoy solving problems in and I wanted to see if it could be done. Reasons for not taking the conventional approach may vary but in my case I wanted to keep my Veeam backups as clean as possible and ideally that means one virtual harddisk. I wanted to see if it could be done, from a research perspective, and it can. Going forward I will certainly be setting up my Linux VMs with more care, and with LVM. For whoever dished out the downvotes (no doubt because of a lack of relevance) I can tell you from my research there were plenty of people out there who were trying to find a solution to the same conundrum. Hopefully this helps someone who also for one reason or another, doesn't want to or can't add another disk.

submitted by see_phez
[link][9 comments]

Viewing all articles
Browse latest Browse all 17822

Trending Articles