zpool create -f lxd /dev/vdb fails on cosmic (18.10) -- func27
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
LXD Charm |
Won't Fix
|
Medium
|
Unassigned |
Bug Description
Test: tests/gate-
As part of the config, the lxd charm creates a pool device depending on the config. The test config is:
lxd_config = {
}
The config drive is normally mounted on /mnt, and the lxd charm umounts it as part of the start up. The /etc/fstab on the unit is:
# cat /etc/fstab
LABEL=cloudimg-
LABEL=UEFI /boot/efi vfat defaults 0 0
/dev/vdb /mnt auto defaults,
/dev/vdc none swap sw,comment=
However, even after umount-ing the /mnt off of /dev/vdb, the zpool create command still fails:
# zpool create -f lxd /dev/vdb
/dev/vdb is in use and contains a unknown filesystem.
If the /etc/fstab is edited so that /dev/vdb is *never* mounted and then rebooted, then the zpool create command succeeds:
# zpool list
NAME SIZE ALLOC FREE EXPANDSZ FRAG CAP DEDUP HEALTH ALTROOT
lxd 14.9G 106K 14.9G - 0% 0% 1.00x ONLINE -
# zpool status lxd
pool: lxd
state: ONLINE
scan: none requested
config:
NAME STATE READ WRITE CKSUM
lxd ONLINE 0 0 0
vdb ONLINE 0 0 0
errors: No known data errors
Something odd is going on with cosmic (18.10) and the combination of lxd, zfs and the kernel
lxd version: 3.6
zfsutils-
Linux: 4.18.0-10-generic
Changed in charm-lxd: | |
assignee: | nobody → Colin Ian King (colin-king) |
Changed in linux (Ubuntu): | |
assignee: | Colin Ian King (colin-king) → nobody |
no longer affects: | linux (Ubuntu) |
Changed in charm-lxd: | |
status: | New → Triaged |
importance: | Undecided → Medium |
An option, for the test, is to change the lxd storage to a "dir" and *avoid* zfs. However, the underlying cause should be resolved.