zfsonlinux / pkg-zfs

Native ZFS packaging for Debian and Ubuntu
https://launchpad.net/~zfs-native/+archive/daily
308 stars 55 forks source link

Re-enable zfs-dracut packaging #122

Closed l1k closed 9 years ago

l1k commented 9 years ago

This was disabled with f044301bacbe69848fd4c0fcd02f5b4d08d7f298 in January 2012 as it was broken back then, but the situation has improved vastly in the meantime. The zfs-dracut package not only works well with dracut-038 on Debian Jessie but offers one significant advantage over initramfs-tools: The ability to export a ZFS root on shutdown, eliminating the necessity to force-import on every reboot. A patch to achieve that was submitted yesterday with zfsonlinux/zfs#2766. (I can add that patch to this pull request if you want.) Note that there's currently a bug in Debian's dracut_038-2 package which prevents the systemd unit files from being included in the package. I'll submit a bug report to the maintainer in a bit and will add the bug number in a comment here. Without that fix, exporting the ZFS root on shutdown doesn't work.

I've also added a dependency to package zfs-initramfs on initramfs-tools, analogously to the dependency of package zfs-dracut on dracut. This ensures that a user may install only one of zfs-dracut and zfs-initramfs at the same time since dracut and initramfs-tools conflict.

I'm not sure if this is the correct branch to submit this pull request, all others seemed stale. Please let me know if I should re-submit to a different branch. Thanks.

dajhorn commented 9 years ago

I'm not sure if this is the correct branch to submit this pull request, all others seemed stale. Please let me know if I should re-submit to a different branch.

@l1k, this pull request can stay parked here until it can be rebased on a branch that is maintained by @FransUrbo for Debian.

// Although dracut was promoted to a supported main component in Debian, it is still outdated and unsupported in Ubuntu.

l1k commented 9 years ago

Just for the record, Debian bug #764393 tracks inclusion of the systemd units in the dracut Debian package. These are required to properly export a ZFS root on shutdown.

l1k commented 9 years ago

As requested by @FransUrbo, I've rebased this pull request (plus 6 commits made to the dracut directory of zfsonlinux/zfs:master this month) onto snapshot/debian/jessie/0.6.3-26_33b4de_jessie, it can be pulled from l1k/pkg-zfs:snapshot/debian/jessie/0.6.3-26_33b4de_jessie_dracut. (It looks like pull requests can't be initiated from a tag. Am I missing something?).

The Debian dailies contain pull request zfsonlinux/zfs#2087 which proposed a common library that is used by both dracut and initramfs-tools. The pull request was closed without being merged into zfsonlinux/zfs:master, I'm not sure why. My 2 cents on this:

l1k commented 9 years ago

Merged into snapshot/debian/jessie/0.6.3-27_1d9663_jessie. Thank you!