ahuffman.lvm
ahuffman.lvm
This tool sets up Logical Volume Groups (VGs), Logical Volumes (LVs), filesystems, mount points, and the fstab configuration.
Variables
Variable Name | Description | Required | Default Value | Type |
---|---|---|---|---|
lvm_vgs | Defines logical volume groups | yes | [{}] | list of dictionaries. |
lvm_lvs | Defines details of logical volumes, including filesystem, permissions, and mount points | yes | [{}] | list of dictionaries. |
lvm_vgs Parameters and Usage
lvm_vgs
: A list to define multiple Logical Volume Groups
name
: Name of the Logical Volume Groupvg
: Name of the volume group you want to createpvs
: List of physical volumes used to create the Logical Volume Group- /dev/sdb
- /dev/sdc
lvm_lvs Parameters and Usage
lvm_lvs
: A list to define multiple Logical Volumes
name
: Name of the Logical Volumevg
: Volume Group where the Logical Volume will be createdlv
: Name of the Logical Volumesize
: Size of the Logical Volumemount
: Location where the Logical Volume will be mountedmount_owner
: Owner of the mount pointmount_group
: Group ownership of the mount pointmount_mode
: Permissions for the mount pointmount_dump
: Indicates if the filesystem should be backed up (5th column in /etc/fstab)mount_passno
: Filesystem check number (6th column in /etc/fstab)mount_opts
: Options for mounting, like defaultsfstype
: Type of filesystem for the Logical Volume
Example Playbook
- name: "Set up standard disk layout"
hosts: "servers"
roles:
- role: "ahuffman.lvm"
lvm_vgs:
- name: "vg1"
vg: "vg_myvg1"
pvs:
- "/dev/sdb"
- "/dev/sdc"
- name: "vg2"
vg: "vg_myvg2"
pvs:
- "/dev/sdd"
lvm_lvs:
- name: "Data Volume"
vg: "vg_myvg1"
lv: "lv_data"
size: "25g"
mount: "/data/mydata"
mount_owner: "root"
mount_group: "root"
mount_mode: "0755"
mount_dump: "1"
mount_passno: "2"
mount_opts: "defaults"
fstype: "xfs"
- name: "Web Content"
vg: "vg_myvg2"
lv: "lv_www"
size: "20g"
mount: "/data/www"
mount_owner: "root"
mount_group: "root"
mount_mode: "0755"
mount_dump: "1"
mount_passno: "2"
mount_opts: "defaults"
fstype: "xfs"
- name: "Temporary Space"
vg: "vg_myvg1"
lv: "lv_temp"
size: "35g"
mount: "/temp"
mount_owner: "root"
mount_group: "root"
mount_mode: "0755"
mount_dump: "1"
mount_passno: "2"
mount_opts: "defaults"
fstype: "xfs"
License
Author Information
Informazioni sul progetto
An Ansible Role to create Logical Volume Groups, Logical Volumes, filesystems, mountpoints, etc.
Installa
ansible-galaxy install ahuffman.lvm
Licenza
mit
Download
16.1k
Proprietario