← Back to team overview

openstack team mailing list archive

LVM over LVM is acceptable?

 

Hi all,

I have a scenario for using cinder with tgtd over the lvm.

I creat a lvm named vol-0 and attach it to the machine com-0. After a
period of time, the vol-0 is full and I want to extend it. At now, I have
two solutions.

   1.

   Because the vol-0 is manage by the LVM on the hoster. So I can extend
   the size of it by using lvextend. But I meet that the vm(com-0) can not
   be aware this. Should I make some extrac operations like reseize2fs? I
   have no ideas.
    2.

   In the vm (com-0), I can treat the vol-0 as a normal block device and
   create lvm on it. When need more space, the hoster can "plug" a new lvm
   device(vol-1) on it. In the vm, I can add it to the lvm. But I found
   another problem. Because the vol-* is not real block device, when I
   create lvm on it, the hoster is aware of it. The result is that on the
   hoster, another PV is created base on a lvm partition like bellow. I want
   to know, it is acceptable?

  --- Physical volume ---
  PV Name
/dev/cinder-volumes/volume-ddac25fc-4cc2-4167-be12-4cef2438de0b
  VG Name               data
  PV Size               30.00 GiB / not usable 4.00 MiB
  Allocatable           yes
  PE Size               4.00 MiB
  Total PE              7679
  Free PE               2559
  Allocated PE          5120
  PV UUID               zChRw9-nVru-rF5o-YYUx-hcIa-Zen4-Ff5IOf

Besides these two solution ( with issue ;) ), could you give me some better
suggestion?
-- 
Lei Zhang

Blog: http://jeffrey4l.github.com
twitter/weibo: @jeffrey4l

Follow ups