The initial storage node is much smaller than the disk space I gave my VM?


  • To preface, I apologize in advance for being incredibly green and new to both Fog and Linux. I’ve tried finding answering in the documentation, but unfortunately I’ve not found anything that is shedding light on what I did wrong during the initial install/setup or if I’ve done things correctly but need to take some more steps to resolve my “issue”.

    I created an Ubuntu Server 20.04.1 VM on my ESXI host in my homelab, giving it 2 processors, 8 gigs of RAM, and 1.5 TB of disk space. After I got the VM all spun up and installed GIT and Fog, I log in. When I get to the dashboard and look at my storage node disk usage rather than seeing the full 1.5 TB of space I gave the VM initially, Fog is telling me that 8.27gig are being used and only 177.57 gigs are free.

    I initially thought this might be due to my having thin provisioned the disk for the VM initially, but I deleted the first VM and recreated it using thick provisioning and still see the same thing.

    Again, I realize this is probably an extremely noob type of question to ask, and there is likely a simple solution or something that I did wrong/overlooked. Any advice or direction for a kid that doesn’t really know what the hell he’s doing would be greatly appreciated.


  • @sebastian-roth said in The initial storage node is much smaller than the disk space I gave my VM?:

    sudo resize2fs -p /dev/mapper/ubuntu–vg-ubuntu–lv

    That all did the trick, VM is now showing the full allocated disk space!

    Thank you so, so much for your help, and also for giving me a little homework! I’ll read up on LVM as you said.

    Thank you again for your help, I can’t thank you enough!

  • Moderator

    @tomslick Hehe! Good you didn’t get it the wrong way. When I said “interesting setup” I had in mind that something went wrong with this but I don’t think it’s something you caused! 😀

    I still have no idea what could have caused this and we’ll probably never find out. Nevermind, we’ll be able to fix it now that we have all the information gathered.

    1. The partition layout is correct and sda3 as big as it should be (sfdisk).
    2. Physical volume (pvs) as well as volume group (vgs) are both showing 1.5 TB size too. Probably best if you read up on LVM to get an idea on how this stuff works.
    3. Logical volume (lvscan) is only 200 GB and therefore the filesystem can’t reach the size you expect it to be.

    So first step is to expand/extend the logical volume (which can be done without too much trouble as LVM was made with for this kind of thing) and second enlarge the EXT4 filesystem to use that new space.

    May I ask you to take a snapshot of the VM before you proceed. Usually this is not causing any problems but as we have an unexpected setup here you never know.

    Then expand the logical volume: sudo lvextend -l +100%FREE /dev/mapper/ubuntu--vg-ubuntu--lv (pay close attention to any output of this command to make sure this worked)

    Now expand the filesystem: sudo resize2fs -p /dev/mapper/ubuntu--vg-ubuntu--lv (again check the output - feel free to post that here if you are in doubt)


  • @sebastian-roth
    You’re being very kind a polite, I really appreciate it. I know enough to know that “this is an interesting setup” usually is a polite version for “you did this in a weird/stupid way”, (LoL) so thank you for going out of your way to been nice. Honestly, I appreciate you and your help and methods. 🙂

    Here’s the output from the new commands you gave:
    output.PNG

  • Moderator

    @tomslick This is an interesting setup as the disk and partition seem to be large enough but the LVM does not fill the space available. Can’t really Imagine why this happened when this was setup.

    See, sda3 has 321912217 sectors which accounts for 1.5 TB roughly (3219122176 * 512 / 1024 / 1024 / 1024 / 1024) - the size you obviously made the disk.

    Anyhow, you can extend the LVM and filesystem to fill that gap. But we need to find out more about the physical and volume group before we dive into fixing this.

    sudo pvs
    sudo vgs
    mount
    

  • @sebastian-roth Here’s the output you requested:
    output.PNG

    Thanks so much for your assistance, it’s really greatly appreciated.

  • Moderator

    @tomslick OK, this Ubuntu installation was setup on logical volume (LVM). Though I still wonder where the rest of the 1.5 TB is hiding. Please run the following commands and post the output:

    sfdisk -d /dev/sda
    lvscan -a
    

  • @sebastian-roth Sorry for the delayed response. Here is the output you requested:
    Output.PNG

  • Moderator

    @tomslick Please run the command sudo df -h and post the output here in the forums.

397
Online

9.0k
Users

15.6k
Topics

145.1k
Posts