The perfect setup Ubuntu VM image - increase VM storage on ESXi 6.5?

Discussion in 'ISPConfig 3 Priority Support' started by JohnnyBeGood, Jan 20, 2018.

  1. JohnnyBeGood

    JohnnyBeGood Member HowtoForge Supporter

    Hi,
    I have this https://www.howtoforge.com/tutorial...l-pureftpd-bind-postfix-doveot-and-ispconfig/ that is setup and when the VM image was created it was only 30GB and I will need to expand it to 500GB because it will get filled up pretty fast.. In ESXi 6.5 https://prnt.sc/i37tgr I have already increased it but Ubuntu is not recognizing it?
    I have same issue with Debian VM downloaded from here. I've tried searching here and online and could not find anything that relates to this issue. Any ideas what to do?

    Code:
    [email protected]:~# df -h
    Filesystem                    Size  Used Avail Use% Mounted on
    udev                          3.9G     0  3.9G   0% /dev
    tmpfs                         797M  9.0M  788M   2% /run
    /dev/mapper/server1--vg-root   27G   26G     0 100% /
    tmpfs                         3.9G     0  3.9G   0% /dev/shm
    tmpfs                         5.0M  4.0K  5.0M   1% /run/lock
    tmpfs                         3.9G     0  3.9G   0% /sys/fs/cgroup
    /dev/sda1                     472M  105M  343M  24% /boot
    tmpfs                         797M     0  797M   0% /run/user/0
    [email protected]:~# 
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    You have to resize the partition and filesystem. You will find a lot of tutorials when you google for that.
     
  3. JohnnyBeGood

    JohnnyBeGood Member HowtoForge Supporter

    Thanks for pointing me in the right direction!

    After countless hours of trying and failing and restoring VM snapshots I was able to extend it and use up allocated 500GB!
    Bellow is what I had to do and I hope it saves someone time in case they run into same issue! :)

    http://prntscr.com/i3s7fs
    http://prntscr.com/i3s7zt
    http://prntscr.com/i3s89z
    http://prntscr.com/i3s8j5
    http://prntscr.com/i3s9kn
    http://prntscr.com/i3sahz
    http://prntscr.com/i3saso
    http://prntscr.com/i3sbek
    http://prntscr.com/i3sbek
    http://prntscr.com/i3sbva
    http://prntscr.com/i3scba
    http://prntscr.com/i3scmb
    http://prntscr.com/i3scyb
    http://prntscr.com/i3sddq
    Code:
    [email protected]:~# df -h
    Filesystem                    Size  Used Avail Use% Mounted on
    udev                          3.9G     0  3.9G   0% /dev
    tmpfs                         798M  9.0M  790M   2% /run
    /dev/mapper/server1--vg-root   27G   26G     0 100% /
    tmpfs                         3.9G     0  3.9G   0% /dev/shm
    tmpfs                         5.0M  4.0K  5.0M   1% /run/lock
    tmpfs                         3.9G     0  3.9G   0% /sys/fs/cgroup
    /dev/sda1                     472M  105M  343M  24% /boot
    tmpfs                         798M     0  798M   0% /run/user/0
    
    mount / shows 27GB in size
    note this path /dev/mapper/server1--vg-root
    Next two commands are important and are to use up all available free space:
    Code:
    [email protected]:~# lvextend -l +100%FREE /dev/mapper/server1--vg-root
      Size of logical volume server1-vg/root changed from 27.52 GiB (7045 extents) to 497.52 GiB (127365 extents).
      Logical volume root successfully resized.
    Code:
    [email protected]:~# resize2fs /dev/mapper/server1--vg-root
    resize2fs 1.42.13 (17-May-2015)
    Filesystem at /dev/mapper/server1--vg-root is mounted on /; on-line resizing required
    old_desc_blocks = 2, new_desc_blocks = 32
    The filesystem on /dev/mapper/server1--vg-root is now 130421760 (4k) blocks long.
    And voila it shows all allocated space now under /
    Code:
    [email protected]:~# df -h
    Filesystem                    Size  Used Avail Use% Mounted on
    udev                          3.9G     0  3.9G   0% /dev
    tmpfs                         798M  9.0M  790M   2% /run
    /dev/mapper/server1--vg-root  490G   26G  444G   6% /
    tmpfs                         3.9G     0  3.9G   0% /dev/shm
    tmpfs                         5.0M  4.0K  5.0M   1% /run/lock
    tmpfs                         3.9G     0  3.9G   0% /sys/fs/cgroup
    /dev/sda1                     472M  105M  343M  24% /boot
    tmpfs                         798M     0  798M   0% /run/user/0
    [email protected]:~#
    
     
    till likes this.

Share This Page