As of MariaDB 10.1.16, the data directory cannot reside in /home, /usr, /etc, /boot, or /root directories on systemd equipped systems.

Operating System & Version
centos 7.8
cPanel & WHM Version
v86.0.22

rch7

Member
Sep 25, 2017
6
0
1
North America
cPanel Access Level
Root Administrator
I have mariadb 10.1.45 on centos 7.8 cpanel v88.0.13 and when I try to upgrade to mariadb 10.3 in WHM, it shows error message:
"As of MariaDB 10.1.16, the data directory cannot reside in /home, /usr, /etc, /boot, or /root directories on systemd equipped systems. "

But 10.1.45 is later than 10.1.16 already. I had added /etc/systemd/system/mariadb.service.d/home-dir.conf some time ago with:
[Service]
ProtectHome=false
ReadWriteDirectories=/home/mysql

, also set /home/mysql in /etc/my.cnf, and it is worked fine so far.

Are there some new changes after 10.1.45, or is it just new overprotective upgrade script? If the latter, is there some workaround?
 
Last edited:

cPanelLauren

Technical Support Community Manager
Staff member
Nov 14, 2017
12,366
1,126
313
Houston

rch7

Member
Sep 25, 2017
6
0
1
North America
cPanel Access Level
Root Administrator
Thank you for the notice. I had read that thread, but it doesn't have an answer to my original question, nor reasonable workarounds.
Bringing down production server and repartitioning disk space just to upgrade minor version of mariadb is not reasonable approach.

Moving mysql files to different partition is difficult/impossible because of disk space constraints, and because of block level backup (like R1soft) that backs up whole /home partition but not other partitions.