Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-26317

Distributed mariadb.service Systed service file prevents start with default datadir

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 10.6.2, 10.2.39, 10.3.30, 10.4.20, 10.5.11
    • Fix Version/s: 10.2, 10.3, 10.4, 10.5, 10.6
    • Component/s: None
    • Labels:
      None

      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

            Activity

              People

              Assignee:
              danblack Daniel Black
              Reporter:
              hholzgra Hartmut Holzgraefe
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:

                  Git Integration