0

I'm having hard times for a couple of weeks with this one... I'm using Ubuntu 16.04.2 LTS as a dev web server, it's running on virtualbox (win7) and these "no free space" available are coming again and again. I tried to remove every temp files, got it working for a few hours, then the same issue again (no surprise here). I googled it and tried to extend my disk size. I managed to extend it, allocate the new free space to my partition with gparted live cd (I'm running ubuntu in terminal mode, no startx installed) I thought I walked through this, it worked well for a few days, then no free space again... I doubled the disk size, so I'm kind of lost here...

IMO, my disk should have enough free space... I must have missed something obvious...

df -h gives me :

Filesystem                   Size  Used Avail Use% Mounted on
udev                         981M     0  981M   0% /dev
tmpfs                        201M  3.3M  197M   2% /run
/dev/mapper/ubuntu--vg-root  5.4G  5.0G   23M 100% /
tmpfs                       1001M     0 1001M   0% /dev/shm
tmpfs                        5.0M     0  5.0M   0% /run/lock
tmpfs                       1001M     0 1001M   0% /sys/fs/cgroup
/dev/sda1                    472M  105M  343M  24% /boot
tmpfs                        201M     0  201M   0% /run/user/1000

vm disk settings gparted screenshot

EDIT:
sudo du -ks /*

15940   /bin
104844  /boot
0       /dev
7072    /etc
895620  /home
0       /initrd.img
0       /initrd.img.old
636860  /lib
4       /lib64
16      /lost+found
8       /media
4       /mnt
4       /opt
du: cannot access '/proc/2921/task/2921/fd/4': No such file or directory
du: cannot access '/proc/2921/task/2921/fdinfo/4': No such file or directory
du: cannot access '/proc/2921/fd/4': No such file or directory
du: cannot access '/proc/2921/fdinfo/4': No such file or directory
0       /proc
16      /root
3332    /run
13232   /sbin
4       /snap
4       /srv
0       /sys
32      /tmp
1484508 /usr
2181768 /var
0       /vmlinuz
0       /vmlinuz.old

lsblk

NAME                  MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sda                     8:0    0 14.7G  0 disk
├─sda1                  8:1    0  487M  0 part /boot
├─sda2                  8:2    0    1K  0 part
└─sda5                  8:5    0 14.2G  0 part
  ├─ubuntu--vg-root   252:0    0  5.5G  0 lvm  /
  └─ubuntu--vg-swap_1 252:1    0    2G  0 lvm  [SWAP]
sr0                    11:0    1 1024M  0 rom
  • 3
    Find where the space is going. Try sudo du -ks /* then drill down. A very common such problem is large log files in /var/log/... which are not being rotated. You might also add to your question the output of lsblk. – user4556274 Mar 14 '17 at 14:17
  • 5GB is not a lot of space for your root / partition. If you free up a bit of space, you can install gnome-utils and launch the GNOME disk usage analyzer to see what is using up all your space. – Dorian Mar 14 '17 at 14:24
  • 1
    Agree with @user4556274. /var is unusually large. Drill down (sudo du -ks /var/*, etc.) and find out what is causing it. – Jos Mar 14 '17 at 14:45
  • 2
    @ThEBiShOp, as you can see in both your df -h and lsblk output, you are not using /dev/sda5 directly as disk storage, but are using the lvm volume /dev/mapper/ubuntu--vg-root contained on that virtual drive. You need to use lvextend to increase that volume to use the full ~14Go in /dev/sda5. I haven't done this recently enough to give a safe off-the-top-of-my-head command. Check manpages, and ensure you have backups of anything valuable before going ahead. – user4556274 Mar 14 '17 at 15:14
  • 2
    Here is my answer on superuser regarding lvextend, with more detail. Since you are not modifying swap, the lvextend in that answer should pretty well match what you need on its own. – user4556274 Mar 14 '17 at 15:16
2

Thanks to @user4556274, I read the answer he gave here, I just used the command :

sudo lvm lvextend -r -l +100%FREE /dev/ubuntu-vg/root

and I got the free space I needed

  • I will, since I answered my own question, I have to wait 2 days. – ThEBiShOp Mar 15 '17 at 8:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.