Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Where did those 2GB go to?
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.

Where did those 2GB go to?

FreekFreek Member
edited April 2013 in General

This morning I tried to upload a 4.5GB file to my VPS. Around the 4GB mark, it started to complain it was out of space.
Which was strange, because when I checked it, it had something like 6GB+ free.

The past hour or so, I've been searching like crazy what's eating up my HDD space, but I am getting different results from different tools I use:

As you can see, ncdu tells me what folders are the largest and sorts them by size. '/data' is on a different disk/partition so we can ignore that. The rest of the folders are on the HDD which is causing the problems.
df -h says that 9.7GB is in use, whereas a rough calculation of ncdu's output gives me around 6.9GB of disk usage... Where did those 2GB go to?

This thread might look similar to this one: http://www.lowendtalk.com/discussion/comment/256128 although this time I'm wondering what actually ate the diskspace under 'used', instead of wondering why 'Size-Used > Avail'.

Thanks!

Comments

  • MrAndroidMrAndroid Member
    edited April 2013

    You might have a process still using a large file that you deleted. Have you tried rebooting to make sure?

  • ATHKATHK Member

    You should be able to see each file's size with -

    du -s (I think you can do -h for human readable)

    It'll give you the size of each file and possibly each folder, I haven't used it in ages.... Worth a shot if it tells you where that 2GB went you should also pipe it to a file du -s > filelist.txt

  • Yes, a file that is deleted but still held open will take space on disk until it's closed. Reboot and see if the free space returns.

  • FreekFreek Member
    edited April 2013

    @MrAndroid said: Have you tried rebooting to make sure?

    @rds100 said: reboot and see if the free space returns.

    I cannot reboot the VPS at the moment as it's in use (gameserver/voiceserver). If possible I would like to solve this without rebooting :)

    @ATHK said: du -s

    Already tried that, file is nowhere to be found.
    I also tried searching files larger than 1GB, nothing... /tmp/ is empty, /var/cache/ contains about 138MB.

  • rds100rds100 Member
    edited April 2013

    @Freek lsof | grep deleted
    Anything interesting?

    edit: the 7th column should be the size of the file

  • Host node full?

  • @taronyu said: Host node full?

    It does not look like its OpenVZ

  • FreekFreek Member

    @MrAndroid said: It does not look like its OpenVZ

    KVM :)

    @rds100 said: lsof | grep deleted

    Now we're getting somewhere:

    freek@ssd:~$ lsof | grep deleted
    wget        718      freek    0u      CHR  136,3        0t0      6 /dev/pts/3 (deleted)
    wget        718      freek    1u      CHR  136,3        0t0      6 /dev/pts/3 (deleted)
    wget        718      freek    2u      CHR  136,3        0t0      6 /dev/pts/3 (deleted)
    wget        718      freek    4w      REG  252,0 3127873973 141545 /home/freek/somefile.zip (deleted)
    

    The last one is particulary interesting, as I tried to download 'somefile.zip' yesterday and it failed on the 40% mark, which is around 2GB I believe. So this means the file is in reality still there?

    Thanks!!

  • Probably reserved root space?

  • @Freek the file is still there and the wget process that tried to download it is also still there. Kill the wget (pid 718) and you should be fine.

  • FreekFreek Member

    @rds100 said: @Freek the file is still there and the wget process that tried to download it is also still there. Kill the wget (pid 718) and you should be fine.

    My hero!

    Filesystem            Size  Used Avail Use% Mounted on
    /dev/mapper/ssd-root   14G  6.8G  6.5G  52% /
    udev                  363M  4.0K  363M   1% /dev
    tmpfs                 149M  296K  149M   1% /run
    none                  5.0M     0  5.0M   0% /run/lock
    none                  372M     0  372M   0% /run/shm
    /dev/vda1             228M  163M   54M  76% /boot
    /dev/vdb              9.9G  5.5G  3.9G  59% /data
    

    Thanks man! Definitely noting this down for future reference! I thought I was going mental!

  • @rds100 is the best!

  • RadiRadi Host Rep, Veteran

    When I first read the title of topic, I first thought about the 2 GB RAM oversold VPS.

  • @Radi said: 2 GB RAM oversold VPS

    I know! But it's 2 GB of RAM they're SO tempting!

  • Heh... THIS is why I usually use BTRFS with fstab option "compress=zlib" enabled.

  • @Radi said: I first thought about the 2 GB RAM oversold VPS.

    ^ This.

  • MaouniqueMaounique Host Rep, Veteran

    Our OVerZolds start from 4 gb :P

    @Radi said: When I first read the title of topic, I first thought about the 2 GB RAM oversold VPS.

  • Just curious, what is the output of:

    df -i

  • nothing to do with the above, but thought this might be funny for some :D

    Filesystem Inodes IUsed IFree IUse% Mounted on /dev/simfs 5242880 25201 5217679 1% / tmpfs 16384 4 16380 1% /lib/init/rw tmpfs 16384 1 16383 1% /dev/shm

  • @kandosan It's the principle though. I for one am a big fan, it's there when the one person does need it. +1

Sign In or Register to comment.