New on LowEndTalk? Please Register and read our Community Rules.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
Debian 7 minimal template too much disk space?
Hello,
I just got a new VPS and the support reinstalled it with a custom template:
http://download.openvz.org/template/precreated/contrib/debian-7.0-amd64-minimal.tar.gz
I use this template on nearly every server and it needs about 300MB disk space, but on my new box df -h says used 900MB. I didn't install anything and I already tried apt-get clean which saved me 70MB. Is there a way to list the largest folders/files in Debian? I already used google and found a command, but the output doesn't seem reasonable.
Thank you
Comments
ncdu sounds like what you're after.
du / -h --max-depth=1
... then most likely: du /usr -h --max-depth=1
Thanks looks great
Output is:
root@vserv03:/usr/share# du / -h --max-depth=1 1.4M /etc 5.1M /bin 4.0K /mnt du: cannot access
/proc/2621/task/2621/fd/4': No such file or directorydu: cannot access
/proc/2621/task/2621/fdinfo/4': No such file or directory du: cannot access
/proc/2621/fd/4': No such file or directorydu: cannot access
/proc/2621/fdinfo/4': No such file or directory 0 /proc 9.6M /lib 0 /sys 4.0K /selinux 4.0K /boot 4.0K /media 4.0K /lib64 44K /root 81M /var 26M /home 4.0K /srv 4.0K /tmp 117M /usr 4.0K /opt 5.0M /sbin 4.0K /dev 24K /run 244M /
It looks like it says my whole system needs 244MB, doesn't it? Why does df -h tell me this:
root@vserv03:/usr/share# df -h Filesystem Size Used Avail Use% Mounted on /dev/simfs 30G 908M 30G 3% / tmpfs 103M 24K 103M 1% /run tmpfs 5.0M 0 5.0M 0% /run/lock tmpfs 461M 0 461M 0% /run/shm
Regards
I don't get it, why does du say 244MB when df -h says 900MB?
df is showing you the space that is mounted on / du is showing you the space used in each of the directories... to match them up, add up all the space listed in du, minus the /run directory which is mounted seperately. looks like your /var, /usr, and /home directories are all mounted under /
And what's on /home ?
my little teamspeak server which uses 20MB
It might be the blocksize of the filesystem on the node, why bother about such a small problem?
Can you explain that a bit more please?
Well, I have 30GB and my teamspeak server needs 20MB, so I won't have any problems. But I just asked myself what causes this issue and I try to understand it
Blocksize, and/or open, unlinked files. Reboot and see if the numbers are closer.
Or it could be all the dd test files in /dev/null...
@trexos
Nice explaination:
Source
A reboot didn't fix it
@TheRedFox
ah I see thanks Do you think that these can make such a huge difference with a new installed VPS?
I'm wondering too, maybe you can ask the host what blocksize they use and ask another host(with less diskspace used for debian7) to compare it with.
(not sure if you can find out host file system properties on openvz)
edit: I'm gonna experiment with it, will post my findings here tomorrow for you
Thanks Looking forward to your results!
This is absolutely fine. Actually Debian 7.x takes about 900 MB of the disk space.
This is a minimal, and the exact same template uses 300MB on all my other vps.