Bug 857325 - the LVs based on iSCSI LUN are inactive after reboot
the LVs based on iSCSI LUN are inactive after reboot
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: lvm2 (Show other bugs)
7.0
Unspecified Unspecified
high Severity high
: rc
: ---
Assigned To: Peter Rajnoha
Cluster QE
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-09-14 02:28 EDT by Xiaowei Li
Modified: 2015-01-26 19:10 EST (History)
9 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-12-17 00:50:29 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Xiaowei Li 2012-09-14 02:28:15 EDT
Description of problem:
There is no daemon ( such as multipathd for multipath ) to monitor the block device for LVM.
So We have to active the VG manually if re-connect(logout & login) the iscsi Lun.

It's hard to use LVM on iscsi due to this issues.
The LVs on iscsi LUNs are not activated after OS reboot or iscsi connection failback. 


Version-Release number of selected component (if applicable):
lvm2-2.02.97-1.el7.x86_64
kernel-3.5.0-0.24.el7.x86_64

How reproducible:


Steps to Reproduce:
1. create VG & LV on the iscsi mpath disks.
LVM->mpath->iscsi
# iscsiadm -m discovery -t st -p server
# iscsiadm -m node -p server -l
# multipath
# pvcreate /dev/mapper/mpathc
# vgcreate iscsivg /dev/mapper/mpathc
# lvcreate -l10 -n iscsivg/lv
2. reboot
  
Actual results:
after reboot, the LVs based on iscsi disks are not active.
# lvs iscsivg
  LV   VG      Attr     LSize  Pool Origin Data%  Move Log Copy%  Convert
  lv   iscsivg -wi----- 40.00m   

Expected results:
should active the LVs after reboot.

Additional info:
Comment 1 Peter Rajnoha 2012-09-14 04:36:59 EDT
(In reply to comment #0)
> Description of problem:
> There is no daemon ( such as multipathd for multipath ) to monitor the block
> device for LVM.

Actually, there is - lvmetad (the LVM metadata caching daemon). When this daemon is used, we can easily activate volumes anytime based on device appearance - the activation of LVM volumes is event-based while using lvmetad.

This daemon is relatively new and we're still working on making it more robust with the intention to make it enabled by default in 6.4/6.5 and definitely for 7.0.

See also:

  - design doc: http://git.fedorahosted.org/cgit/lvm2.git/tree/doc/lvmetad_design.txt

  - the "activation/auto_activation_volume_list" in lvm.conf: http://git.fedorahosted.org/cgit/lvm2.git/tree/doc/example.conf.in#n567

There's also related bug #474833.

Without lvmetad, we'd need extra vgchange -ay call *after* iscsi is initialized (see also https://bugzilla.redhat.com/show_bug.cgi?id=474833#c12). So I think using lvmetad is much better way to go here.

Stay tuned with the updates for the RHEL7 builds, more patches/enhancements will surely follow to support lvmetad and this event-based mechanism better.
Comment 5 Peter Rajnoha 2012-12-14 03:33:48 EST
Could you please try using lvmetad by enabling it with global/use_lvmetad=1 lvm.conf setting and see if resolves your activation problem (but for now, cluster and lvmetad is not supported yet, so this works only for local activation at the moment).

The volumes should be autoactivated as soon as the VG is complete (it has all PVs in place). You can control which volumes to autoactivate using the activation/auto_activation_volume_list in lvm.conf.
Comment 6 Xiaowei Li 2012-12-17 00:50:29 EST
(In reply to comment #5)
> Could you please try using lvmetad by enabling it with global/use_lvmetad=1
> lvm.conf setting and see if resolves your activation problem (but for now,
> cluster and lvmetad is not supported yet, so this works only for local
> activation at the moment).
> 
> The volumes should be autoactivated as soon as the VG is complete (it has
> all PVs in place). You can control which volumes to autoactivate using the
> activation/auto_activation_volume_list in lvm.conf.

tested with lvm2-2.02.98-4.el7.x86_64. Yes, lvmetad can resolve this issue. So close this bug.

Note You need to log in before you can comment on or make changes to this bug.