Cannot Create Custom Storage of Type Block

$ lxc storage volume create hdd backup-vol0 --type block --format ext4 size=1024GiB
Error: unknown flag: --type

and the default is filesystem. I need to attach a block device to the VM.

$ lxc storage show hdd
config:
  source: /mnt/storage-hdd/lxc
description: ""
name: hdd
driver: dir
used_by: []
status: Created
locations:
- none

LXC 4.0.9. Dir driver on top of LVM LVs

Your LXD is too old for that.

1 Like

image

tracking:     4.0/stable/ubuntu-22.04
refresh-date: 2022-03-26

shoot, why was it tracking 4.0 instead of latest/stable?

thank you Stéphane! updated (see above).

how does one set the size of the block volume? it’s 10GB but I need 1TB.

lxc storage volume set POOL VOLUME size=1TiB

1 Like