I've got an Ubuntu Server 16.04 VM running in VirtualBox 5.0, with a 20GB drive attached (originally created as a 10GB in a VM called "box-template", then extended after the VM was cloned and renamed).
Today, when I tried using the terminal autocomplete, I got a message stating -bash: cannot create temp file for here-document: No space left on device
. When I run df -i
, I see the following output:
media@box-library:~$ df -i
Filesystem Inodes IUsed IFree IUse% Mounted on
udev 251035 475 250560 1% /dev
tmpfs 256039 609 255430 1% /run
/dev/mapper/box--template--vg-root 491520 491520 0 100% /
tmpfs 256039 2 256037 1% /dev/shm
tmpfs 256039 3 256036 1% /run/lock
tmpfs 256039 16 256023 1% /sys/fs/cgroup
/dev/sda1 124928 313 124615 1% /boot
//10.0.0.5/media2 183148544 23791 183124753 1% /media/media2
//10.0.0.5/media1 183148544 7496 183141048 1% /media/media1
tmpfs 256039 4 256035 1% /run/user/1000
At this point, I discovered this answer which helped me to slightly better understand what this particular partition actually is. I tried looking through the HOWTO for LVM, but unfortunately my limited knowledge of linux means that I don't even know where to start in that document...
When I start up my VM booting from a GParted live CD, my "19.52 GiB" box-template-vg
partition still shows "10.03 Gib" free.
Am I missing something important here? Or did I do something wrong when I cloned the VM and resized the drive?
Edit: Screenshot for comment request to run lvscan
:
Edit 2: Including output of lvdisplay
:
Just a quick side note: I actually cloned the "template" VM twice, but the other VM does not need more drive space at the moment. The df -i
command on that one shows my 35% for the "IUse%" column, so in future if/when I need to resize the virtual drive on that machine, is there any thing special I need to keep in mind to prevent this issue?
/dev/sda5
volume and try to expand it from gparted, let see... – George Udosen Feb 25 '17 at 10:16/dev/sda2
. Are you suggesting I do that to try shrink then expand the partition? – Feb 25 '17 at 11:20pvresize /dev/sda5
showedPhysical volume "dev/sda5" changed
, but trying to runlvextend -l +100%FREE /dev/sda5
says"/dev/sda5": Invalid path for Logical Volume
. After this, GParted still shows everything exactly as seen in the screenshot above. – Feb 25 '17 at 11:31lvscan
to see the path – George Udosen Feb 25 '17 at 11:36sudo lvdisplay
– George Udosen Feb 25 '17 at 11:56sudo lvextend -l +100%FREE /dev/box-template-vg/root
, thensudo e2fsck -f /dev /box-template-vg/root
, finallysudo resize2fs /dev/box-template-vg/root
– George Udosen Feb 25 '17 at 12:08/dev
to the path and run assudo lvextend -l +100%FREE /dev/box-template-vg/root
, which said responded withSize of logical volume <name> changed from 7.50 GiB (1919 extents) to 17.52 GiB (4486 extents)
, but the next two commands throw the errorse2fsck: No such file or directory...
andopen: No such file or directory...
respectively, regardless of whether I prefix the path with/dev
or not. – Feb 25 '17 at 12:16