Find the answer to your Linux question:
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 12
Hi, Can someone tell me what i should be doing in this case? cPanel sent this notifcation.. Drive Warning: /dev/sda2 (/var) is 82% full /var is 10GB and 82% is ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Apr 2008
    Posts
    6

    Drive Warning: /dev/sda2 (/var) is 82% full


    Hi,


    Can someone tell me what i should be doing in this case?
    cPanel sent this notifcation..
    Drive Warning: /dev/sda2 (/var) is 82% full

    /var is 10GB and 82% is used up.
    Here is the "du -sh *" for the var directory.
    Code:
    12K     account
    32K     aquota.user
    533M    cache
    497M    cpanel
    16K     crash
    28K     db
    28K     empty
    16K     ftp
    5.3G    lib
    8.0K    local
    36K     lock
    622M    log
    16K     lost+found
    4.0K    mail
    1.8M    named
    155M    netenberg
    8.0K    nis
    8.0K    opt
    4.0K    portsentry
    8.0K    preserve
    84K     profiles
    20K     quota.user
    780K    run
    593M    spool
    3.2M    tmp
    8.0K    tux
    15M     www
    24K     yp
    I guess i should be cleaning up the dir, however im not sure where and how to begin. Can someone please guide me what i should do?

  2. #2
    Super Moderator devils casper's Avatar
    Join Date
    Jun 2006
    Location
    Chandigarh, India
    Posts
    24,729
    Hi and Welcome !

    Which distro are you using?
    It is amazing what you can accomplish if you do not care who gets the credit.
    New Users: Read This First

  3. #3
    Linux Engineer jledhead's Avatar
    Join Date
    Oct 2004
    Location
    North Carolina
    Posts
    1,077
    this command was an awesome fine for me

    Code:
    du -k /foldername | sort -n | tail -10
    finds the 10 largest folder and sorts it by size. it looks like you already have the largest offenders though:
    cpanel, log, lib, and spool.

    so you could start with log and see if your logs are rotating properly or just rotating out until the drive fills up. spool, do you store mail on this server, I mean do you pop or mostly webmail (so it stays on the server)
    cpanel (no idea)
    lib, looks like you have lots of goodies installed. maybe my command above substituting /var/lib for the foldername will tell you the biggest offenders

  4. $spacer_open
    $spacer_close
  5. #4
    Just Joined!
    Join Date
    Apr 2008
    Posts
    6
    Thanks jleadhead.

    Ok....

    Here are the results from
    du -k /var/lib | sort -n | tail -10

    Code:
    62684   /var/lib/rpm
    73756   /var/lib/Pegasus
    132584  /var/lib/mysql/youclass_market
    212888  /var/lib/mysql/fastnet_plst1
    212968  /var/lib/mysql/ikarachi_ibrd1
    216736  /var/lib/mysql/xresults_plst1
    460844  /var/lib/mysql/traffix_mt
    703472  /var/lib/mysql/imsn_imsn
    5316160 /var/lib/mysql
    5468052 /var/lib

    I guess they are all Mysql databases ?? or are these databases using the disk temporarily?

    Would it be safe to delete anything here?

    Talker.

  6. #5
    Super Moderator devils casper's Avatar
    Join Date
    Jun 2006
    Location
    Chandigarh, India
    Posts
    24,729
    Quote Originally Posted by Talker View Post
    Thanks jleadhead.

    What do i have to do to reduce the DU ?
    Is there any way to clean up the pop or logs as you mentioned earlier?
    We can't help you unless you tell us which distro are you using.
    It is amazing what you can accomplish if you do not care who gets the credit.
    New Users: Read This First

  7. #6
    Just Joined!
    Join Date
    Apr 2008
    Posts
    6
    Quote Originally Posted by devils casper View Post
    We can't help you unless you tell us which distro are you using.
    How can i get the distro specifically?




    Here are the results from
    du -k /var/lib | sort -n | tail -10

    Code:
    62684   /var/lib/rpm
    73756   /var/lib/Pegasus
    132584  /var/lib/mysql/youclass_market
    212888  /var/lib/mysql/fastnet_plst1
    212968  /var/lib/mysql/ikarachi_ibrd1
    216736  /var/lib/mysql/xresults_plst1
    460844  /var/lib/mysql/traffix_mt
    703472  /var/lib/mysql/imsn_imsn
    5316160 /var/lib/mysql
    5468052 /var/lib

    I guess they are all Mysql databases ?? or are these databases using the disk temporarily?

    Would it be safe to delete anything here?

    Talker.

  8. #7
    Super Moderator devils casper's Avatar
    Join Date
    Jun 2006
    Location
    Chandigarh, India
    Posts
    24,729
    Execute this
    Code:
    cat /etc/*release
    cat /etc/*version
    Post output here.
    It is amazing what you can accomplish if you do not care who gets the credit.
    New Users: Read This First

  9. #8
    Just Joined!
    Join Date
    Apr 2008
    Posts
    6
    Quote Originally Posted by devils casper View Post
    Execute this
    Code:
    cat /etc/*release
    cat /etc/*version
    Post output here.
    CentOS release 4.6 (Final)

  10. #9
    Super Moderator devils casper's Avatar
    Join Date
    Jun 2006
    Location
    Chandigarh, India
    Posts
    24,729
    Okk ! Clean Cache files first.
    Code:
    su -
    yum clean all
    /var has library files and you should not delete those.
    Remove log files if you want.
    It is amazing what you can accomplish if you do not care who gets the credit.
    New Users: Read This First

  11. #10
    Just Joined!
    Join Date
    Apr 2008
    Posts
    6
    Quote Originally Posted by devils casper View Post
    Okk ! Clean Cache files first.
    Code:
    su -
    yum clean all
    /var has library files and you should not delete those.
    Remove log files if you want.
    Thanks.. that dropped the usage down to 72%...
    I dont think the log files are using much space. Anything else recommended?

Page 1 of 2 1 2 LastLast

Posting Permissions

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