Skip to content

Latest commit

 

History

History
165 lines (105 loc) · 4.79 KB

REFERENCE.md

File metadata and controls

165 lines (105 loc) · 4.79 KB

Reference

Table of Contents

Classes

  • profile_lvm: Installs LVM software and wraps/provides defaults for the standalone lvm module.
  • profile_lvm::bindmounts: Create bindmounts from (within) LVs on a directory

Defined types

Classes

profile_lvm

Installs LVM software and wraps/provides defaults for the standalone lvm module.

Examples

include profile_lvm

Parameters

The following parameters are available in the profile_lvm class:

required_pkgs

Data type: Array

Names of lvm package(s (usually lvm2).

default_fs_type

Data type: String

WARNING: default = xfs via data-in-module for this. Overrides default of ext4 from ::lvm module. It would be better to not have a default (it's very dangerous, because if you don't specify the fs_type and your existing LVM has a different type, it seems that it would reformat the fs. But since the ::lvm module already has a default, let's override it with a better one for NCSA systems.

lvs

Data type: Hash[String[1],Hash]

Key-value pairs used to declare ::lvm::logical_volume resources. Lookup is merge, but not deep. Form: keys = names of LVM resources (String) values = params for LVM resources (Hash)

BE VERY CAREFUL WITH WHAT YOU PUT IN HIERA FOR THIS CLASS/PARAMETER! This is especially the case for LVMs that already exist (created manually or via xCAT). To manage an existing LVM you'll generally* need to minimally specify:

  • mountpath
  • volume_group (* Settings to configure LVM-based swap space would not include a mountpath, for instance, and should specify fs_type to be 'swap'.) MAKE SURE that the fs_type is/should be xfs otherwise override that as well. And be careful if you specify size. You can often grow the LVM and its filesystem but generally cannot shrink the filesystem. (The lvm module seems to error and refuse to try, which is good. But be careful!)

It's intended for Hiera to do a hash merge but NOT a deep merge of the lvms param. This is so we intentionally and clearly specify all required parameters at each level just to be safe.

NOTE: If you use this class to start managing an existing (definitely an xCAT-deployed) LVM it will likely insist on cleaning up your mount in fstab, e.g.,: Notice: /Stage[main]/Stdcfg::Lvm/Lvm::Logical_volume[LVvar]/Mount[/var]/device: device changed '/dev/mapper/VGsystem-LVvar' to '/dev/VGsystem/LVvar' Notice: /Stage[main]/Stdcfg::Lvm/Lvm::Logical_volume[LVvar]/Mount[/var]/pass: pass changed '0' to '2' This should not cause an actual remount.

profile_lvm::bindmounts

  profile_lvm::bindmounts::map:
    "/var/spool/slurmctld.state":
      #opts: "defaults,bind,noauto,ro"
      src_lv: "slurm"
      src_path: "/slurm/slurmctld.state"

Examples

include profile_lvm::bindmounts

Parameters

The following parameters are available in the profile_lvm::bindmounts class:

map

Data type: Optional[Hash]

mapping of bindmounts from LVs and their paths/sub-directories

Example hiera parameter:

Default value: undef

Defined types

profile_lvm::bindmount_resource

Assumes that we are bindmounting from an LV or sub-directory of an LV.

Examples

profile_lvm::bindmount_resource { "/var/spool/slurmctld.state":
  #opts      => "defaults,bind,noauto,ro"
  src_lv    => "slurm",
  src_path  => "/slurm/slurmctld.state",
}

Parameters

The following parameters are available in the profile_lvm::bindmount_resource defined type:

opts

Data type: String

Mount options. MUST include 'bind'.

Default value: 'defaults,bind,noauto'

src_lv

Data type: String

The LV we are bindmounting from.

src_path

Data type: String

The location we are bindmounting from (either same as mountpoint of src_lv or a sub-directory).