More ProxMox/Linux Deliciousness…

      4 Comments on More ProxMox/Linux Deliciousness…

This morning, I once again did something amazing (to me), thanks to virtualization.

Mind you, I’m not a big fan of virtualizing network services (running critical network services, such as DNS, etc. on shared resources), but I will admit that virtualization does have it’s place.

With that out of the way, I do want to document my latest adventure:

I have a Ubuntu virtual machine running on a ProxMox hypervisor.  This VM’s purpose is to run a bit of software called Handbrake, which basically does video transcoding.  I utilize it a great deal to convert videos from one format to another, mainly to enable them to be streamed more efficiently by my Plex server.  Basically, I drop the source file into a directory on this server that the Handbrake software is monitoring and, when it sees it shows up, it goes about the business of transcoding/converting it into a pre-determined format and drops the resulting file into another directory.

Well, this morning I decided I was going to drop a bunch of files into the incoming directory on this server and let it chug away at them for how ever long that was going to take.  I quickly found out, however, that I had not allocated enough disk space on the file system of this server to enable this (the partitions were 250GB, and the total file size of all the files I was attempting to convert was in the 350G range).  My initial thought was to blow away the existing partitions and create larger ones but, as I set about doing that, I found that ProxMox enables one to increase the size of an existing partition! 

I began by shutting down the VM, although I’m not sure if it was required; I’ll have to try this again sometime on a test box while it’s running to see what happens.

The resizing process is accomplished in the ProxMox GUI by navigating to the VM in question, selecting ‘hardware’ from the sidebar, and then highlighting the hard disk to be modified.  This will allow the ‘Disk Action’ drop-down at the top to be clicked on and, once it is clicked on, the ‘Resize’ option should be selected.  One then inputs the amount of space (in GB) that the drive should be increased by, followed by clicking the ‘Resize Disk’ button and voila!  It does it!

There are a few steps that must be taken in the Ubuntu VM once the above is finished.  I should make note that the file systems in question are not LVM; I think the process for LVM file systems is likely different but – since I don’t use LVM – here we are.

I brought the system up and then unmounted the file systems I was resizing, as they still showed to be 250G in the Ubuntu system even after the disks were increased at the hypervisor level.  I then used the ‘cfdisk’ utility to select the existing partition on each of the 2 file systems and increase it to encompass the newly available space.

I then mounted the file systems and performed a ‘resize2fs’ on each file system (‘resize2fs /dev/sdb1’ and ‘resize2fs /dev/sdc1’, respectively).  This goosed the system to see the additional space and my file systems then displayed the new sizes.

All existing data on the partitions involved was retained, although I wasn’t going to be upset if it wasn’t since it was all temporary data anyway.  It’s nice to know this operation can be performed without any data loss, however!

Anyway, that’s that.  It’s a bit of a ramble but I wanted to get it “on paper” before I forgot any of the steps. 

4 thoughts on “More ProxMox/Linux Deliciousness…

  1. Phil

    I like it, good stuff!!

    I do run my secondary DNS on a docker instance, incidentally. Yeah, probably a bad idea, but never had an issue with it and it’s the backup anyway.

    Reply
    1. Mike Post author

      What docker container are you using for DNS? I’ve been pondering doing the same for internal/lab/test stuff.

      Reply

Leave a Reply

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