2

I have an Ubuntu Server installation 14.04 that I used the ubuntu default LVM partitioning by the installer (With the /home, /, /tmp... as separate partitions) and I never thought anything of it and installed a few apps and now, I went to apply updates and it tells me there is no disk space. The installer created a 350M / partition and it's full but I have a bunch of free space;

/dev/mapper/owncloud--vg-root  321041   310156   0        100%  /
none                           4        0        4        0%    /sys/fs/cgroup
udev                           1010156  4        1010152  1%    /dev
tmpfs                          204268   1028     203240   1%    /run
none                           5120     0        5120     0%    /run/lock
none                           1021320  0        1021320  0%    /run/shm
none                           102400   0        102400   0%    /run/user
/dev/mapper/owncloud--vg-usr   7420304  1651456  5368876  24%   /usr
/dev/mapper/owncloud--vg-var   2817056  488112   2166128  19%   /var
/dev/sda1                      240972   38065    190466   17%   /boot
/dev/mapper/owncloud--vg-tmp   368615   2188     342875   1%    /tmp
/dev/mapper/owncloud--vg-home  7891880  17972    7449972  1%    /home

I've been going through the forums for a while and have tried everything I've found to clean up space but nothing is working. I have no old kernels, tried cleaning up packages, removed lost+found, deleted a duplicate website folder I had. Everything seems to be working OK so I'm wondering if this is an issue or is this just the way Ubuntu should have partitioned the drive? Thanks,

steeldriver
  • 136,215
  • 21
  • 243
  • 336
Ryan H
  • 21
  • 1
  • 3
  • I have edited what I assume to be df output into a format that makes it easier to read: please check that it is correct. Since you have separate boot, usr, and home volumes I'd suspect there are some 'big' files that shouldn't be there in /etc or /root (which is empty, by default). Try something like sudo find /etc -size +1M -ls (fwiw, I found a core file in mine, which was bumping /etc up from ~16M to over 400M). – steeldriver Jul 15 '15 at 13:04
  • Try sudo vgdisplay. If it shows more than a trivial amount of free space available (on the Free PE / Size line), you can expand your /dev/mapper/owncloud--vg-root logical volume to get more space. This is most easily done with a tool like the GUI system-config-lvm. Even if there's not much free space, you should be able to shrink another logical volume by a bit to make more room. – Rod Smith Jul 15 '15 at 17:16
  • @steeldriver: I ran the find command and it didn't return anything for /etc or /root. There are some logfiles that match (in /var) but even they aren't that big. Thanks for the response though. – Ryan H Jul 16 '15 at 13:51
  • @RodSmith: The output from my sudo vgdisplay isn't promising; --- Volume group --- ... VG Size 19.76 GiB PE Size 4.00 MiB Total PE 5058 Alloc PE / Size 5052 / 19.73 GiB Free PE / Size 6 / 24.00 MiB VG UUID xhUTru-ZfHp-f1z8-bviv-KKiw-fbxE-VHK2Ae So it looks like it is actually full. I just need to find out what's filling it up.... – Ryan H Jul 16 '15 at 13:51
  • I am running this in a Virtual environment and I have two external mounts setup (/mnt/) and they are very large, this shouldn't affect local free space correct? – Ryan H Jul 16 '15 at 13:56
  • Is it possible that one of the /mnt filesystems became unmounted at some point, and you wrote data to /mnt/whatever? When that happens, space on / gets used up but the files get hidden when you remount the external drive – steeldriver Jul 16 '15 at 14:01
  • I think I found the culprit in /boot; .... -rw-r--r-- 1 root root 20383472 Jul 16 09:01 initrd.img-3.16.0-30-generic ... This is a something that VMWare Fusion builds when running VMWare Tools. I'll have to find out if there is a way to shrink that. Just to be sure that I'm reading the size right, that is just over 20GB correct? Since my partition is only ~20GB that would make sense. – Ryan H Jul 16 '15 at 14:08
  • According to your df output, /boot is a separate partition and is only 17% full - if that output is from ls, it is probably 20M (remember ls defaults to bytes whereas probably df defaults to 1K blocks - you might find things easier to interpret if you add the -h or --human-readable switch) – steeldriver Jul 16 '15 at 14:19

1 Answers1

1

It's pretty rare these days to find /usr split off into its own partition (or logical volume, as you've got). I used to do it that way myself, but I haven't had such a system for a while now. I've just checked a couple of systems I have and, subtracting out the space used by /usr, /var, and /home (when they're not separate filesystems), I've found disk space used in / alone in the 370-500MiB range.

Your /dev/mapper/owncloud--vg-root logical volume, by contrast, is just 313MiB in size. Thus, it's not really surprising that you're running out of space, and even if you delete some files, you'll probably be in the same boat again very soon. I recommend you either re-install with a larger /, and perhaps keep /usr and/or /var within that / (in which case it should be much larger -- say, 10-30GiB); or use system-config-lvm or the LVM command-line tools to resize your logical volumes and grow /. Given the space used on my systems, I'd make it at least 1GiB. There are several questions and answers on the latter topic on this site, such as:

A broader Web search turns up quite a few tutorials on this subject, too.

Rod Smith
  • 44,284
  • 7
  • 63
  • 105