PXE Issue Ubuntu 20.04
-
@george1421 at the present setup we are quite small so shouldnt need over 100gb, however for future proofing if I extend the VHD on hyper-v to say 500gb how do I extend the partition to claim that extra space? (from what you’re saying it’s the root partition that both fog and ubuntu are running off - this makes sense as I added no second disk for images) Once i’ve done that will the images directory/fog storage node auto detect that and adjust accordingly or will I have to do extra commands on Ubuntu for it to see it?
-
@rogerbrowntdl said in PXE Issue Ubuntu 20.04:
for future proofing if I extend the VHD on hyper-v to say 500gb
Unfortunately that was one of the options I didn’t feel would add value. I must have done a bad job of explaining the situation. My suggestion was to live in the walled garden that has been created for you until you grow out of it or rebuild from the ground up.
The ubuntu/OS disk only should consume about 30GB of space. I would suggest that you make it 50 GB for updates and whatnot. This is before you even load fog on it. Your Ubuntu install uses something called LVM (logical volume manager), which is a good thing, but in this instance it gets in the way.
Your current situation is that the ubuntu install has created 3 partitions on that current vhd. You have boot, swap, and then partition 3 where the root file system is (think windows c drive). On that 3rd partition is a LVM volume. That lvm volume is using 62GB of the 125GB volume… <thinking>
Edit: OK this may be the solution here to salvage what has been created for you.
On your /dev/sda3 (third partition on the first hard drive) it is 125GB in size. The lvm volume group (think of it as a virtual virtual disk) ubuntu–vg and lvm logical volume (think of it as a virtual virtual partition) ubuntu–lv (isn’t abstraction great!!) is only consuming 62GB of that 125GB physical partition.
So the first thing we need to do is backup or snapshot this VM, because the next steps could be destructive.
Goal here is to extend the VLM volume ubuntu–vg to the extent of the physical partition /dev/sda3 (this partition at the end of the disk will allow us something usable in the future.). I’m not sure that the logical volume group needs to be extended, but I think yes. I would try to extend the logical volume first and if it complains then extend the lvm group. I did find a tutorial on how to do this and its use case fits pretty closely with your situation. See ref below.
You should be able to start with the section Modify (extend) the LVM: In this case they reference
/dev/vda1
you should use/dev/sda3
so your extend command should look something like this (follow along with their tutorial)sudo lvextend -l +100%FREE /dev/ubuntu--vg-ubuntu--lv
(get the value from the lvdisplay not trust what I glued together. If all goes well it should extend that 62.8GB LVM to 125GB. You should use thelsblk
command to confirm this happens. If it works correctly your root file system should grow from 62GB to 125GB after you run theresize2fs
command.If that works then it puts you in an OK place. Because if you need more than 125GB for images then you can extend the VHD file (leaving room after
/dev/sda3
. You can extend /dev/sda3 partition and then repeat the same process as above to extend the LVM to the new size of/dev/sda3
.While the above is surely possible I don’t know which would take more time, simply spinning up a new fog server as I mentioned before with a 50GB hard drive then before adding FOG add a second vhd and linking it into the /images directory before installing FOG, or just extending the VLM volumes.
-
@george1421 You sir are a fucking LEGEND!!! I’m all set for now. Time to get playing with images and deployments. Thank you so so so sooooo much