Additional disk space is not showing up on Fog server
-
@sjensen ok now that I wasn’t totally clear
If you connect via ssh to your fog (linux) server console and key in
df -h
can you see the added space you created? -
@sjensen Can you post the output of all of these commands actually? If you are like most people you used all the defaults when installing Ubuntu, and there are volume groups setup.
sudo -i df -h lsblk fdisk -l pvdisplay vgdisplay lvdisplay
Please post using the code formatting tool, preferably with the output of each command in it’s own box.
-
Here is what I got. I added around 300gb to the linux vm.
-
@sjensen Did you expand the volume?
It may require you to run a live cd to expand seeing as, if I’m understanding correctly, you’re trying to expand the root partition.
While it is possible to resize the root partition live, I’d recommend against it.
If you can create a snapshot of the system before you make any partition changes, I think it may help you out too.
-
@Wayne-Workman
Here you go. -
@Tom-Elliott
Its already done. I used Gparted live cd. -
@sjensen I think, then, all you need is
vgextend FOGserver-vg /dev/FOGserver-vg/root
Edited as I copied from another site, and forgot to modify the vg_tecmint portion.
-
@Tom-Elliott said in Additional disk space is not showing up on Fog server:
vgextend FOGserver-vg /dev/FOGserver-vg/root
Sorry im still new to linux where would i place that at?
-
@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?