Welcome to Pandora FMS Community!

Find answers, ask questions, and connect with our community around the world.

  • /dev/sda2 disk space

    Posted by fonta on March 22, 2013 at 13:44

    Hi, i have a little problem with my /dev/sda2 disk space, its always grow up and i don’t know ho to free some space…

    pandora402:/home/admin # df -h
    Filesystem            Size  Used Avail Use% Mounted on
    rootfs                58G  50G  5.2G  91% /
    devtmpfs            1003M  100K 1003M  1% /dev
    tmpfs                1006M  4.0K 1006M  1% /dev/shm
    /dev/sda2              58G  50G  5.2G  91% /
    /dev/sda3              20G  173M  19G  1% /home

    How can i resolve this problem?
    Thanks

    fonta replied 11 years, 8 months ago 2 Members · 14 Replies
  • 14 Replies
  • Mario

    Administrator
    March 22, 2013 at 14:20
    1150 Karma points
    Community rank: tentacle_master_icon Tentacle Master
    Like it
    Up
    0
    Down
    Drop it
    ::

    Hello

    Have you configured to run every day pandora_db.pl tool?

    http://www.openideas.info/wiki/index.php?title=Pandora:Documentation_en:Server_Management#Database_management

    Regards

  • fonta

    Member
    March 22, 2013 at 17:37
    0 Karma points
    Community rank: tentacle-noob-1 Tentacle noob
    Like it
    Up
    0
    Down
    Drop it
    ::

    hi mario, i’m using the vm image and that script already exists on it!
    i try to run the script but the result is always the same…

    pandora402:/etc/cron.daily # df -h
    Filesystem            Size  Used Avail Use% Mounted on
    rootfs                58G  50G  5.2G  91% /
    devtmpfs            1003M  100K 1003M  1% /dev
    tmpfs                1006M  4.0K 1006M  1% /dev/shm
    /dev/sda2              58G  50G  5.2G  91% /
    /dev/sda3              20G  173M  19G  1% /home

  • Mario

    Administrator
    March 22, 2013 at 18:01
    1150 Karma points
    Community rank: tentacle_master_icon Tentacle Master
    Like it
    Up
    0
    Down
    Drop it
    ::

    Check your Setup – Performance configuration and decreases the days if you don’t need so much information.

    Then run pandora_db.pl, and check if decreases the size.

    If you need a lot of information i recommend you a history database in other PC. (http://www.openideas.info/wiki/index.php?title=Pandora:Documentation_en:Console_Setup#History_database)

    Regards

  • fonta

    Member
    March 25, 2013 at 13:25
    0 Karma points
    Community rank: tentacle-noob-1 Tentacle noob
    Like it
    Up
    0
    Down
    Drop it
    ::

    I’d try to decrease the days and run the script but the free disk space don’t change.

    now i can decrease /dev/sda3 and assign some free space to /dev/sda2 but i don’t know what i have to do if pandora continue to eats space.

  • Mario

    Administrator
    March 25, 2013 at 14:09
    1150 Karma points
    Community rank: tentacle_master_icon Tentacle Master
    Like it
    Up
    0
    Down
    Drop it
    ::

    Hello

    Have you checked the pandora_console/attachment size?

    http://openideas.info/wiki/index.php?title=Pandora:Documentation_en:Console_Setup.

    You can delete this temporaly files if this folder has very large size

    Regards

  • fonta

    Member
    March 25, 2013 at 17:28
    0 Karma points
    Community rank: tentacle-noob-1 Tentacle noob
    Like it
    Up
    0
    Down
    Drop it
    ::

    Hi Mario, i’d deleted all the files in that directory but free space not increase…

    admin@pandora402:~> df -h
    Filesystem            Size  Used Avail Use% Mounted on
    rootfs                58G  51G  4.4G  92% /
    devtmpfs            1003M  100K 1003M  1% /dev
    tmpfs                1006M  4.0K 1006M  1% /dev/shm
    /dev/sda2              58G  51G  4.4G  92% /
    /dev/sda3              20G  173M  19G  1% /home

  • Mario

    Administrator
    March 25, 2013 at 18:25
    1150 Karma points
    Community rank: tentacle_master_icon Tentacle Master
    Like it
    Up
    0
    Down
    Drop it
    ::

    Have you checked the pandora logs size ( /srv/www/htdocs/pandora_console/pandora_console.log, /var/log/pandora_server.log and  .error)?

    Check if you have configurated verbosity to 10, in pandora_server.conf, and change it to 1.

    Regards

  • fonta

    Member
    March 26, 2013 at 14:56
    0 Karma points
    Community rank: tentacle-noob-1 Tentacle noob
    Like it
    Up
    0
    Down
    Drop it
    ::

    nothing to do, the log flie is some KB and the verbosity is sets to 1

    now i reduce /dev/sda3  and assign some other GB to /dev/sda2…

  • Mario

    Administrator
    March 26, 2013 at 15:50
    1150 Karma points
    Community rank: tentacle_master_icon Tentacle Master
    Like it
    Up
    0
    Down
    Drop it
    ::

    Hi

    What is the space occupied by the pandora database?

    You can see it with this query:
    SELECT table_schema “Data Base Name”, sum( data_length + index_length ) / 1024 / 1024 “Data Base Size in MB”
    FROM information_schema.TABLES GROUP BY table_schema ;

    Are you using this server to another function?

    Regards

  • fonta

    Member
    March 26, 2013 at 15:55
    0 Karma points
    Community rank: tentacle-noob-1 Tentacle noob
    Like it
    Up
    0
    Down
    Drop it
    ::

    I try that query, this is the result

    information_schema 0.00781250 MB
    pandora 382.08541489 MB

    i use Pandora FMS 4.0.2 vm image only for monitoring servers and routers

    Total agents 358
    Monitor checks 1723

    thank

  • Mario

    Administrator
    March 26, 2013 at 16:11
    1150 Karma points
    Community rank: tentacle_master_icon Tentacle Master
    Like it
    Up
    0
    Down
    Drop it
    ::

    Ok

    Your database size is normal and isnt the size problem.

    Check it “ls -l  /var/lib/mysql” and see if you have mysql-bin files.

    Regards

  • fonta

    Member
    March 26, 2013 at 17:34
    0 Karma points
    Community rank: tentacle-noob-1 Tentacle noob
    Like it
    Up
    0
    Down
    Drop it
    ::

    Bingo!!
    there are a lot of mysql-bin.0000xxx files..

    -rw-rw—- 1 mysql mysql 1.1G Jul 31  2012 mysql-bin.000011
    -rw-rw—- 1 mysql mysql 1.1G Aug  8  2012 mysql-bin.000012
    -rw-rw—- 1 mysql mysql 1.1G Aug 16  2012 mysql-bin.000013
    -rw-rw—- 1 mysql mysql 1.1G Aug 23  2012 mysql-bin.000014
    -rw-rw—- 1 mysql mysql 1.1G Aug 30  2012 mysql-bin.000015
    -rw-rw—- 1 mysql mysql  21M Aug 30  2012 mysql-bin.000016
    -rw-rw—- 1 mysql mysql 151M Aug 31  2012 mysql-bin.000017
    -rw-rw—- 1 mysql mysql 1.1G Sep  6  2012 mysql-bin.000018
    -rw-rw—- 1 mysql mysql 341M Sep  8  2012 mysql-bin.000019
    -rw-rw—- 1 mysql mysql 121M Sep  9  2012 mysql-bin.000020
    -rw-rw—- 1 mysql mysql 137M Sep 10  2012 mysql-bin.000021
    -rw-rw—- 1 mysql mysql 1.6K Sep 10  2012 mysql-bin.000022
    -rw-rw—- 1 mysql mysql 5.1K Sep 10  2012 mysql-bin.000023
    -rw-rw—- 1 mysql mysql  15M Sep 10  2012 mysql-bin.000024
    -rw-rw—- 1 mysql mysql 1.1G Sep 16  2012 mysql-bin.000025
    -rw-rw—- 1 mysql mysql 1.1G Sep 22  2012 mysql-bin.000026

    pandora402:/var/lib/mysql # du -h
    4.0K    ./test
    988K    ./mysql
    1000K  ./pandora
    49G    .

    Can i delete it all??

  • Mario

    Administrator
    March 26, 2013 at 17:52
    1150 Karma points
    Community rank: tentacle_master_icon Tentacle Master
    Like it
    Up
    0
    Down
    Drop it
    ::

    Ok, you can delete this binary logs.

    To delete all binary logs older than 7 days (for example ) you can use this query:

    mysql> PURGE BINARY LOGS BEFORE DATE_SUB( NOW( ), INTERVAL 7 DAY);

    Regards

  • fonta

    Member
    March 26, 2013 at 18:07
    0 Karma points
    Community rank: tentacle-noob-1 Tentacle noob
    Like it
    Up
    0
    Down
    Drop it
    ::

    ok, you have solved my problem, thank a lot!!

    pandora402:/var/lib/mysql # df -h
    Filesystem            Size  Used Avail Use% Mounted on
    rootfs                58G  4.8G  50G  9% /
    devtmpfs            1003M  100K 1003M  1% /dev
    tmpfs                1006M  4.0K 1006M  1% /dev/shm
    /dev/sda2              58G  4.8G  50G  9% /
    /dev/sda3              20G  173M  19G  1% /home