[Solved] ERROR 1030 (HY000): Got error 28 from storage engine

Problem background

When logging into the database to view the table structure in Linux environment, an error is reported:

desc base_mirror;
ERROR 1030 (HY000): Got error 28 from storage engine

Most of the conclusions of Google search are the problem of insufficient disk space

View the temporary space directory of MySQL

mysql> show variables like '%dir%';
+-----------------------------------------+----------------------------+
| Variable_name                           | Value                      |
+-----------------------------------------+----------------------------+
| basedir                                 | /usr/                      |
| binlog_direct_non_transactional_updates | OFF                        |
| character_sets_dir                      | /usr/share/mysql/charsets/ |
| datadir                                 | /var/lib/mysql/            |
| ignore_db_dirs                          |                            |
| innodb_data_home_dir                    |                            |
| innodb_log_group_home_dir               | ./                         |
| innodb_max_dirty_pages_pct              | 75                         |
| innodb_max_dirty_pages_pct_lwm          | 0                          |
| innodb_tmpdir                           |                            |
| innodb_undo_directory                   | .                          |
| lc_messages_dir                         | /usr/share/mysql/          |
| plugin_dir                              | /usr/lib64/mysql/plugin/   |
| slave_load_tmpdir                       | /tmp                       |
| tmpdir                                  | /tmp                       |
+-----------------------------------------+----------------------------+
15 rows in set (0.00 sec)

View this machine as follows:

#df -TH
Filesystem     Type      Size  Used Avail Use% Mounted on
devtmpfs       devtmpfs   17G  9.6G  7.2G  58% /dev
tmpfs          tmpfs      17G  4.1k   17G   1% /dev/shm
tmpfs          tmpfs      17G  1.5M   17G   1% /run
tmpfs          tmpfs      17G     0   17G   0% /sys/fs/cgroup
/dev/vda2      ext4       63G   63G   0G  100% /
/dev/vda1      ext4      1.1G  145M  809M  16% /boot
tmpfs          tmpfs     3.4G     0  3.4G   0% /run/user/0
overlay        overlay    63G   45G   15G  75% /home/docker/overlay/5a22b3cdbe381649e30044980fd09341ceb4460c98fd36055c4727c3c31f9f9b/merged
shm            tmpfs      68M     0   68M   0% /home/docker/containers/f61e00164f9f7d2077952af0a025670d7b88a7fb42c37c4e73d7e4c68ef3115e/shm

The overall space of the machine is still available, but the space of the root directory is insufficient, and the MySQL temporary space directory is under the root directory. You need to delete it to make space. After operation:

mysql> desc base_mirror;
+--------------------+--------------+------+-----+---------+----------------+
| Field              | Type         | Null | Key | Default | Extra          |
+--------------------+--------------+------+-----+---------+----------------+
| id                 | int(11)      | NO   | PRI | NULL    | auto_increment |
| mirror_name        | varchar(100) | NO   |     | NULL    |                |
| origin_mirror_name | varchar(100) | NO   |     | NULL    |                |
| mirror_tag         | varchar(100) | NO   |     | NULL    |                |
| cloud_version      | varchar(100) | NO   |     | NULL    |                |
| archi              | varchar(100) | NO   |     | NULL    |                |
| mirror_path        | varchar(200) | NO   |     | NULL    |                |
| os_version         | varchar(100) | NO   |     | NULL    |                |
| namespace          | varchar(100) | NO   |     | NULL    |                |
| description        | longtext     | NO   |     | NULL    |                |
| upgrade_log        | longtext     | YES  |     | NULL    |                |
| create_time        | datetime(6)  | NO   |     | NULL    |                |
| gitlab_path        | varchar(200) | NO   |     | NULL    |                |
| branch_name        | varchar(200) | NO   |     | NULL    |                |
| docker_file_path   | varchar(200) | NO   |     | NULL    |                |
| Dockerfile_info    | longtext     | YES  |     | NULL    |                |
| build_log          | longtext     | YES  |     | NULL    |                |
| commit_id          | varchar(100) | NO   |     | NULL    |                |
| user               | varchar(100) | YES  |     | NULL    |                |
| is_newest          | varchar(100) | NO   |     | NULL    |                |
| is_delete          | varchar(20)  | NO   |     | NULL    |                |
| is_free            | varchar(20)  | NO   |     | NULL    |                |
| can_upgrade        | int(11)      | NO   |     | NULL    |                |
| owner              | varchar(100) | NO   |     | NULL    |                |
| imageid            | varchar(64)  | NO   |     | NULL    |                |
| mirror_sha         | varchar(255) | NO   |     | NULL    |                |
| mirror_label       | varchar(25)  | NO   |     | NULL    |                |
| is_escrow          | int(11)      | NO   |     | NULL    |                |
| openapi_taskid     | int(11)      | YES  |     | NULL    |                |
| is_recommend       | int(11)      | NO   |     | NULL    |                |
+--------------------+--------------+------+-----+---------+----------------+
30 rows in set (0.00 sec)

Problem-solving.

Read More: