db/mysql
MySQL, MariaDB 10.2.x Upgrade After /home Restart Error
C/H
2018. 7. 14. 08:30
- MariaDB does not start after upgrade when installation directory is inside /home
- Upgraded to 10.2.8 on Centos 7.4 ibdata error
MariaDB /home Restart Error
Upgraded to 10.2.x 이상 업그레이드시 ibdata1 권한이 mysql유저 권한이 있는데도 불구하고 Read-only file로 인식
journalctl -xe
...
7월 10 15:39:18 dev mysqld[18378]: 2018-07-10 15:39:18 140486036174976 [ERROR] InnoDB: Operating system error number 30 in a file operation.
7월 10 15:39:18 dev mysqld[18378]: 2018-07-10 15:39:18 140486036174976 [ERROR] InnoDB: Error number 30 means 'Read-only file system'
7월 10 15:39:18 dev mysqld[18378]: 2018-07-10 15:39:18 140486036174976 [Note] InnoDB: Some operating system error numbers are described at https://mariadb.com/kb/en/library/operating-system-error-codes/
7월 10 15:39:18 dev mysqld[18378]: 2018-07-10 15:39:18 140486036174976 [ERROR] InnoDB: File ./ibdata1: 'create' returned OS error 230. Cannot continue operation
...
7월 10 15:39:18 dev mysqld[18378]: information that should help you find out what is causing the crash.
7월 10 15:39:18 dev systemd[1]: mariadb.service: main process exited, code=killed, status=6/ABRT
mysql --version
mysql Ver 15.1 Distrib 10.2.14-MariaDB, for Linux (x86_64) using readline 5.1
Conclusion
[mysqld]
# innodb_force_recovery = 1
# AS-IS
# grep -R Protect /usr/lib/systemd/system/mariadb.service
ProtectSystem=full
ProtectHome=true
# TO-BE
# grep -R Protect /usr/lib/systemd/system/mariadb.service
ProtectSystem=
ProtectHome=
# systemctl daemon-reload
# systemctl start mariadb
반응형