[lxc-users] Trouble Using LVM and LXD

Kyle Kinkaid imlepid at gmail.com
Fri Oct 21 15:44:18 UTC 2016


Hi,

I'm trying to setup containers with LVM.  I choose LVM over other options
(ZFS or btrfs) becuase of some difficulties getting those working on my
arm64 device and over Directory becuase I needed COW features.  I'm using
Ubuntu 16.04 with the LXD version from the Ubuntu repo (currently 2.0.5).

I have setup my VG but when I try and create a container, I get the
following error:
"Error Creating LVM LV for new image: Could not create thin LV named..."

Firstly, I tried with out creating a LV as the storage-backends.md
<https://github.com/lxc/lxd/blob/master/doc/storage-backends.md> says the
LV will be automatically created.  I configured LXD to point to my mg:
$ sudo lxc config show
config:
  storage.lvm_vg_name: lxdfs
  storage.lvm_volume_size: 1GiB
$ sudo vgdisplay
  --- Volume group ---
  VG Name               lxdfs
  System ID
  Format                lvm2
  Metadata Areas        1
  Metadata Sequence No  23
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                0
  Open LV               0
  Max PV                0
  Cur PV                1
  Act PV                1
  VG Size               2.00 GiB
  PE Size               4.00 MiB
  Total PE              511
  Alloc PE / Size       0 / 0
  Free  PE / Size       511 / 2.00 GiB
  VG UUID               Bfv4Sv-JIej-Dfwj-1z96-0gFp-BcRe-F0v4dJ

$ sudo lvdisplay
$ sudo lxc launch images:ubuntu/xenial/arm64 u1604
Creating u1604
Retrieving image: 100%
error: Error Creating LVM LV for new image: Error creating LVM thin pool:
Could not create LVM thin pool named LXDPool
$

So, then I thought maybe I needed to create the LXDPool, so I did.

$ sudo lvcreate -l 50%Free -T lxdfs/LXDPool
  Logical volume "LXDPool" created.
$ sudo lvdisplay
  --- Logical volume ---
  LV Name                LXDPool
  VG Name                lxdfs
  LV UUID                9fILN5-sOFu-Qm6k-9I1f-rfRG-4N1L-ECKT42
  LV Write Access        read/write
  LV Creation host, time igswmcmmas04, 2016-10-21 15:36:36 +0000
  LV Pool metadata       LXDPool_tmeta
  LV Pool data           LXDPool_tdata
  LV Status              available
  # open                 0
  LV Size                1012.00 MiB
  Allocated pool data    0.00%
  Allocated metadata     0.88%
  Current LE             253
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           254:2

$ sudo lxc launch images:ubuntu/xenial/arm64 u1604
Creating u1604
Retrieving image: 100%
error: Error Creating LVM LV for new image: Could not create thin LV named
dcae3165be4fb369d8e5b27b6f578ae7d889d1a7ad57d4b57587fb02099ff3f1
$

So, both ways I've had no luck.  I tried a few other combinations and
searched around but haven't found a solution.  Any advice on what to try
next?

Thank you,
Kyle
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20161021/dc229254/attachment.html>


More information about the lxc-users mailing list