Additional disk space is not showing up on Fog server
-
@sjensen linux console…
What may be confusing you is that linux (here) is using LVM (logical volume manager) to manage your disks. It doesn’t have an equivalent in the windows realm. But LVM is an abstract layer between the hardware and the OS. If you close one eye and squint with the other one, one might says its a kind to a disk virtualization layer. Between the hardware and the OS. (even if the system is running as a virtual machine). LVM allows you to add more disks to an operating system without needing to reformat your hard drive to extend it. Granted its much easier now with linux running on a vm to extend the vmdk and add space, when you are talking about physical servers, it a bit harder. That is where LVM comes into play.
-
@sjensen Open a terminal.
Gain root: (If ubuntu typically
sudo -i
).Once at the root prompt, run the command.
Root prompt looks similar to:
[root@fogserver ~] #
-
@Tom-Elliott
ok done -
@sjensen Did it work?
-
@sjensen now do you see the additional space when you do a
df -h
? -
-
Did you expand the originating volume, or did you add a new HDD to the VM?
-
- i added more disk space from the hyper v console
- booted into gparted live cd and extended the volumes.
- rebooted
-
@sjensen it might be easier to follow these instructions to resize your LVM, you’ve already done part of this, but i’m sure you can figure out what needs to be done yet. https://blog.vbonhomme.fr/extend-a-lvm-partition-after-increasing-its-virtual-disk-on-virtualbox/
-
@sjensen I’d also recommend against gparted in this particular case. To do what you need manually it’s only a couple standard linux commands.
-
@Wayne-Workman it’s a little late for that Wayne. I’ve used Gparted already. It seemed like a good solution.
-
@Junkhacker Would this work for a Hyper-v machine too?
-
@sjensen your virtual machine doesn’t know it’s a virtual machine, so what hypervisor you’re using is irrelevant. everything in the steps past gparted (which you say you’ve already done) is relevant
-
@Junkhacker Thank you for the link. If I understand this correctly, gparted resized the partition, now I have to go in and make changes so Ubuntu sees that I extended the hard drive space. Is basically what needs to happen? Please bare with me I am new to Linux, i’m still learning. Any advice is appreciated.
-
@sjensen If you run that list of commands again that I posted previously, we can see exactly how it is now and give you guidance on what to do.
-
-
@Junkhacker Thank that link worked
-
Well if it’s still exactly like how it was in the photos he posted, this command would allocate the free space available in the volume group ‘FOGserver-vg’ to the logical volume ‘root’
lvextend -l 100%FREE /dev/FOGserver-vg/root/
And then this command would then expand the file system on
root
resize2fs /dev/FOGserver-vg/root
After that, a simple
df -h
should show the space is available at the/
mount point. -
@Wayne-Workman Wayne thank you for the reply. I used the that Junkhacker posted. It worked very.
https://blog.vbonhomme.fr/extend-a-lvm-partition-after-increasing-its-virtual-disk-on-virtualbox/