Rancher Server eat all disk Space

Hi guys,

I’m working with rancher-server on a VM with only 50Go of space (perhaps not enough for rancher-server ??)

every monday morning when come back from a good Weekend :slight_smile: I found that my rancher-server is down and the reason is that my fs is full at 100%…

Mysql log is taking 23Go of space

23G /var/log/mysql

It seams that I have 5 days of logs but each file is about 100M

 ...
-rw-rw---- 1 mysql mysql 101M Nov  9 00:04 mysql-bin.000224
-rw-rw---- 1 mysql mysql 101M Nov  9 00:27 mysql-bin.000225
-rw-rw---- 1 mysql mysql 101M Nov  9 00:51 mysql-bin.000226
-rw-rw---- 1 mysql mysql 101M Nov  9 01:15 mysql-bin.000227
-rw-rw---- 1 mysql mysql 101M Nov  9 01:38 mysql-bin.000228
-rw-rw---- 1 mysql mysql 
85M Nov  9 08:41 mysql-bin.000229
-rw-rw---- 1 mysql mysql 7.2K Nov  9 01:38 mysql-bin.index

I’ve got also 13G for the ibdata1

root@c09945a57444:/var/lib/mysql# du -hs * 
1.5M     cattle
0             debian-5.5.flag
5.0M     ib_logfile0
5.0M     ib_logfile1
**13G        ibdata1**
1.1M     mysql
212K      performance_schema

Do you recommend a minimum of disk size in order to run rancher-os ? or is there a way for tuning space occupation of rancher ?

i’m using
Rancher
v0.43.1

thanks

sébastien

1 Like

@Sebastien_Allamand, was this an upgraded environment? We had been using a single innodb file for the database and switched over in ~v0.41.x to using 1 file per table. If you were already using it though, I believe it will continue to do so, and new tables should get new files.

In that same release we shortened the retention period from 10 days to 2 days. You can manually clean them up by running:

PURGE BINARY LOGS BEFORE 'YYYY-MM-DD hh:mm:ss'

where the date is today at midnight. You can also confirm in the /etc/mysql/my.cnf file that expire_logs_days is set to 2 days.

yes it was an upgrade

I confirm expire log is set to 2 and I didn’t get again the problem thanks!