[ https://issues.apache.org/jira/browse/CLOUDSTACK-5860?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Damodar Reddy T resolved CLOUDSTACK-5860. ----------------------------------------- Resolution: Not A Problem According to the file list in the description the file size of mysql-bin.000038 is not rotated for 3 days so older files are not purged according to the mysql documentation.. As mentioned in the mysql doc the old bin log files will be deleted in the following 2 cases only. 1. msyqld server restart 2. If bin log file is flushed due to the max file size is reached. http://dev.mysql.com/doc/refman/5.0/en/server-system-variables.html#sysvar_expire_logs_days In this case none of them happened so files were not deleted. > Bin-logs are not deleted even after the expire_logs_days interval. > ------------------------------------------------------------------ > > Key: CLOUDSTACK-5860 > URL: https://issues.apache.org/jira/browse/CLOUDSTACK-5860 > Project: CloudStack > Issue Type: Bug > Security Level: Public(Anyone can view this level - this is the > default.) > Components: Management Server > Affects Versions: 4.3.0 > Reporter: Kiran Koneti > Assignee: Damodar Reddy T > Fix For: 4.3.0 > > > In the /etc/my.cnf file added two parameters expire_logs_days=1 > max_binlog_size=150M ,which means that the bin-logs which are rotated should > be deleted after one day and the log should be rotated only after the max > size is exceeded.the logs are not rotated until it has reached the limit but > the previous logs which are rotated are not deleted. > The below are the file details in the "/var/lib/mysql" > ls -ltr > total 172628 > drwx------. 2 mysql mysql 4096 Oct 23 18:11 test > drwx------. 2 mysql mysql 4096 Oct 23 18:11 mysql > drwx------. 2 mysql mysql 4096 Nov 18 17:32 kiran > drwx------. 2 mysql mysql 4096 Nov 18 17:32 swathi > -rw-rw----. 1 mysql mysql 39105494 Jan 10 16:20 mysql-bin.000036 > -rw-rw----. 1 mysql mysql 125 Jan 10 16:28 mysql-bin.000037 > -rw-rw----. 1 mysql mysql 57 Jan 10 16:32 mysql-bin.index > srwxrwxrwx. 1 mysql mysql 0 Jan 10 16:32 mysql.sock > -rw-rw----. 1 mysql mysql 156 Jan 10 16:32 mysqld-relay-bin.000015 > -rw-rw----. 1 mysql mysql 52 Jan 10 16:32 mysqld-relay-bin.index > drwx------. 2 mysql mysql 4096 Jan 10 16:37 cloudbridge > drwx------. 2 mysql mysql 4096 Jan 10 16:38 cloud_usage > drwx------. 2 mysql mysql 12288 Jan 10 16:38 cloud > -rw-rw----. 1 mysql mysql 5242880 Jan 13 12:14 ib_logfile1 > -rw-rw----. 1 mysql mysql 1160427 Jan 13 16:09 mysql-bin.000038 > -rw-rw----. 1 mysql mysql 35651584 Jan 13 16:09 ibdata1 > -rw-rw----. 1 mysql mysql 90288777 Jan 13 16:09 mysqld-relay-bin.000016 > -rw-rw----. 1 mysql mysql 76 Jan 13 16:09 master.info > -rw-rw----. 1 mysql mysql 5242880 Jan 13 16:09 ib_logfile0 > -rw-rw----. 1 mysql mysql 63 Jan 13 16:09 relay-log.info > Here we can clearly see the " mysql-bin.000036" and "mysql-bin.000037" > which were rotated on 10th Jan is not removed till 13th Jan. -- This message was sent by Atlassian JIRA (v6.1.5#6160)