mirror_zfs/contrib
Serapheim Dimitropoulos 48df24d4ce
Remove zdb and libzpool from initramfs image
= Motivation

At Delphix we are heavy users of kernel crash dumps that are captured
through a crash kernel that is spawned whenever the main kernel panics.
The way that this works internally is that a certain amount of memory is
reserved while the main system is running so the initramfs of the crash
kernel can be loaded when a panic occurs.

In order to keep reserved memory at minimum we've been historically
trying to identify the binaries that are part of the kernel's initramfs
that are big and finding ways of either making them smaller or do not
include them in the initramfs image. An example is always stripping the
DWARF info of the ZFS kernel module copy that is included in the
initramfs image of both our running and our crash kernel (the difference
in size there is 76MB vs 4MB).

We've recently identified that libzpool has been the largest binary in
our initramfs images - currently sized around 17MB.

= This Patch

The ZFS scripts do not explicitly copy libzpool to initramfs. They copy
zdb which pulls in libzpool as a dependency. Given that both zdb and
libzpool are not really essential for initramfs (e.g. we'll still have
access to the once the root filesystem is unpacked) this patch removes
them from initramfs.

Reviewed-by: Richard Laager <rlaager@wiktel.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Matthew Ahrens <mahrens@delphix.com>
Reviewed-by: John Kennedy <john.kennedy@delphix.com>
Reviewed-by: George Melikov <mail@gmelikov.ru>
Signed-off-by: Serapheim Dimitropoulos <serapheim@delphix.com>
Closes #12616
2021-10-07 10:52:03 -06:00
..
bash_completion.d Turn shellcheck into a normal make target. Fix new files it caught 2021-06-01 11:38:49 -07:00
bpftrace Turn shellcheck into a normal make target. Fix new files it caught 2021-06-01 11:38:49 -07:00
dracut Fix plymouth passphrase prompt with dracut 2021-06-25 22:43:25 -07:00
initramfs Remove zdb and libzpool from initramfs image 2021-10-07 10:52:03 -06:00
intel_qat Add intel_QAT patches 2020-09-30 13:17:30 -07:00
pam_zfs_key gcc 11 cleanup 2021-06-23 17:57:06 -06:00
pyzfs Replace ZoL with OpenZFS where applicable 2021-05-07 17:20:37 -07:00
zcp Fix contrib/zcp/Makefile.am 2019-10-30 12:37:49 -07:00
Makefile.am Turn shellcheck into a normal make target. Fix new files it caught 2021-06-01 11:38:49 -07:00