読者です 読者をやめる 読者になる 読者になる

vagrant + docker + mysql で mysql を起動したら Check that your OS and file system support files of this size のエラーが出た

Docker

発生したエラーは以下。

2016-05-05T10:22:59.842109-00:00 0 [ERROR] InnoDB: Write to file /var/lib/mysql/ibdata1failed at offset 8388608, 1048576 bytes should have been written, only 0 were written. Operating system error number 28. Check that your OS and file system support files of this size. Check also that the disk is not full or a disk quota exceeded.
2016-05-05T10:22:59.842131-00:00 0 [ERROR] InnoDB: Error number 28 means 'No space left on device'
2016-05-05T10:22:59.842146-00:00 0 [ERROR] InnoDB: Could not set the file size of '/var/lib/mysql/ibdata1'. Probably out of disk space
2016-05-05T10:22:59.842155-00:00 0 [ERROR] InnoDB: InnoDB Database creation was aborted with error Generic error. You may need to delete the ibdata1 file before trying to start up again.
2016-05-05T10:23:00.446295-00:00 0 [ERROR] Plugin 'InnoDB' init function returned error.
2016-05-05T10:23:00.446363-00:00 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2016-05-05T10:23:00.446387-00:00 0 [ERROR] Failed to initialize plugins.
2016-05-05T10:23:00.446451-00:00 0 [ERROR] Aborting


容量が足りなくなってる気がするので確認してみる。

[root@master ~]# df
Filesystem              1K-blocks      Used Available Use% Mounted on
/dev/mapper/centos-root   8775680   8775596        84 100% /
devtmpfs                   501276         0    501276   0% /dev
tmpfs                      508740         0    508740   0% /dev/shm
tmpfs                      508740      6708    502032   2% /run
tmpfs                      508740         0    508740   0% /sys/fs/cgroup
/dev/sda1                  508588    108256    400332  22% /boot
none                    243843072 143408884 100434188  59% /vagrant
tmpfs                      101748         0    101748   0% /run/user/0


「/dev/mapper/centos-root」が 100% になっている。

多分 docker のボリュームとかが悪さしてると思うので、
不要なものを消してみる。

docker volume rm $(docker volume ls -qf dangling=true)

容量を確認すると・・・

[root@master /]# df
Filesystem              1K-blocks      Used Available Use% Mounted on
/dev/mapper/centos-root   8775680   3036948   5738732  35% /
devtmpfs                   501276         0    501276   0% /dev
tmpfs                      508740         0    508740   0% /dev/shm
tmpfs                      508740      6708    502032   2% /run
tmpfs                      508740         0    508740   0% /sys/fs/cgroup
/dev/sda1                  508588    108256    400332  22% /boot
none                    243843072 143409272 100433800  59% /vagrant
tmpfs                      101748         0    101748   0% /run/user/0

35% まで減った。

mysqlも問題なく起動できました。