Potential race with systemd if /var/lib is an independent persistent unit
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Native ZFS for Linux |
New
|
Undecided
|
Unassigned | ||
zfs-linux (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
If /var/lib is a dataset not under <pool>/
in the ubuntu root on zfs upstream guide
(https:/
with a race where some services, like systemd-random-seed are writing under
/var/lib, while zfs-mount is called. zfs mount will then potentially fail
because of /var/lib isn't empty, and so, can't be mounted.
Order those 2 units for now (more may be needed) as we can't declare
virtually a provide mount point to match
"RequiresMount
systemd-
The optional generator for zfs 0.8 fixes it, but it's not enabled by default
nor necessarily required.
Example:
- rpool/ROOT/ubuntu (mountpoint = /)
- rpool/var/ (mountpoint = /var)
- rpool/var/lib (mountpoint = /var/lib)
Both zfs-mount.service and systemd-
Ideally, we would have a way for zfs mount -a unit to declare all paths or move systemd-random-seed after local-fs.target.
Upstream PR: https:/
description: | updated |
This bug was fixed in the package zfs-linux - 0.8.1-1ubuntu12
---------------
zfs-linux (0.8.1-1ubuntu12) eoan; urgency=medium
* Rename zsys-support.patch to 4000-zsys- support. patch patches/ 4500-fix- generator- invalid- cache.patch: patches/ 4501-fix- var-lib- race.patch:
* debian/
- Regenerate cache file if empty to fix a race for the mount
generator and fstab which contains /boot/grub (LP: #1845606)
* debian/
- Fix a race between systemd-random-seed and zfs mount -a if
/var/lib is a separate persistent dataset. (LP: #1845298)
-- Didier Roche <email address hidden> Fri, 27 Sep 2019 09:48:23 +0200