Bug 990511

Summary: RFE: Persistently flag LVs to be skipped on activation
Product: Red Hat Enterprise Linux 7 Reporter: Peter Rajnoha <prajnoha>
Component: lvm2Assignee: LVM and device-mapper development team <lvm-team>
lvm2 sub component: Default / Unclassified QA Contact: cluster-qe <cluster-qe>
Status: CLOSED CURRENTRELEASE Docs Contact:
Severity: medium    
Priority: medium CC: agk, heinzm, jbrassow, msnitzer, prajnoha, prockai, thornber, zkabelac
Version: 7.0Keywords: FutureFeature, Triaged
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-04-23 08:16:49 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Peter Rajnoha 2013-07-31 10:53:39 UTC
(This RFE is primarily for QE to make notes on testing this feature, report any findings etc...)

Add support for flagging LVs to be skipped on activation and make this flag persistent until changed explicitly with an lvm command.

On lvcreate, we can select which volumes should be assigned the 'activation skip' flag by using:

  lvcreate -k/--setactivationskip y/n

By default, if the -k/--setactivationskip option is not defined, these rules apply:

  - if the volume being created is a thin snapshot volume, then assume -k/--setactivationskip y

  - otherwise, for any other volumes, assume -k/--setactivationskip n (so activate these volumes next time)


If the 'activation skip' flag is set for an LV, we can ignore it by using the -K/--ignoreactivationskip option:

  vgchange/lvchange -K/--ignoreactivationskip

...will ignore the skip even if the flag is set.


To see whether the flag is set for an LV, check the 10th bit of the lv_attr field in the lvs -o+lv_attr output (in case the flag is set, the lv_attr has 'k' set as the 10th bit):

 - no skip flag set:
  raw/~ # lvs -o lv_name,lv_attr
  LV    Attr      
  lvol0 -wi-a-----

 - skip flag set:
  raw/~ # lvs -o lv_name,lv_attr
  LV    Attr      
  lvol0 -wi-a----k


To set/unset the flag for existing LV, use:

  vgchange/lvchange -k/--setactivationskip y/n


I'll add test exact cases shortly...