New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Systemd zfs-mount.service requires network.target #8734
Comments
The network.target thing seems like a red herring. It's probably working with that because you have delayed it until later in the boot process. It's far more likely that some other dependency is the real issue, as mounting ZFS filesystems does not require the network. Are you able to determine which additional units ran between when zfs-mount.service used to start and when it starts with After=network.target? See, for example: https://serverfault.com/questions/617398/is-there-a-way-to-see-the-execution-tree-of-systemd |
Yes, I've run With
Without
I'm surprised that there is no dependency on networking considering that ZFS is able to manage NFS exports. |
In terms of NFS, we should depend on |
Depending on Even for the NFS server, I doubt that |
Without |
It looks like it does depend on |
Did |
This is the only information in the logs around ZFS at time of boot. Is there another location I should look or flags I can enable to try to log more verbosely? Looking through the docs I didn't see anything that stuck out.
|
Look at the status of the zfs service with |
@johnnyjacq16 Here's the output from
Unfortunately, this issue does not reproduce unless the mount is attempted during the boot process. If there's an option I can pass to the daemon or the unit file to produce more verbose logging, perhaps that would yield more information? |
@k4k To get debug information at early boot, power down the machine, then start it up, when the grub menu shows up and your selected kernel is highlighted press |
I've continued to debug this issue on my end on and off over the last few weeks and here is what we've uncovered. It looks like the suspicion that It looks like there were some substantial changes to the unit files in |
Looking at your output from the following:
@k4k Is For reference on my system:
and
|
I'm closing. We can reopen if further testing reconfirms this. |
System information
Describe the problem you're observing
ZFS filesystems do not auto-mount at reboot on CentOS 7 with systemd unless
After=network.target
is added to thezfs-mount.service
unit file.Describe how to reproduce the problem
After reboot, the zfs filesystems do not mount automatically.
Add
After=network.target
to/usr/lib/systemd/system/zfs-mount.service
and repeat the above steps. After reboot, zfs filesystems will automatically mount.Include any warning/errors/backtraces from the system logs
I've skimmed through
journalctl
and can't find any indication of error. As far as I can tell,zfs-mount.service
is a oneshot which means it will run, do what it can, and then exit cleanly assuming no errors were produced fromzfs mount -a
. If there are logs generated elsewhere that are worth looking at I'm happy to scan them and post any relevant information found.The text was updated successfully, but these errors were encountered: