Hi Jason,
> recently, we have observed disk space exhausted from one old resource
> broker (around 90% usage) and we found total disk space usage if mysql db
> is around 13GB now. querying job events tables from lbserver20, we found
> there already have 384928 log entries while some of them referring to
> submission carried out at 2005 and 2006. i am wondering if there is any
> tools able to remove old log entries that we could cut down the disk usage
> of resource broker.
I doubt such tools exist for the RB. I suppose you could delete a whole
bunch of old records with SQL, but then you probably will need to rebuild
the DB for the space to be actually reclaimed.
Instead, the easiest is to declare a downtime, then block port 9002 from
outside the RB, to avoid new jobs:
http://goc.grid.sinica.edu.tw/gocwiki/How_to_stop_an_RB_accepting_new_jobs_for_draining
Next let it drain for a few days and just _zap_ the DB:
/etc/init.d/mysql stop
mv /var/lib/mysql/lbserver20 /var/lib/mysql/lbserver20.old
/opt/glite/yaim/bin/yaim -r -s your-site-info.def -f config_lbserver_db
If that worked, delete /var/lib/mysql/lbserver20.old.
P.S. This one currently holds our record:
[root@rb114 root]# ls -lh /var/lib/mysql/lbserver20/ | grep G
total 125G
-rw-rw---- 1 mysql c3 5.9G Jun 26 02:36 events.MYD
-rw-rw---- 1 mysql c3 2.8G Jun 26 02:36 events.MYI
-rw-rw---- 1 mysql c3 62G Jun 26 02:34 long_fields.MYD
-rw-rw---- 1 mysql c3 19G Jun 26 02:36 short_fields.MYD
-rw-rw---- 1 mysql c3 10G Jun 26 02:36 short_fields.MYI
-rw-rw---- 1 mysql c3 23G Jun 26 02:36 states.MYD
|