Skip to content
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

/var dataset requires legacy mount on systemd based distros. #3768

Closed
gotwf opened this issue Sep 13, 2015 · 9 comments
Closed

/var dataset requires legacy mount on systemd based distros. #3768

gotwf opened this issue Sep 13, 2015 · 9 comments

Comments

@gotwf
Copy link

gotwf commented Sep 13, 2015

When separating out /var and NOT using legacy mounts, journald writes to /var before zfs has initiated/mounted it. Hence, zfs will subsequently be unable to mount /var, as it now contains existing data. Note that I've not tested this very thoroughly, and it has been some years since I used zfs (so maybe I'm out in left field here....) but that sure looks to be what is happening.

@ryao
Copy link
Contributor

ryao commented Sep 14, 2015

systemd will need something like 3f1cc17 to address this.

@mailinglists35
Copy link

is this still an issue, right? I've just tried to migrate /var to zfs on centos7 but it does not get mounted in initrd process. if this is no longer an issue, what is the correct approach to migrate just /var from ext4 to zfs?

@sylveon
Copy link

sylveon commented Jul 17, 2018

I do not have this issue, but then my initrd mounts the /var partition before systemd even gets a chance to start.

@mailinglists35
Copy link

do you mind sharing your setup? i tried installing zfs-dracut and rebuilding initrd but systemd kicks in the initrd before zfs-import-cache

@rlaager
Copy link
Member

rlaager commented Jul 19, 2018

A systemd generator (see issue #4898) was merged in PR #7329, so I think this is resolved in master, but not yet a release.

@rlaager rlaager closed this as completed Jul 19, 2018
@mailinglists35
Copy link

mailinglists35 commented Jul 19, 2018

@rlaager thank you. @behlendorf is this planned for being included in a 0.7.x update or will be later in 0.8.0?

@behlendorf
Copy link
Contributor

@mailinglists35 it's planned for 0.8.0.

@zh99998
Copy link

zh99998 commented Feb 14, 2020

does it work now?
I still can't mount /var without legacy mount.

debian buster, zfs 0.8.2

@rlaager
Copy link
Member

rlaager commented Feb 14, 2020

@zh99998 Yes, but you have to be using the zfs-mount-generator, which is not enabled by default.

See step 5.8 here, starting with mkdir /etc/zfs/zfs-list.cache:
https://github.com/zfsonlinux/zfs/wiki/Debian-Buster-Root-on-ZFS

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants