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
Complete rewrite of init script(s) #2106
Conversation
@FransUrbo A couple of comments:
That means it will just do the right thing if I |
Thanx for the input, but I'm not sure I can do anything about point two... Fixing one right now, I'll do a force update as soon as I have something. Adding zfs support to nfs isn't going to happen! I can't modify a file that "I" don't own! I'll look into insserv and see if it's possible to have zfs restarted anyway somehow. But in Debian GNU/Linux I can add an 'override' file (with just the INIT info) in Is that possible on Redhat based systems? |
@FransUrbo I would caution you against overrides. The problem there is that you would end up maintaining the nfs-kernel-server startup script yourself, which I'm sure isn't what you want. Much better to negotiate with the nfs package maintainer to get them to add the one line that we need to support ZFS. In Red Hat land we should probably start that discussion with the Fedora package maintainer. Yes, this is growing in scope, but I think it's necessary to get the thing done right. |
@tesujimath I wasn't going to, I'm not "allowed" to that either. And considering how many distributions there is (which I really like to be able to support in MY scripts), there's just no way I have the time (or interest!) to negotiate with tens of package maintainers... What I CAN do however (which was my intention - provided RH etc supports overrides), is document the issue and give recommends to the user/admin. |
@FransUrbo That's fair enough. It's a distribution packaging issue really. And there's far too much fragmentation in Linux land to solve this in a sensible way. Thanks for your good effort on progressing this in a general way, anyway. |
What is the license for these scripts? Gentoo's ebuild policy is that all licenses on installed files must be clearly marked in the ebuild. The OpenRC script was originally GPLv2 licensed, so I had to display GPLv2 alongside the CDDL in the license. That resulted in a fair degree of harassment by individuals whom I shall call "do-gooders". Consequently, I went through plenty of trouble to relicense the upstream OpenRC script for Gentoo was relicensed from GPLv2 to BSD-2. That permitted me to hide the GPLv2 bits behind USE=debug, which is disabled by default. Consequently, the harassment stopped. I am not particularly keen on anything that could reintroduce the GPL into ZoL's OpenRC script. It might be time for Gentoo to go its own way as far as an OpenRC script are concerned. It is not that I am strictly opposed to script unification, but what we have now (when #2148 is included) is sufficient for the needs of OpenRC-based distributions. |
I have no idea what the license is, technically I didn't write them. I only put different pieces together into one :). But since a large part of it comes from the Debian GNU/Linux packages (pkg-zfs) and was written "by others" (I know @dajhorn have had a substantially large hand in them :), but also Aron Xu (official maintainer of ZoL in Debian GNU/Linux) as well as me. Then the other half comes from the ZoL scripts that was already there... So a combined GPL and CDDL licensing (if that's allowed) is probably not to unreasonable to assume. I'll have to double check with @dajhorn and Aron if they have any objections in releasing these (the "unification scripts") as pure CDDL. For the part(s) I wrote, I have no objections. Unfortunately, it seems that Aron have goon a-wall and can't be contacted :( For the parts that come from the 'old' ZoL scripts, I need to check the licensing of those and if they're not already CDDL, I need to check with those authors if it's ok to CDDL these. |
… init scripts included with Debian GNU/Linux Base scripts on the init scripts included with Debian GNU/Linux then take code from the already existing ones, trying to merge them into one. + NFS server service is just called 'nfs' in Redhat based system, and nfs-kernel-server on Debian GNU/Linux based. + Merge openzfs#2148 - Inform OpenRC that ZFS uses mtab. + Stop after umountfs + When stopping, don't check for LOCKDIR/zfs-mount - it won't be mounted, so the file won't exist making the script not run. + Add a configurable ZFS_INITRD_POST_MODPROBE_SLEEP used in the initrd to sleep after the modprobe. + The import function, do_import(), imports pools by name instead of '-a' [all]. + Test all '/dev/disk/by-*' dirs for import. + Fallback on importing the pool using the cache file (if it exists) if the 'by-id' didn't work. + Add exceptions to pool imports.
… init scripts included with Debian GNU/Linux Base scripts on the init scripts included with Debian GNU/Linux then take code from the already existing ones, trying to merge them into one. + NFS server service is just called 'nfs' in Redhat based system, and nfs-kernel-server on Debian GNU/Linux based. + Merge openzfs#2148 - Inform OpenRC that ZFS uses mtab. + Stop after umountfs + When stopping, don't check for LOCKDIR/zfs-mount - it won't be mounted, so the file won't exist making the script not run. + Add a configurable ZFS_INITRD_POST_MODPROBE_SLEEP used in the initrd to sleep after the modprobe. + The import function, do_import(), imports pools by name instead of '-a' [all]. + Test all '/dev/disk/by-*' dirs for import. + Fallback on importing the pool using the cache file (if it exists) if the 'by-id' didn't work. + Add exceptions to pool imports.
0ce32f7
to
f75ae04
Compare
… init scripts included with Debian GNU/Linux Base scripts on the init scripts included with Debian GNU/Linux then take code from the already existing ones, trying to merge them into one. + NFS server service is just called 'nfs' in Redhat based system, and nfs-kernel-server on Debian GNU/Linux based. + Merge openzfs#2148 - Inform OpenRC that ZFS uses mtab. + Stop after umountfs + When stopping, don't check for LOCKDIR/zfs-mount - it won't be mounted, so the file won't exist making the script not run. + Add a configurable ZFS_INITRD_POST_MODPROBE_SLEEP used in the initrd to sleep after the modprobe. + The import function, do_import(), imports pools by name instead of '-a' [all]. + Test all '/dev/disk/by-*' dirs for import. + Fallback on importing the pool using the cache file (if it exists) if the 'by-id' didn't work. + Add exceptions to pool imports.
… init scripts included with Debian GNU/Linux Base scripts on the init scripts included with Debian GNU/Linux then take code from the already existing ones, trying to merge them into one. + NFS server service is just called 'nfs' in Redhat based system, and nfs-kernel-server on Debian GNU/Linux based. + Merge openzfs#2148 - Inform OpenRC that ZFS uses mtab. + Stop after umountfs + When stopping, don't check for LOCKDIR/zfs-mount - it won't be mounted, so the file won't exist making the script not run. + Add a configurable ZFS_INITRD_POST_MODPROBE_SLEEP used in the initrd to sleep after the modprobe. + The import function, do_import(), imports pools by name instead of '-a' [all]. + Test all '/dev/disk/by-*' dirs for import. + Fallback on importing the pool using the cache file (if it exists) if the 'by-id' didn't work. + Add exceptions to pool imports.
… init scripts included with Debian GNU/Linux Base scripts on the init scripts included with Debian GNU/Linux then take code from the already existing ones, trying to merge them into one. + NFS server service is just called 'nfs' in Redhat based system, and nfs-kernel-server on Debian GNU/Linux based. + Merge openzfs#2148 - Inform OpenRC that ZFS uses mtab. + Stop after umountfs + When stopping, don't check for LOCKDIR/zfs-mount - it won't be mounted, so the file won't exist making the script not run. + Add a configurable ZFS_INITRD_POST_MODPROBE_SLEEP used in the initrd to sleep after the modprobe. + The import function, do_import(), imports pools by name instead of '-a' [all]. + Test all '/dev/disk/by-*' dirs for import. + Fallback on importing the pool using the cache file (if it exists) if the 'by-id' didn't work. + Add exceptions to pool imports.
… init scripts included with Debian GNU/Linux Base scripts on the init scripts included with Debian GNU/Linux then take code from the already existing ones, trying to merge them into one. + NFS server service is just called 'nfs' in Redhat based system, and nfs-kernel-server on Debian GNU/Linux based. + Merge openzfs#2148 - Inform OpenRC that ZFS uses mtab. + Stop after umountfs + When stopping, don't check for LOCKDIR/zfs-mount - it won't be mounted, so the file won't exist making the script not run. + Add a configurable ZFS_INITRD_POST_MODPROBE_SLEEP used in the initrd to sleep after the modprobe. + The import function, do_import(), imports pools by name instead of '-a' [all]. + Test all '/dev/disk/by-*' dirs for import. + Fallback on importing the pool using the cache file (if it exists) if the 'by-id' didn't work. + Add exceptions to pool imports.
… init scripts included with Debian GNU/Linux Base scripts on the init scripts included with Debian GNU/Linux then take code from the already existing ones, trying to merge them into one. + NFS server service is just called 'nfs' in Redhat based system, and nfs-kernel-server on Debian GNU/Linux based. + Merge openzfs#2148 - Inform OpenRC that ZFS uses mtab. + Stop after umountfs + When stopping, don't check for LOCKDIR/zfs-mount - it won't be mounted, so the file won't exist making the script not run. + Add a configurable ZFS_INITRD_POST_MODPROBE_SLEEP used in the initrd to sleep after the modprobe. + The import function, do_import(), imports pools by name instead of '-a' [all]. + Test all '/dev/disk/by-*' dirs for import. + Fallback on importing the pool using the cache file (if it exists) if the 'by-id' didn't work. + Add exceptions to pool imports.
… init scripts included with Debian GNU/Linux Base scripts on the init scripts included with Debian GNU/Linux then take code from the already existing ones, trying to merge them into one. + NFS server service is just called 'nfs' in Redhat based system, and nfs-kernel-server on Debian GNU/Linux based. + Merge openzfs#2148 - Inform OpenRC that ZFS uses mtab. + Stop after umountfs + When stopping, don't check for LOCKDIR/zfs-mount - it won't be mounted, so the file won't exist making the script not run. + Add a configurable ZFS_INITRD_POST_MODPROBE_SLEEP used in the initrd to sleep after the modprobe. + The import function, do_import(), imports pools by name instead of '-a' [all]. + Test all '/dev/disk/by-*' dirs for import. + Fallback on importing the pool using the cache file (if it exists) if the 'by-id' didn't work. + Add exceptions to pool imports.
… init scripts included with Debian GNU/Linux Base scripts on the init scripts included with Debian GNU/Linux then take code from the already existing ones, trying to merge them into one. + NFS server service is just called 'nfs' in Redhat based system, and nfs-kernel-server on Debian GNU/Linux based. + Merge openzfs#2148 - Inform OpenRC that ZFS uses mtab. + Stop after umountfs + When stopping, don't check for LOCKDIR/zfs-mount - it won't be mounted, so the file won't exist making the script not run. + Add a configurable ZFS_INITRD_POST_MODPROBE_SLEEP used in the initrd to sleep after the modprobe. + The import function, do_import(), imports pools by name instead of '-a' [all]. + Test all '/dev/disk/by-*' dirs for import. + Fallback on importing the pool using the cache file (if it exists) if the 'by-id' didn't work. + Add exceptions to pool imports.
… init scripts included with Debian GNU/Linux Base scripts on the init scripts included with Debian GNU/Linux then take code from the already existing ones, trying to merge them into one. + NFS server service is just called 'nfs' in Redhat based system, and nfs-kernel-server on Debian GNU/Linux based. + Merge openzfs#2148 - Inform OpenRC that ZFS uses mtab. + Stop after umountfs + When stopping, don't check for LOCKDIR/zfs-mount - it won't be mounted, so the file won't exist making the script not run. + Add a configurable ZFS_INITRD_POST_MODPROBE_SLEEP used in the initrd to sleep after the modprobe. + The import function, do_import(), imports pools by name instead of '-a' [all]. + Test all '/dev/disk/by-*' dirs for import. + Fallback on importing the pool using the cache file (if it exists) if the 'by-id' didn't work. + Add exceptions to pool imports.
f75ae04
to
cece486
Compare
7edaec4
to
aebfa7d
Compare
aebfa7d
to
4a29083
Compare
4a29083
to
73df292
Compare
then take code from the already existing ones, trying to merge them into one. + NFS server service is just called 'nfs' in Redhat based system, and nfs-kernel-server on Debian GNU/Linux based. + Merge openzfs#2148 - Inform OpenRC that ZFS uses mtab. + Stop after umountfs + When stopping, don't check for LOCKDIR/zfs-mount - it won't be mounted, so the file won't exist making the script not run. + Add a configurable ZFS_INITRD_POST_MODPROBE_SLEEP used in the initrd to sleep after the modprobe. + The import function, do_import(), imports pools by name instead of '-a' [all]. + Test all '/dev/disk/by-*' dirs for import. Include /dev as a last ditch attempt. + Fallback on importing the pool using the cache file (if it exists) if the 'by-id' didn't work. + Add exceptions to pool imports. * ZED script from the Debian GNU/Linux packages added.
I was trying to use the zed script on rhel6 and ran into two compatibilty:
|
Base scripts on the init scripts included with Debian GNU/Linux, then take code from the already existing ones from ZoL, trying to merge them into one.
These two scripts probably have been tested to work on Debian GNU/Linux Wheezy and Fedora 20. They have been running in the ZoL Debian GNU/Linux Wheezy packages for several versions now, and people that have been having troubles before, is now reporting success.
Closes: #2974, #2107, #2116.