[MDEV-9692] Develop failsafe response for "out of diskspace" Created: 2016-03-07  Updated: 2016-03-07

Status: Open
Project: MariaDB Server
Component/s: None
Fix Version/s: None

Type: Task Priority: Minor
Reporter: Shimon Doodkin Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None


 Description   

the idea is to kill all queries if space is too low
from ux point of view how much space is too low is unknown to everyone but can be calculated from settings of mysql.
so i guess the task is to figure out how much space is low space automatically
and kill al queries if disk space becomes to low and start to show error message on each query

it is painful to recover from out of disk space. it is not fast and without good status.
it reads the ibdata for very long time with no indication on progress, i could see the progress of mysqld recovery using using strace -y -v -p `pidof mysqld`
26686783488 in bytes to gb = 26GB of 40GB that i had

strace:

pread(6</var/lib/mysql/ibdata1>, "\365\365\205'\0\30\332\240\0\0\0\0\0\0\0\0\0\0\0\301\207\221\312q\0\2\0\0\0\0\0\0"..., 16384, 26686783488) = 16384
pread(6</var/lib/mysql/ibdata1>, "N\221\200\201\0\30\332\236\0\0\0\0\0\0\0\0\0\0\0\301\207\216\374w\0\2\0\0\0\0\0\0"..., 16384, 26686750720) = 16384

the recovery took about 10 minute of unknown time and confusing errors like

/etc/init.d/mysql[30463]: error: 'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111 "Connection refused")'
/etc/init.d/mysql[30463]: Check that mysqld is running and that the socket: '/var/run/mysqld/mysqld.sock' exists!

and
many service mysql start fails finishs without explanation.


Generated at Thu Feb 08 07:36:36 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.