Public bug reported:

[ Impact ]

 * The postinst script for mysql-server checks whether the
`/var/lib/mysql` directory is empty before setting up the database
state. When `/var/lib/mysql` is an ext4 filesystem, the `lost+found`
directory causes this check to fail and the database is not properly set
up.

 * Mounting a separate volume to hold the mysql state is a common
pattern, and ext4 is extremely prevalent so this is likely to be a
common pain point. Although workarounds are straightforward, it makes
for bad UX.

 * This can be remedied by ignoring the lost+found directory in the
check.

[ Test Plan ]

 To ensure bug is fixed:
 * Create an empty ext4 volume and mount it to /var/lib/mysql
 * Install mysql-server
 * Check whether the installation succeeds

 To check that data is preserved:
 * Uninstall and reinstall mysql-server
 * Ensure that the data in /var/lib/mysql is not overwritten

[ Where problems could occur ]

 * In this case, the only change is to the postinst script, so problems should 
be related to install.
 * If the check being done were incorrect it could lead to loss of user data.
   - We keep the change to script to a minimum to reduce the risk of this
   - Test plan includes confirming that user data is not overwritten

** Affects: mysql-8.0 (Ubuntu)
     Importance: Undecided
         Status: New

** Affects: mysql-8.4 (Ubuntu)
     Importance: Undecided
     Assignee: Zachary Raines (raineszm)
         Status: New

** Affects: mysql-8.0 (Ubuntu Jammy)
     Importance: Undecided
     Assignee: Zachary Raines (raineszm)
         Status: New

** Affects: mysql-8.0 (Ubuntu Noble)
     Importance: Undecided
     Assignee: Zachary Raines (raineszm)
         Status: New

** Affects: mysql-8.4 (Ubuntu Plucky)
     Importance: Undecided
     Assignee: Zachary Raines (raineszm)
         Status: New

** Affects: mysql-8.4 (Ubuntu Questing)
     Importance: Undecided
     Assignee: Zachary Raines (raineszm)
         Status: New

** Affects: mysql-8.4 (Ubuntu Resolute)
     Importance: Undecided
     Assignee: Zachary Raines (raineszm)
         Status: New

** Also affects: mysql-8.4 (Ubuntu)
   Importance: Undecided
       Status: New

** Also affects: mysql-8.0 (Ubuntu Jammy)
   Importance: Undecided
       Status: New

** Also affects: mysql-8.4 (Ubuntu Jammy)
   Importance: Undecided
       Status: New

** Also affects: mysql-8.0 (Ubuntu Questing)
   Importance: Undecided
       Status: New

** Also affects: mysql-8.4 (Ubuntu Questing)
   Importance: Undecided
       Status: New

** Also affects: mysql-8.0 (Ubuntu Resolute)
   Importance: Undecided
       Status: New

** Also affects: mysql-8.4 (Ubuntu Resolute)
   Importance: Undecided
       Status: New

** Also affects: mysql-8.0 (Ubuntu Noble)
   Importance: Undecided
       Status: New

** Also affects: mysql-8.4 (Ubuntu Noble)
   Importance: Undecided
       Status: New

** Also affects: mysql-8.0 (Ubuntu Plucky)
   Importance: Undecided
       Status: New

** Also affects: mysql-8.4 (Ubuntu Plucky)
   Importance: Undecided
       Status: New

** No longer affects: mysql-8.0 (Ubuntu Plucky)

** No longer affects: mysql-8.0 (Ubuntu Questing)

** No longer affects: mysql-8.0 (Ubuntu Resolute)

** No longer affects: mysql-8.4 (Ubuntu Jammy)

** No longer affects: mysql-8.4 (Ubuntu Noble)

** Changed in: mysql-8.4 (Ubuntu Resolute)
     Assignee: (unassigned) => Zachary Raines (raineszm)

** Changed in: mysql-8.4 (Ubuntu Questing)
     Assignee: (unassigned) => Zachary Raines (raineszm)

** Changed in: mysql-8.4 (Ubuntu Plucky)
     Assignee: (unassigned) => Zachary Raines (raineszm)

** Changed in: mysql-8.0 (Ubuntu Noble)
     Assignee: (unassigned) => Zachary Raines (raineszm)

** Changed in: mysql-8.0 (Ubuntu Jammy)
     Assignee: (unassigned) => Zachary Raines (raineszm)

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2129196

Title:
  mysql-server fails to install when an ext4 fs is mounted to
  /var/lib/mysql

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/mysql-8.0/+bug/2129196/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to