targetcli missing kernel modules dependencies on alpine-virt
I'm trying to build a minimal storage appliance for testing purposes using alpine-virt. The use case is setting up a temporary throwaway storage server vm for a test run, run tests, and delete the vm and the storage created during the test.
Steps to reproduce:
- Install alpine-virt-3.12.1-x86_64.iso
- Enable the http://dl-cdn.alpinelinux.org/alpine/v3.12/community repository
- Install targetcli according to https://wiki.alpinelinux.org/wiki/Linux_iSCSI_Target_(TCM)
- Start targetcli
# targetcli ls
b'modprobe: FATAL: Module iscsi_target_mod not found in directory /lib/modules/5.4.72-0-virt\n'
Looking in /lib/modules, we have only target_core module:
# ls /lib/modules/5.4.72-0-virt/kernel/drivers/target/
target_core_mod.ko
On another system installed from alpine-standard-3.12.1-x86_64.iso we have:
# ls /lib/modules/5.4.72-0-lts/kernel/drivers/target/
iscsi target_core_file.ko target_core_pscsi.ko
loopback target_core_iblock.ko target_core_user.ko
sbp target_core_mod.ko tcm_fc
Looking at /boot/config-virt
CONFIG_TARGET_CORE=m
# CONFIG_TCM_IBLOCK is not set
# CONFIG_TCM_FILEIO is not set
# CONFIG_TCM_PSCSI is not set
# CONFIG_LOOPBACK_TARGET is not set
# CONFIG_ISCSI_TARGET is not set
Looks like targetcli needs to depend on the linux-lts package, or maybe the target modules should be part of another package?
After:
apk add linux-lts
apk del linux-virt
reboot
targetcli works, but it looks mostly like alpine-standard install. In particular it seems to have additional 550 MiB in /lib/firmware that I probably do not need in a vm.