[linux-lvm] [PATCH LVM2] (0/3) 'cling' allocation policy

Jun'ichi Nomura j-nomura at ce.jp.nec.com
Fri Oct 6 21:54:20 UTC 2006


Hi,

These series of patches implement 'cling' allocation policy.
Patches are applicable to LVM2 2.02.10.

In current implementation, 'normal' policy allows the allocation
like this (output of lvs -a -o+devices):
  LV             Devices
  lv0            lv0_mimage_0(0),lv0_mimage_1(0)
  [lv0_mimage_0] /dev/sdb(0)
  [lv0_mimage_0] /dev/sda(2)
  [lv0_mimage_1] /dev/sda(0)
  [lv0_mimage_1] /dev/sdb(2)
  [lv0_mlog]     /dev/sdc(0)
  dummy1         /dev/sda(1)
  dummy2         /dev/sdb(1)
  dummy3         /dev/sdc(1)

You see /dev/sda is used for both lv0_mimage_0 and lv0_mimage_1.
If this disk breaks, you lose the whole LV.

In this case, what I think is better is something like this:
  LV             Devices
  lv0            lv0_mimage_0(0),lv0_mimage_1(0)
  [lv0_mimage_0] /dev/sdb(0)
  [lv0_mimage_0] /dev/sdb(2)
  [lv0_mimage_1] /dev/sda(0)
  [lv0_mimage_1] /dev/sda(2)
  [lv0_mlog]     /dev/sdc(0)
  dummy1         /dev/sda(1)
  dummy2         /dev/sdb(1)
  dummy3         /dev/sdc(1)

With these patches, 'normal' allocation tries to do the latter first.

Attached is a VG metadata as a testcase.

Thanks,
-- 
Jun'ichi Nomura, NEC Corporation of America
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: testvg0_alloc-cling.vg
URL: <http://listman.redhat.com/archives/linux-lvm/attachments/20061006/3830eed6/attachment.ksh>


More information about the linux-lvm mailing list