Results 1 to 17 of 17
  1. #1
    Join Date
    Aug 2009
    Posts
    79

    Disappearing Disk Space?

    I have some weird problems here:

    Code:
    # df -H
    Filesystem             Size   Used  Avail Use% Mounted on
    /dev/sda1              967G   917G      0 100% /
    tmpfs                  4.3G      0   4.3G   0% /dev/shm
    /usr/tmpDSK            508M    15M   467M   4% /tmp
    The root filesystem is only using 917 GB while the size is 967 GB. Where has the 50 GB gone to? CentOS tells me that the diskspace is indeed full already, so I wonder where is the disappearing space?

  2. #2
    Join Date
    Sep 2006
    Location
    Dallas, TX
    Posts
    333
    Is this shared hosting, a VPS, or dedicated server?

  3. #3
    Join Date
    Jan 2008
    Location
    St. John's, NL
    Posts
    2,201
    Odd, perhaps the file system or hard drive is corrupt?
    Cpanel/WHM • PHP • Perl • Ruby • Full Time Support
    LCWSoft - Canada web hosting (based in Newfoundland) since 2007
    Servers based in the US and Canada (Uptime Report)

  4. #4
    Join Date
    Aug 2009
    Posts
    79
    Dedicated. The hard drive shouldn't be corrupted, although it was once read-only but it was fixed.

    This system uses a lot of symbolic links, I mean, seriously, a lot. I once thought the number of files was the problem but after I cleaned all unnecessary symbolic links, the disk usage still remains like this. Any more ideas?

  5. #5
    Join Date
    Jan 2008
    Location
    St. John's, NL
    Posts
    2,201
    Try running

    fsck -fb /dev/hda1

    If I remember correctly, it will force a check and look for bad blocks on the drive as well.
    Cpanel/WHM • PHP • Perl • Ruby • Full Time Support
    LCWSoft - Canada web hosting (based in Newfoundland) since 2007
    Servers based in the US and Canada (Uptime Report)

  6. #6
    Join Date
    Aug 2009
    Posts
    79
    Can I do that while the server is running? Will it cause any data loss?

  7. #7
    Join Date
    Jan 2008
    Location
    St. John's, NL
    Posts
    2,201
    It is best to take the server offline to do that, just to be safe.
    Cpanel/WHM • PHP • Perl • Ruby • Full Time Support
    LCWSoft - Canada web hosting (based in Newfoundland) since 2007
    Servers based in the US and Canada (Uptime Report)

  8. #8
    Join Date
    Aug 2009
    Posts
    79
    What's the -b argument for? It's saying
    Code:
    -b superblock        Use alternative superblock
    for me...

  9. #9
    Join Date
    Jan 2008
    Location
    St. John's, NL
    Posts
    2,201
    Yes, you are right. I was given some faulty info, my apologies. The correct command is

    fsck -f /dev/hda1
    Cpanel/WHM • PHP • Perl • Ruby • Full Time Support
    LCWSoft - Canada web hosting (based in Newfoundland) since 2007
    Servers based in the US and Canada (Uptime Report)

  10. #10
    Join Date
    Aug 2009
    Posts
    79
    Ok, running it now. Will post an update when it's complete.

  11. #11
    Join Date
    Jan 2008
    Location
    St. John's, NL
    Posts
    2,201
    Ok, I would reboot when it's done and see if anything changes.
    Cpanel/WHM • PHP • Perl • Ruby • Full Time Support
    LCWSoft - Canada web hosting (based in Newfoundland) since 2007
    Servers based in the US and Canada (Uptime Report)

  12. #12
    Join Date
    Aug 2009
    Posts
    79
    Seems like the problem still persists.

    Code:
    # df -H
    Filesystem             Size   Used  Avail Use% Mounted on
    /dev/sda1              967G   613G   305G  67% /
    tmpfs                  4.3G      0   4.3G   0% /dev/shm
    /usr/tmpDSK            508M    15M   467M   4% /tmp
    I cleared up some files but they're irrelevant with the issue I think.

  13. #13
    Join Date
    Jan 2008
    Location
    St. John's, NL
    Posts
    2,201
    You cleared up 305G of files?

    Hmmm if you want to track down large files, here's a nice little command I've seen. It lists all files over 20mb, with the biggest ones listed first
    Code:
    find / -type f -size +20000k -exec ls -lh {} \; 2> /dev/null | awk '{ print $NF ": " $5 }'  | sort -nrk 2,2
    That will help you find out what the big files are. Feel free to post the output here when it's done, if you need further help.
    Cpanel/WHM • PHP • Perl • Ruby • Full Time Support
    LCWSoft - Canada web hosting (based in Newfoundland) since 2007
    Servers based in the US and Canada (Uptime Report)

  14. #14
    Join Date
    Aug 2009
    Posts
    79
    Well, the problem is if the number of files that are taking up the disk space is normal, used disk space + available disk space = disk size. In my server, it doesn't seem to appear so. There is 50 GB missing which I can't use it as storage. I do store large temporary files so its ok for me to clear large files once in a while but this certainly isn't gonna be the solution.

  15. #15
    Join Date
    Jan 2008
    Location
    St. John's, NL
    Posts
    2,201
    Is it a 1TB drive? I have heard of quite a few problems with them, like high failure rates.

    Still, did you run the last command I gave you? It's easy enough to overlook something
    Cpanel/WHM • PHP • Perl • Ruby • Full Time Support
    LCWSoft - Canada web hosting (based in Newfoundland) since 2007
    Servers based in the US and Canada (Uptime Report)

  16. #16
    Join Date
    Aug 2009
    Posts
    79
    Yeah, it should be a 1 TB hard drive. Before this there were failure of 2 750 GB hdds so my host switched 1 TB hard disk for me. Everything was working fine except this little weird problem...

    I'm running your command now.

  17. #17
    Join Date
    Aug 2009
    Posts
    79
    I ran your command, some log files showed up and I rotated them, but it still doesn't change. Disk used + Disk available != Disk size.

Similar Threads

  1. Use almost disk space will harm hard disk?
    By kalaj in forum Hosting Security and Technology
    Replies: 6
    Last Post: 04-29-2008, 07:38 AM
  2. Replies: 2
    Last Post: 01-26-2008, 11:05 PM
  3. Replies: 0
    Last Post: 06-01-2006, 04:53 PM
  4. Disappearing Disk Space!
    By billybatson in forum Hosting Security and Technology
    Replies: 3
    Last Post: 09-14-2003, 12:45 AM

Posting Permissions

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