Ubuntu Server 18.04 LVM out of space with improper default partitioning Rumi, February 1, 2020 Problem Statement: I installed Ubuntu Server 18.04 with the LVM option and left the default partition setup. Now my main drive only has 4GB in a 1TB hard drive. How can I fix this without starting from scratch? Results of df -h : Filesystem Size Used Available Use% Mounted on udev 16G 0 16G 0% /dev tmpfs 32G 1.7M 32G 1% /run /dev/mapper/ubuntu--vg-ubuntu--lv 3.9G 3.6G 92M 98% / tmpfs 16G 0 16G 0% /dev/shm tmpfs 5.0M 0 5.0M 0% /run/lock tmpfs 16G 0 16G 0% /sys/fs/cgroup /dev/loop0 87M 87M 0 100% /snap/core/4917 /dev/loop1 3.2M 3.2M 0 100% /snap/stress-ng/471 /dev/loop2 90M 90M 0 100% /snap/core/6130 /dev/sda2 976M 143M 766M 16% /boot tmpfs 3.2G 0 3.2G 0% /run/user/1000 Resolution: Had the exact same problem with a fresh install of Ubuntu Server 18.04.1. What I had to do was: # We need to resize the logical volume to use all the existing and free space of the volume group $ lvm lvm> lvextend -l +100%FREE /dev/ubuntu-vg/ubuntu-lv lvm> exit # And then, we need to resize the file system to use the new available space in the logical volume $ resize2fs /dev/ubuntu-vg/ubuntu-lv resize2fs 1.44.1 (24-Mar-2018) Filesystem at /dev/ubuntu-vg/ubuntu-lv is mounted on /; on-line resizing required old_desc_blocks = 1, new_desc_blocks = 58 The filesystem on /dev/ubuntu-vg/ubuntu-lv is now 120784896 (4k) blocks long. # Finally, you can check that you now have available space: $ df -h Filesystem Size Used Avail Use% Mounted on udev 3.9G 0 3.9G 0% /dev tmpfs 786M 1.2M 785M 1% /run /dev/mapper/ubuntu--vg-ubuntu--lv 454G 3.8G 432G 1% / If you didn’t customize the LVM settings, the names for the volume group and logical volume should be the same as mine (ubuntu-vg and ubuntu-lv respectively). If your partition is completely full, you could get a no space left error when trying to resize the logical volume like: lvm> lvextend -l +100%FREE /dev/ubuntu-vg/ubuntu-lv /etc/lvm/archive/.lvm_computer: write error failed: No space left on device The easiest way to fix this is by removing apt cache (it will get regenerated next time you do apt update), which should give you more than enough space to complete the operation: $ rm -rf /var/cache/apt/* Related Administrations Configurations (Linux) LVMUbuntu
Group-Office installation on Debian 6.x April 1, 2012April 1, 2012 I used the auto installation as guided by the group-office wiki. However, for conveniences, quoting the contents once again: Easy installation on a dedicated Debian or Ubuntu server This is the easiest way of installing Group-Office. With the debian packages everything is configured automatically and Group-Office updates will be installed… Read More
2 Gateways or Multiple Gateway on a single CentOS box May 21, 2015 Scenerio- eth0- 172.30.0.100 | Gateway- 172.30.0.97 eth1- 192.168.2.247 | Gateway- 192.168.2.1 Need to connect to SIP BOX destination (fictitious)- 202.140.1.1 eth0 has not internet access but it uses the mentioned (172.30.0.97) as gateway to reach 202.140.1.1 server eth0 has internet access by using 192.168.2.1 gateway. Here goes the configuration on /etc/sysconfig/network-scripts/ifcfg-eth0… Read More
Resetting CentOS 5 Root Password October 7, 2013 If you have forgotten the root password it is possible to set a new one as follows: Interrupt the boot at the GRUB stage and boot to runlevel 1, AKA single user mode. Interrupt GRUB by typing a character such as "space" then append to the kernel line by typing… Read More