Page 1 of 3 123 LastLast
Results 1 to 10 of 30

Thread: HDD is out of space but not sure why

  1. #1
    Join Date
    Jul 2006
    Beans
    486

    HDD is out of space but not sure why

    One of my Ubuntu boxes has a 160GB HDD which keeps running out of space. The reason I think this is an error or some program misbehaving is that if I reboot the box 2 times, it frees up 40-50GB of space. And it works great with all that free space for a few days or a week, then I start getting system messages again, saying I am running out of space. Another couple of reboots "fixes" this again.

    If I go to Examine the drive, it shows me that most of the files are in my /home/<user> directory, but underneath that directory the Disk Usage Analyze shows nothing. It sounds strange, but it shows all these files in my /home/<user> directory, but underneath it shows all of my folders are barely used. I can provide a screenshot of this if needed.

    I would guess that I have a program running somewhere that is doing this. I do have a Subsonic server running on this box 100% of the time. But how can I verify this? Is there a way to see where temp files or cached files are going, and to remove them without a reboot? Is there a way to verify if it is the Subsonic server app? I only mention this app because it is the only thing I have running 100% of the time.

    Let me know what other info I need to provide.

  2. #2
    Join Date
    Jul 2011
    Beans
    3,037
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: HDD is out of space but not sure why

    My guess would be that the files are located in a hidden directory (starting with ".") and that disk usage application maybe ignores these directories.

  3. #3
    Join Date
    Mar 2009
    Beans
    1,323

    Re: HDD is out of space but not sure why

    There's probably a tool for this, but I'll show you what I do:

    cd /
    sudo du -hs `ls -A`

    Notice the type of quotes here. It's the one to the left of the 1 key on a US keyboard.

    The first time you do this it will take awhile, subsequent searches will be faster.

    This prints a human-readable total size of every folder, visible or not, at the current level. This is a size including all contents.

    Look for the biggest stuff, ignore anything that doesn't end with G for the size. Scan the entire directory first to be sure you understand what's going on at that level, then pick a directory, cd into it and do it again.

  4. #4
    Join Date
    Aug 2011
    Beans
    322
    Distro
    Xubuntu 13.04 Raring Ringtail

    Re: HDD is out of space but not sure why

    Another thing to check: do you delete a lot of files through the file manager? Sometimes this will not truly delete the files but moves them to a trash directory which does not always show up as being in the trash bin. Empty the trash bin and then search a few of the directories for a hidden directory .Trash something or other. See if there are any files left in there. Deleting a file with the rm command on the command line does in fact delete a file.

  5. #5
    Join Date
    Apr 2005
    Location
    Finland/UK
    Beans
    Hidden!
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: HDD is out of space but not sure why

    I recommend checking the disk usage with tools like df and du.

    While the Disk Usage Analyzer is an excellent tool, it's output can be rather confusing if you don't know exactly what it's doing. For example the percentages it displays are not about how much there is available/used space, but instead about how large percentage of the used space in the parent folder a certain file/folder is taking. And to complicate things even more, depening on your Ubuntu version the tool might also count in all the mounted filesystems unless you specifically tell it to only scan a specific partition, which of course means that you don't get any usefull information about free/used space on a certain filesystem. (The main purpose of the tool it to analyze where space is being used, not how much free space there is). Also it's usually running as your normal user, which means it's not even able to scan things when the permissions only allow root to access them.

  6. #6
    Join Date
    Jul 2006
    Beans
    486

    Re: HDD is out of space but not sure why

    Quote Originally Posted by 1clue View Post
    There's probably a tool for this, but I'll show you what I do:

    cd /
    sudo du -hs `ls -A`

    Notice the type of quotes here. It's the one to the left of the 1 key on a US keyboard.

    The first time you do this it will take awhile, subsequent searches will be faster.

    This prints a human-readable total size of every folder, visible or not, at the current level. This is a size including all contents.

    Look for the biggest stuff, ignore anything that doesn't end with G for the size. Scan the entire directory first to be sure you understand what's going on at that level, then pick a directory, cd into it and do it again.
    I'm going to try this when I get home. My remote connection to the box stopped working, I expect due to no more HDD space.


    Quote Originally Posted by agillator View Post
    Another thing to check: do you delete a lot of files through the file manager? Sometimes this will not truly delete the files but moves them to a trash directory which does not always show up as being in the trash bin. Empty the trash bin and then search a few of the directories for a hidden directory .Trash something or other. See if there are any files left in there. Deleting a file with the rm command on the command line does in fact delete a file.
    Sometimes, yes. I also empty the trash bin after I delete from the GUI, tho. I'll look for the .trash folder, that is a good idea. I've seen this folder several times on a external USB device that I mount and use, and then move to another computer. Windows doesn't hide the .filename folders like Ubuntu does.

  7. #7
    Join Date
    Mar 2009
    Beans
    1,323

    Re: HDD is out of space but not sure why

    Somehow I keep thinking you have a log file that's being spammed uncontrollably. Probably that's in /var/log, but it doesn't have to be.

  8. #8
    Join Date
    Jul 2006
    Beans
    486

    Re: HDD is out of space but not sure why

    Quote Originally Posted by 1clue View Post
    There's probably a tool for this, but I'll show you what I do:

    cd /
    sudo du -hs `ls -A`

    Notice the type of quotes here. It's the one to the left of the 1 key on a US keyboard.

    The first time you do this it will take awhile, subsequent searches will be faster.

    This prints a human-readable total size of every folder, visible or not, at the current level. This is a size including all contents.

    Look for the biggest stuff, ignore anything that doesn't end with G for the size. Scan the entire directory first to be sure you understand what's going on at that level, then pick a directory, cd into it and do it again.

    OK here is the result of the command above:

    4.0K .dmrc
    4.0K Documents
    4.0K Downloads
    12K examples.desktop
    68K .fontconfig
    220K .gconf
    24K .gnome2
    0 .goutputstream-9TGVZW
    392K .gstreamer-0.10
    4.0K .gtk-bookmarks
    du: cannot access `.gvfs': Permission denied
    4.0K .ICEauthority
    80M .local
    12K .mission-control
    17M .mozilla
    4.0K Music
    4.0K Pictures
    4.0K .profile
    40K .pulse
    4.0K .pulse-cookie
    110G Samson
    8.0K .ssh
    4.0K Templates
    304K .thumbnails
    4.0K Videos
    4.0K .Xauthority
    8.0K .xscreensaver
    1.5T .xsession-errors
    143G .xsession-errors.old
    I'm not sure where this .xsession-errors folder or file is. I can't see it in the Videos directory. Obviously this is causing my problem but not sure what errors there are and not sure how to fix.
    Last edited by kc5hwb; July 6th, 2013 at 04:00 PM.

  9. #9
    Join Date
    May 2006
    Location
    Milwaukee,WI
    Beans
    6,107
    Distro
    Xubuntu 14.04 Trusty Tahr

    Re: HDD is out of space but not sure why

    Check out my Blog about my life and computer software and hardware. http://ubuntuaddicted.blogspot.com/
    My YouTube channel:
    http://www.youtube.com/ubuntuaddicted

  10. #10
    Join Date
    Jul 2007
    Location
    Magic City of the Plains
    Beans
    Hidden!
    Distro
    Xubuntu 14.04 Trusty Tahr

    Re: HDD is out of space but not sure why

    Quote Originally Posted by kc5hwb View Post
    I'm not sure where this .xsession-errors folder or file is. I can't see it in the Videos directory. Obviously this is causing my problem but not sure what errors there are and not sure how to fix.
    Code:
    rm .xsession-errors*

Page 1 of 3 123 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •