Re: [ovirt-users] vdsm lvm filter

2015-06-19 Thread Jiri Belka
> I've got a setup with with ovirt and an equallogic iscsi. Im using the dell
> hit drivers. Install all good, after a reboot the storage won't come up.
> From the vdsm logs i can see the volume groups can't be found. in the lvm
> vgs command the following filter is used: [ '\''r|.*|'\'' ] .
> If I change the LVMCONF_TEMPLATE in /usr/share/vdsm/storage/lvm.py and add
> the filter [ "a|^/dev/eql/ovirt.*|" ], the volume group is found and storage
> will be attached.
> 
> How is the lvm filter constructed? And how can i make sure my volume groups
> are found without editing /usr/share/vdsm/storage/lvm.py?

A shoot from darkness...:

   134  USER_DEV_LIST = filter(None, config.get("irs", 
"lvm_dev_whitelist").split(","))
   135  
   136  
   137  def _buildFilter(devices):
   138  strippeds = set(d.strip() for d in devices)
   139  strippeds.discard('')  # Who has put a blank here?
   140  strippeds = sorted(strippeds)
   141  dmPaths = [dev.replace(r'\x', r'\\x') for dev in strippeds]
   142  filt = '|'.join(dmPaths)
   143  if len(filt) > 0:
   144  filt = "'a|" + filt + "|', "
   145  
   146  filt = "filter = [ " + filt + "'r|.*|' ]"
   147  return filt
   148  
   149  
   150  def _buildConfig(devList):
   151  flt = _buildFilter(chain(devList, USER_DEV_LIST))
   152  conf = LVMCONF_TEMPLATE % flt
   153  return conf.replace("\n", " ")

So maybe lvm_dev_whitelist option in vdsm.conf ?

j.
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


[ovirt-users] vdsm lvm filter

2015-06-11 Thread Renout Gerrits
Hi All,

I've got a setup with with ovirt and an equallogic iscsi. Im using the dell
hit drivers. Install all good, after a reboot the storage won't come up.
>From the vdsm logs i can see the volume groups can't be found. in the lvm
vgs command the following filter is used: [ '\''r|.*|'\'' ] .
If I change the LVMCONF_TEMPLATE in /usr/share/vdsm/storage/lvm.py and add
the filter [ "a|^/dev/eql/ovirt.*|" ], the volume group is found and
storage will be attached.

How is the lvm filter constructed? And how can i make sure my volume groups
are found without editing /usr/share/vdsm/storage/lvm.py?

==snippet vdsm.log 1==
Thread-75::DEBUG::2015-06-11
13:25:03,496::lvm::291::Storage.Misc.excCmd::(cmd) /usr/bin/sudo -n
/sbin/lvm vgs --config ' devices { preferred_names = ["^/dev/mapper/"]
ignore_sus
pended_devices=1 write_cache_state=0 disable_after_error_count=3
obtain_device_list_from_udev=1 filter = [ '\''r|.*|'\'' ] }  global {
 locking_type=1  prioritise_write_locks=1
wait_for_locks=1  use_lvmetad=0 }  backup {  retain_min = 50  retain_days =
0 } ' --noheadings --units b --nosuffix --separator '|'
--ignoreskippedcluster -o uuid,name,attr,size,
free,extent_size,extent_count,free_count,tags,vg_mda_size,vg_mda_free,lv_count,pv_count,pv_name
9d551570-ef74-45b7-ba86-a908f1231ca8 (cwd None)
Thread-75::DEBUG::2015-06-11
13:25:03,825::lvm::291::Storage.Misc.excCmd::(cmd) FAILED:  = '
 Volume group "9d551570-ef74-45b7-ba86-a908f1231ca8" not found\n  Skipping
volum
e group 9d551570-ef74-45b7-ba86-a908f1231ca8\n';  = 5
Thread-75::WARNING::2015-06-11
13:25:03,828::lvm::376::Storage.LVM::(_reloadvgs) lvm vgs failed: 5 [] ['
 Volume group "9d551570-ef74-45b7-ba86-a908f1231ca8" not found', '  Skipp
ing volume group 9d551570-ef74-45b7-ba86-a908f1231ca8']
==

==snippet vdsm.log 2==
storageRefresh::DEBUG::2015-06-11
13:37:13,602::lvm::292::Storage.Misc.excCmd::(cmd) /usr/bin/sudo -n
/sbin/lvm lvs --config ' devices { preferred_names = ["^/dev/mapper/"]
ignore_suspended_devices=1 write_cache_state=0 disable_after_error_count=3
obtain_device_list_from_udev=0 filter = [ "a|^/dev/eql/ovirt.*|" ] filter =
[ '\''r|.*|'\'' ] }  global {  locking_type=1  prioritise_write_locks=1
 wait_for_locks=1  use_lvmetad=0 }  backup {  retain_min = 50  retain_days
= 0 } ' --noheadings --units b --nosuffix --separator '|'
--ignoreskippedcluster -o
uuid,name,vg_name,attr,size,seg_start_pe,devices,tags (cwd None)
storageRefresh::DEBUG::2015-06-11
13:37:13,978::lvm::292::Storage.Misc.excCmd::(cmd) SUCCESS:  = '
 WARNING: Ignoring duplicate config node: filter (seeking filter)\n  Found
duplicate PV FeScSs3Umv5wXtZCRvauf17sLaeQnS7e: using
/dev/mapper/eql-0-af1ff6-8865608d7-3c400636c28555dd_b not
/dev/mapper/eql-0-af1ff6-8865608d7-3c400636c28555dd_a\n  Found duplicate PV
FeScSs3Umv5wXtZCRvauf17sLaeQnS7e: using
/dev/mapper/eql-0-af1ff6-8865608d7-3c400636c28555dd-ovirt-storage02 not
/dev/mapper/eql-0-af1ff6-8865608d7-3c400636c28555dd_b\n  Found duplicate PV
hyyv4hWZiKT0UDdoDEyPZ5XrHc31hlTs: using
/dev/mapper/eql-0-af1ff6-3cb5608d7-c1a0063645b5559b_b not
/dev/mapper/eql-0-af1ff6-3cb5608d7-c1a0063645b5559b_a\n  Found duplicate PV
hyyv4hWZiKT0UDdoDEyPZ5XrHc31hlTs: using
/dev/mapper/eql-0-af1ff6-3cb5608d7-c1a0063645b5559b-ovirt-storage01 not
/dev/mapper/eql-0-af1ff6-3cb5608d7-c1a0063645b5559b_b\n';  = 0
==

# rpm -qa |grep vdsm
vdsm-jsonrpc-4.16.14-0.el6.noarch
vdsm-xmlrpc-4.16.14-0.el6.noarch
vdsm-python-zombiereaper-4.16.14-0.el6.noarch
vdsm-python-4.16.14-0.el6.noarch
vdsm-cli-4.16.14-0.el6.noarch
vdsm-4.16.14-0.el6.x86_64
vdsm-yajsonrpc-4.16.14-0.el6.noarch

Thanks!
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users