1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-01-02 01:18:26 +03:00
lvm2/lib/format_text
Peter Rajnoha 7dc8c84b18 activation: add support for skipping activation of selected LVs
Also add -k/--setactivationskip y/n and -K/--ignoreactivationskip
options to lvcreate.

The --setactivationskip y sets the flag in metadata for an LV to
skip the LV during activation. Also, the newly created LV is not
activated.

Thin snapsots have this flag set automatically if not specified
directly by the --setactivationskip y/n option.

The --ignoreactivationskip overrides the activation skip flag set
in metadata for an LV (just for the run of the command - the flag
is not changed in metadata!)

A few examples for the lvcreate with the new options:

  (non-thin snap LV => skip flag not set in MDA + LV activated)
  raw/~ $ lvcreate -l1 vg
    Logical volume "lvol0" created
  raw/~ $ lvs -o lv_name,attr vg/lvol0
    LV    Attr
    lvol0 -wi-a----

  (non-thin snap LV + -ky => skip flag set in MDA + LV not activated)
  raw/~ $ lvcreate -l1 -ky vg
    Logical volume "lvol1" created
  raw/~ $ lvs -o lv_name,attr vg/lvol1
    LV    Attr
    lvol1 -wi------

  (non-thin snap LV + -ky + -K => skip flag set in MDA + LV activated)
  raw/~ $ lvcreate -l1 -ky -K vg
    Logical volume "lvol2" created
  raw/~ $ lvs -o lv_name,attr vg/lvol2
    LV    Attr
    lvol2 -wi-a----

  (thin snap LV => skip flag set in MDA (default behaviour) + LV not activated)
  raw/~ $ lvcreate -L100M -T vg/pool -V 1T -n thin_lv
    Logical volume "thin_lv" created
  raw/~ $ lvcreate -s vg/thin_lv -n thin_snap
    Logical volume "thin_snap" created
  raw/~ $ lvs -o name,attr vg
    LV        Attr
    pool      twi-a-tz-
    thin_lv   Vwi-a-tz-
    thin_snap Vwi---tz-

  (thin snap LV + -K => skip flag set in MDA (default behaviour) + LV activated)
  raw/~ $ lvcreate -s vg/thin_lv -n thin_snap -K
    Logical volume "thin_snap" created
  raw/~ $ lvs -o name,attr vg/thin_lv
    LV      Attr
    thin_lv Vwi-a-tz-

  (thins snap LV + -kn => no skip flag in MDA (default behaviour overridden) + LV activated)
  [0] raw/~ # lvcreate -s vg/thin_lv -n thin_snap -kn
    Logical volume "thin_snap" created
  [0] raw/~ # lvs -o name,attr vg/thin_snap
    LV        Attr
    thin_snap Vwi-a-tz-
2013-07-12 20:39:07 +02:00
..
archive.c cleanup: drop unneeded included header files 2012-08-23 14:37:20 +02:00
archiver.c archive: add missing bit set 2013-07-02 11:07:15 +02:00
archiver.h thin: allow restore with --force 2012-11-27 14:08:24 +01:00
export.c metadata: add support for storing profile name in metadata (during vgcreate/lvcreate) 2013-07-02 15:19:09 +02:00
flags.c activation: add support for skipping activation of selected LVs 2013-07-12 20:39:07 +02:00
format-text.c metadata: add support for storing profile name in metadata (during vgcreate/lvcreate) 2013-07-02 15:19:09 +02:00
format-text.h refactor: rename embedding area -> bootloader area 2013-05-28 12:37:22 +02:00
import_vsn1.c metadata: read VG/LV profile name from metadata if it exists and load it 2013-07-02 15:19:09 +02:00
import-export.h Pass 'single_device' parameter down to suppress 'Can't find uuid' messages 2012-02-29 02:35:35 +00:00
import.c config: add config_source_t type to identify configuration source 2013-07-02 15:19:08 +02:00
layout.h refactor: rename embedding area -> bootloader area 2013-05-28 12:37:22 +02:00
tags.c Move the core of the lib/config/config.c functionality into libdevmapper, 2011-08-30 14:55:15 +00:00
text_export.h Move the core of the lib/config/config.c functionality into libdevmapper, 2011-08-30 14:55:15 +00:00
text_import.h Replace const usage of dm_config_find_node with more appropriate value-lookup 2011-08-31 15:19:19 +00:00
text_label.c refactor: rename embedding area -> bootloader area 2013-05-28 12:37:22 +02:00