Details
Description
When using our -systemd- binary tarballs the distributed mysqld.service systemd service file has
ProtectSystem=full
|
set since MDEV-10298. As this leads to everything under /usr being read-only, but the binary tarball builds having the data dir set up under /usr/local/mariadb-.../data by default.
So trying to bring the MariaDB server up using default settings, according to our instructions in
https://mariadb.com/kb/en/installing-mariadb-binary-tarball
leads to "funny" errors like:
2021-08-06 10:44:49 0 [ERROR] mysqld: File '/usr/local/mariadb-10.4.18-linux-systemd-x86_64/data/aria_log_control' not found (Errcode: 30 "Read-only file system")
|
while starting the server manually works just fine.
So I'd suggest to add
ReadWritePaths=/usr/local/mysql/data
|
to the bundled mariadb.service file. As /usr/local/mysql/data is a symlink, and SystemD resolves this link to the actual data directory, this should work across all releases without requiring per-release adjustments.
A more complete fix would be to allow both the symlink and the actual versioned path, like e.g.:
ReadWritePaths=/usr/local/mysql/data /usr/local/mariadb-10.4.18-linux-systemd-x86_64/data/
|
Attachments
Issue Links
- is caused by
-
MDEV-10298 Improve systemd service hardening
-
- Closed
-
- relates to
-
MDEV-25177 Better indication of refusing to start because of ProtectHome
-
- Closed
-
Activity
Field | Original Value | New Value |
---|---|---|
Link |
This issue is caused by |
Assignee | Tuukka Pasanen [ JIRAUSER49166 ] |
Link |
This issue is blocked by |
Fix Version/s | 10.2 [ 14601 ] | |
Fix Version/s | 10.3 [ 22126 ] | |
Fix Version/s | 10.4 [ 22408 ] | |
Fix Version/s | 10.5 [ 23123 ] | |
Fix Version/s | 10.6 [ 24028 ] |
Assignee | Tuukka Pasanen [ JIRAUSER49166 ] | Daniel Black [ danblack ] |
Workflow | MariaDB v3 [ 124141 ] | MariaDB v4 [ 143071 ] |
Component/s | Packaging [ 10700 ] | |
Fix Version/s | N/A [ 14700 ] | |
Fix Version/s | 10.2 [ 14601 ] | |
Fix Version/s | 10.3 [ 22126 ] | |
Fix Version/s | 10.4 [ 22408 ] | |
Fix Version/s | 10.5 [ 23123 ] | |
Fix Version/s | 10.6 [ 24028 ] | |
Resolution | Fixed [ 1 ] | |
Status | Open [ 1 ] | Closed [ 6 ] |
Fix Version/s | 10.3 [ 22126 ] | |
Fix Version/s | 10.4 [ 22408 ] | |
Fix Version/s | 10.5 [ 23123 ] | |
Fix Version/s | 10.6 [ 24028 ] | |
Fix Version/s | 10.7 [ 24805 ] | |
Fix Version/s | N/A [ 14700 ] |
Resolution | Fixed [ 1 ] | |
Status | Closed [ 6 ] | Stalled [ 10000 ] |
Fix Version/s | 10.3.33 [ 26805 ] | |
Fix Version/s | 10.4.23 [ 26807 ] | |
Fix Version/s | 10.5.14 [ 26809 ] | |
Fix Version/s | 10.6.6 [ 26811 ] | |
Fix Version/s | 10.7.2 [ 26813 ] | |
Fix Version/s | 10.3 [ 22126 ] | |
Fix Version/s | 10.4 [ 22408 ] | |
Fix Version/s | 10.5 [ 23123 ] | |
Fix Version/s | 10.6 [ 24028 ] | |
Fix Version/s | 10.7 [ 24805 ] | |
Resolution | Fixed [ 1 ] | |
Status | Stalled [ 10000 ] | Closed [ 6 ] |
Link |
This issue is blocked by |
Link |
This issue relates to |
Description |
When using our -systemd- binary tarballs the distributed mysqld.service systemd service file has
{noformat} ProtectSystem=full {noformat} set since So trying to bring the MariaDB server up using default settings, according to our instructions in https://mariadb.com/kb/en/installing-mariadb-binary-tarball leads to "funny" errors like: {noformat} 2021-08-06 10:44:49 0 [ERROR] mysqld: File '/usr/local/mariadb-10.4.18-linux-systemd-x86_64/data/aria_log_control' not found (Errcode: 30 "Read-only file system") {noformat} while starting the server manually works just fine. So I'd suggest to add {noformat} ReadWritePaths=/usr/local/mysql/data {noformat} to the bundled mariadb.service file. As /usr/local/mysql/data is a symlink, and SystemD resolves this link to the actual data directory, this should work across all releases without requiring per-release adjustments. A more complete fix would be to allow both the symlink and the actual versioned path, like e.g.: {noformat} ReadWritePaths=/usr/local/mysql/data /usr/local/mariadb-10.4.18-linux-systemd-x86_64/data/ {noformat} |
When using our \-systemd- binary tarballs the distributed mysqld.service systemd service file has
{noformat} ProtectSystem=full {noformat} set since So trying to bring the MariaDB server up using default settings, according to our instructions in https://mariadb.com/kb/en/installing-mariadb-binary-tarball leads to "funny" errors like: {noformat} 2021-08-06 10:44:49 0 [ERROR] mysqld: File '/usr/local/mariadb-10.4.18-linux-systemd-x86_64/data/aria_log_control' not found (Errcode: 30 "Read-only file system") {noformat} while starting the server manually works just fine. So I'd suggest to add {noformat} ReadWritePaths=/usr/local/mysql/data {noformat} to the bundled mariadb.service file. As /usr/local/mysql/data is a symlink, and SystemD resolves this link to the actual data directory, this should work across all releases without requiring per-release adjustments. A more complete fix would be to allow both the symlink and the actual versioned path, like e.g.: {noformat} ReadWritePaths=/usr/local/mysql/data /usr/local/mariadb-10.4.18-linux-systemd-x86_64/data/ {noformat} |
Unfortunately the ReadWritePaths approach only works with CentOS 8, not with CentOS 7 ...