Cannot create a storage btrfs pool on alpine

When i want to create a new storage pool the underlined losetup command gives a error

output

incus storage create data btrfs
Error: Failed to run: losetup --find --nooverlap --direct-io=on --show /var/lib/incus/disks/data.img: exit status 1 (losetup: unrecognized option: find
BusyBox v1.38.0 (2026-09-12 12:01:17 UTC) multi-call binary.

Usage: losetup [-rP] [-o OFS] {-f|LOOPDEV} FILE: associate loop devices
losetup -c LOOPDEV: reread file size
losetup -d LOOPDEV: disassociate
losetup -a: show status
losetup -f: show next free loop device

-o OFS	Start OFS bytes into FILE
-P	Scan for partitions
-r	Read-only
-f	Show/use next free loop device)

losetup is a symlink to busybox :0

installing incus on a existing btrfs partion gives no problem to mount on the /var/lib/incus/storage-pool

blkid

/dev/sda3: UUID="72..." TYPE="btrfs"
/dev/sda2: UUID="68..." TYPE="swap"
/dev/sda1: UUID="74.." TYPE="vfat"

/dev/sdb1 UUID="123" TYPE=btrfs

incus storage show default
config:
source: /var/lib/incus/storage-pools/default
volatile.initial_source: /var/lib/incus/storage-pools/default
description: ""
name: default
driver: btrfs

Is the another way to create a storage pool ?

Does Alpine provide a way to install the real losetup? :slight_smile:

apk add losetup fixes the problem :face_with_open_eyes_and_hand_over_mouth:

Only now, when i create a new storage pool, on a existing disk/partion gives me a error to force overwrite with option -f. But there is no option -f on incus storage create

incus storage create data btrfs source=/dev/sdb

Error: Failed to format block device: Failed to run: mkfs.btrfs -L data /dev/sdb: exit status 1 (ERROR: /dev/sdb appears to contain an existing filesystem (type=btrfs, label=data)

ERROR: use the -f option to force overwrite of /dev/sdb)

Workaround for this to first wipe the disk with

wipefs -a /dev/sdb

Wouldbe nice if there is a option to incus storage import pool after a system crash

There is configuration option source.wipe. From the manual: