1eda14cbcSMatt MacyDESCRIPTION 2eda14cbcSMatt Macy These script were written with the primary intention of being portable and 3eda14cbcSMatt Macy usable on as many systems as possible. 4eda14cbcSMatt Macy 5eda14cbcSMatt Macy This is, in practice, usually not possible. But the intention is there. 6eda14cbcSMatt Macy And it is a good one. 7eda14cbcSMatt Macy 8eda14cbcSMatt Macy They have been tested successfully on: 9eda14cbcSMatt Macy 10*1719886fSMartin Matuska * Debian GNU/Linux Bookworm 11eda14cbcSMatt Macy * Gentoo 12eda14cbcSMatt Macy 13eda14cbcSMatt MacySUPPORT 14eda14cbcSMatt Macy If you find that they don't work for your platform, please report this 15180f8225SMatt Macy at the OpenZFS issue tracker at https://github.com/openzfs/zfs/issues. 16eda14cbcSMatt Macy 17eda14cbcSMatt Macy Please include: 18eda14cbcSMatt Macy 19eda14cbcSMatt Macy * Distribution name 20eda14cbcSMatt Macy * Distribution version 21eda14cbcSMatt Macy * Where to find an install CD image 22eda14cbcSMatt Macy * Architecture 23eda14cbcSMatt Macy 24eda14cbcSMatt Macy If you have code to share that fixes the problem, that is much better. 25eda14cbcSMatt Macy But please remember to try your best keep portability in mind. If you 26eda14cbcSMatt Macy suspect that what you're writing/modifying won't work on anything else 27eda14cbcSMatt Macy than your distribution, please make sure to put that code in appropriate 28eda14cbcSMatt Macy if/else/fi code. 29eda14cbcSMatt Macy 30eda14cbcSMatt Macy It currently MUST be bash (or fully compatible) for this to work. 31eda14cbcSMatt Macy 32eda14cbcSMatt Macy If you're making your own distribution and you want the scripts to 33eda14cbcSMatt Macy work on that, the biggest problem you'll (probably) have is the part 34eda14cbcSMatt Macy at the beginning of the "zfs-functions" file which sets up the 35eda14cbcSMatt Macy logging output. 36eda14cbcSMatt Macy 37eda14cbcSMatt MacyINSTALLING INIT SCRIPT LINKS 38eda14cbcSMatt Macy To setup the init script links in /etc/rc?.d manually on a Debian GNU/Linux 39eda14cbcSMatt Macy (or derived) system, run the following commands (the order is important!): 40eda14cbcSMatt Macy 41eda14cbcSMatt Macy update-rc.d zfs-import start 07 S . stop 07 0 1 6 . 42681ce946SMartin Matuska update-rc.d zfs-load-key start 02 2 3 4 5 . stop 06 0 1 6 . 43be181ee2SMartin Matuska update-rc.d zfs-mount start 02 S . stop 06 0 1 6 . 44eda14cbcSMatt Macy update-rc.d zfs-zed start 07 2 3 4 5 . stop 08 0 1 6 . 45eda14cbcSMatt Macy update-rc.d zfs-share start 27 2 3 4 5 . stop 05 0 1 6 . 46eda14cbcSMatt Macy 47eda14cbcSMatt Macy To do the same on RedHat, Fedora and/or CentOS: 48eda14cbcSMatt Macy 49eda14cbcSMatt Macy chkconfig zfs-import 50681ce946SMartin Matuska chkconfig zfs-load-key 51eda14cbcSMatt Macy chkconfig zfs-mount 52eda14cbcSMatt Macy chkconfig zfs-zed 53eda14cbcSMatt Macy chkconfig zfs-share 54eda14cbcSMatt Macy 55eda14cbcSMatt Macy On Gentoo: 56eda14cbcSMatt Macy 57eda14cbcSMatt Macy rc-update add zfs-import boot 58681ce946SMartin Matuska rc-update add zfs-load-key boot 59eda14cbcSMatt Macy rc-update add zfs-mount boot 60eda14cbcSMatt Macy rc-update add zfs-zed default 61eda14cbcSMatt Macy rc-update add zfs-share default 62eda14cbcSMatt Macy 63eda14cbcSMatt Macy The idea here is to make sure all of the ZFS filesystems, including possibly 64eda14cbcSMatt Macy separate datasets like /var, are mounted before anything else is started. 65eda14cbcSMatt Macy 66eda14cbcSMatt Macy Then, ZED, which depends on /var, can be started. It will consume and act 67eda14cbcSMatt Macy on events that occurred before it started. ZED may also play a role in 68eda14cbcSMatt Macy sharing filesystems in the future, so it is important to start before the 69eda14cbcSMatt Macy 'share' service. 70eda14cbcSMatt Macy 71eda14cbcSMatt Macy Finally, we share filesystems configured with the share\* property. 72