My MySQL database stopped responding with the following “Got error 28 from storage engine”
df -kh showed that disk space use was 100%
I managed to release some reserved space with the command
tune2fs -m 0 /dev/vda1
I then deleted substantial number of rows from numerous tables and on each table ran ‘OPTIMISED TABLE {tableName}’
If I then run a mysql query to calculate the size of the DBs < 13GB
But df -kh still shows 18GB
Filesystem Size Used Avail Use% Mounted on
/dev/vda1 20G 18G 2.2G 89% /
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
In Linux a file isn’t deleted until every pointer to the file is removed. So for an example if you have a log file which is currently being written to and has grown to 5GB in size and you delete it, although the file will not be listed in your directory anymore because that pointer was removed, you won’t free up the disk space because there is still an active process on your system which has a pointer to the file and is still writing to it.
This is why when you are deleting from active files you want to restart the service in question otherwise all of the pointers won’t be removed and the free space won’t be reclaimed.
So if you are doing any file level operations to open files you want to restart the service, or stop it before performing them.
Very likely if you get your active services, in this case MySQL, you should reclaim whatever free space you actually have available.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.