Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google Cloud SQL increasing size until full disk with no reason

I don't know how to explain this well, but I will try.

  • I use Google Cloud SQL second edition with 20 GB disk size.
  • I have several wp. databases with 166.5 MB Total size.

And right now my Storage usage is 9.52 GB! (With 166.5 MB SQL data...) and increasing still going faster...

What to do?!

gcloud-sql-problem-increasing-size

enter image description here

UPDATE :

I solve this with :

  • I made an export in bucket
  • I created a new instance Cloud SQL
  • Import from bucket
  • And delete instance with problem.

(And changed ip from my applications)

I don't know sure where problem come from but could be a "Storage overhead from binary logs".

Next time will check binary logs with : mysql> SHOW BINARY LOGS;

What I think Google is missing is a purge binary logs! (an easy way!)

UPDATE FINAL :

With binary logs active, storage of your cloud SQL will expand continuously.

For anyone in the same situation, you can edit the instance and uncheck binary logs, after that the current binary logs will purge.

Sorry for my noob problem! :D (I'm a beginner in Server administration.)

Thanks Vadim!

like image 841
Alexcsandru Avatar asked Jan 29 '16 21:01

Alexcsandru


People also ask

What is extreme persistent disk in GCP?

Extreme persistent disks feature higher maximum IOPS and throughput, and allow you to provision IOPS and capacity separately. Extreme persistent disks are available in all zones. When you create an extreme persistent disk, you can choose your desired IOPS level in the range of 10,000 to 120,000 IOPS.

How can size of the root disk in Google Compute Engine be increased?

Click on the name of the disk that you want to resize to get to the disk details page. At the top of the disk details page, click "Edit". In the "Size" field, enter the new size for your disk. At the bottom of the disk details page, click "Save" to apply your changes to the disk.


1 Answers

If you have binary logs enabled, mysql will make a record of all changes, which is required for replication or point-in-time recovery.

If you have no need for these features, you can disable binary logs which will purge any existing logs from your instance.

If binary logs are enabled, they will not grow indefinitely. Binary logs older than the oldest automatic backup (7 days) are purged automatically.

like image 76
Vadim Avatar answered Sep 20 '22 17:09

Vadim