[linux-lvm] Testing the new LVM cache feature

Richard W.M. Jones rjones at redhat.com
Thu May 22 15:22:32 UTC 2014


Well I'm happy to experiment for you.

At the moment I'm stuck here:

# vgcreate vg_cache /dev/sdc1
  Volume group "vg_cache" successfully created
# lvcreate -L 1G -n lv_cache_meta vg_cache
  Logical volume "lv_cache_meta" created
# lvcreate -L 229G -n lv_cache vg_cache
  Logical volume "lv_cache" created
# lvs
  LV                     VG        Attr       LSize   [...]
  lv_cache               vg_cache  Cwi---C--- 229.00g
  lv_cache_meta          vg_cache  -wi-a-----   1.00g
  testoriginlv           vg_guests -wi-a----- 100.00g

# lvconvert --type cache-pool --poolmetadata /dev/vg_cache/lv_cache_meta /dev/vg_cache/lv_cache
  Logical volume "lvol0" created
  Converted vg_cache/lv_cache to cache pool.

# lvs
  LV                     VG        Attr       LSize   [...]
  lv_cache               vg_cache  Cwi---C--- 229.00g
  testoriginlv           vg_guests -wi-a----- 100.00g

# lvconvert --type cache --cachepool vg_cache/lv_cache vg_guests/testoriginlv
  Unable to find cache pool LV, vg_cache/lv_cache
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

It seems as if vg_cache/lv_cache is a "cache pool" but for some reason
lvconvert is unable to use it.

The error seems to come from this code:

    if (!(cachepool = find_lv(origin->vg, lp->cachepool))) {
            log_error("Unable to find cache pool LV, %s", lp->cachepool);
            return 0;
    }

Is it looking in the wrong VG?

Or do I have to have a single VG for this to work?  (That's not made
clear in the documentation, and it seems like a strange restriction).

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
libguestfs lets you edit virtual machines.  Supports shell scripting,
bindings from many languages.  http://libguestfs.org




More information about the linux-lvm mailing list