4

I need some help to fix some disk space issue. Actually I'm using a private vps cloud server with 50Gb of disk space.

When I run df -h, I get :

Filesystem      Size  Used Avail Use% Mounted on
/dev/root        48G   45G  570M  99% /
devtmpfs        2.0G  4.0K  2.0G   1% /dev
none            4.0K     0  4.0K   0% /sys/fs/cgroup
none            395M  524K  395M   1% /run
none            5.0M     0  5.0M   0% /run/lock
none            2.0G     0  2.0G   0% /run/shm
none            100M     0  100M   0% /run/user

df -i returns :

Filesystem      Inodes IUsed   IFree IUse% Mounted on
/dev/root      3141600 78065 3063535    3% /
devtmpfs        505084  1438  503646    1% /dev
none            505206     2  505204    1% /sys/fs/cgroup
none            505206   891  504315    1% /run
none            505206     2  505204    1% /run/lock
none            505206     1  505205    1% /run/shm
none            505206     2  505204    1% /run/user

But when I run du -sh / | sort -nr | head, I get :

du: cannot access â/sys/kernel/slab/L2TP/IPv6â: No such file or directory
du: cannot access â/sys/kernel/slab/L2TP/IPâ: No such file or directory
du: cannot access â/proc/391/task/391/fd/4â: No such file or directory
du: cannot access â/proc/391/task/391/fdinfo/4â: No such file or directory
du: cannot access â/proc/391/fd/4â: No such file or directory
du: cannot access â/proc/391/fdinfo/4â: No such file or directory
du: cannot access â/proc/402â: No such file or directory
du: cannot access â/proc/32350â: No such file or directory
du: cannot access â/proc/32354â: No such file or directory
du: cannot access â/proc/32356â: No such file or directory
du: cannot access â/proc/32360â: No such file or directory
du: cannot access â/proc/32363â: No such file or directory
du: cannot access â/proc/32368â: No such file or directory
8.9G    /

So I know that both commands don't return the same kind of informations. The first returns the filesystem disk usage, the other, the space used by files.

There is no mounted drive or device, and logs weight is ~167M.

I tried cat /proc/mounts which returns :

rootfs / rootfs rw 0 0
/dev/root / ext4 rw,relatime,errors=remount-ro,data=ordered 0 0
devtmpfs /dev devtmpfs rw,relatime,size=2020336k,nr_inodes=505084,mode=755 0 0
sysfs /sys sysfs rw,relatime 0 0
none /dev/pts devpts rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000 0 0
none /proc proc rw,nosuid,nodev,noexec,relatime 0 0
none /proc/sys/fs/binfmt_misc binfmt_misc rw,nosuid,nodev,noexec,relatime 0 0
none /sys/fs/cgroup tmpfs rw,relatime,size=4k,mode=755 0 0
none /sys/fs/fuse/connections fusectl rw,relatime 0 0
none /sys/kernel/security securityfs rw,relatime 0 0
none /run tmpfs rw,nosuid,noexec,relatime,size=404168k,mode=755 0 0
none /sys/fs/pstore pstore rw,relatime 0 0
none /run/lock tmpfs rw,nosuid,nodev,noexec,relatime,size=5120k 0 0
none /run/shm tmpfs rw,nosuid,nodev,relatime 0 0
none /run/user tmpfs rw,nosuid,nodev,noexec,relatime,size=102400k,mode=755 0 0
systemd /sys/fs/cgroup/systemd cgroup rw,nosuid,nodev,noexec,relatime,name=systemd 0 0

So I can I identify what is using so much space, as my du seems ok ? I tried autoclean and autoremove with no chance, every thing is all right.

BTW I also have a cron which runs datas and mysql dump and send it to Dropbox. But the 7 folders (7 days backup) only use 1.7gb of disk space.

guntbert
  • 13,134
Neovea
  • 141

3 Answers3

0

OP said

I figured it out.

Actually I was using a script to launch the backup and sync to dropbox of my app files. Things are : I have a sync script which tells what is the application to get the backups from, then sync it to dropbox. But the sync is both way.

And the temporary sync files are in the same folder as the sync script. For an unknown reason, the script was executed multiple times instead of once (probably a bad cron configuration). So each instance was using some disk space to sync and I finally ran out of disk space.

guntbert
  • 13,134
0

I use sudo du -hsx /* | sort -rh | head -n 40 found at ask ubuntu to scan folders level by level and found out it was docker that took the space. The result of this command is more comprehensive than du for a newbie like me.

Jonah
  • 1
0

Do you have any other partitions that you occasionally mount? I just tried to help a guy with a similar problem a few hours ago: 14.04 disk mount problem came our of left field As we found out together, he once mounted a partition for backup and it crashed (power fail I think). After that, the partition somehow stayed in a mounted state as an unaccessible folder in /media/ and also counted to the disk usage info. He finally just deleted the corrupted mountpoint to solve the issue.
So do you also have any dead mounts? Then you can try removing them (backup is always recommended! I take no responsibility for eventually damaged data!).

Byte Commander
  • 107,489
  • AFAIK, there is no other system or disk mounted. /media and /mnt remain empty (except for media in which there is a cdrom). – Neovea Jan 27 '15 at 12:50
  • 1
    It isn't corrupt; you simply have files in that directory and once you mount another fs on top of it, du can no longer see those files because the other fs is in the way. – psusi Jan 27 '15 at 13:41
  • Sorry I don't understand what you mean, I didn't mount anything, so... – Neovea Jan 27 '15 at 15:33