diff --git a/_toc.yml b/_toc.yml index f80770d3..36bc1f12 100644 --- a/_toc.yml +++ b/_toc.yml @@ -34,7 +34,6 @@ chapters: - file: admin-guide/deployment/dmz - file: admin-guide/deployment/reinstall - file: admin-guide/deployment/partitioning - - file: admin-guide/deployment/sysdb_env - file: admin-guide/configuration sections: - file: admin-guide/configuration/icinga2 @@ -46,7 +45,7 @@ chapters: - file: admin-guide/configuration/mount - file: admin-guide/configuration/distribute_files - file: admin-guide/configuration/resize_vm_disk - - file: admin-guide/configuration/vgroot + - file: admin-guide/configuration/partitioning - file: admin-guide/configuration/networking - file: admin-guide/configuration/xrdp - file: admin-guide/configuration/puppet_agent @@ -128,6 +127,7 @@ chapters: - file: infrastructure-guide/initial_setup - file: infrastructure-guide/test_systems - file: infrastructure-guide/custom_repositories + - file: infrastructure-guide/new_sysdb_environment - file: infrastructure-guide/ipxe - file: rhel8/index diff --git a/admin-guide/configuration/vgroot.md b/admin-guide/configuration/partitioning.md similarity index 62% rename from admin-guide/configuration/vgroot.md rename to admin-guide/configuration/partitioning.md index 35f193da..3411b485 100644 --- a/admin-guide/configuration/vgroot.md +++ b/admin-guide/configuration/partitioning.md @@ -1,10 +1,12 @@ -# Resize System Volumes +# Partitioning + +## Resize System Volumes The size of the system volumes (inside volume group `vgroot`), are automatically set on a rather small size at the initial installation. Note that due to the limitations of XFS a volume can only be increased, not be shrunk. -## Get Available Space and Volume Sizes +### Get Available Space and Volume Sizes To check how much space is still available, use `pvs` and look for the volume group `vgroot`: ``` @@ -27,7 +29,7 @@ Then `lvs` gives the sizes of the volumes inside: [root@lxdev00 ~]# ``` -## Extend System Volume +### Extend System Volume This can be done in Hiera with the `vgroot::path` key where for each volume which should be increased a new minium size can be set: @@ -43,3 +45,35 @@ This is then applied on the next puppet run, you may trigger one as `root`: ``` puppet agent -t ``` + +## Custom Partitioning + +To add a new volume to the system disk, you need to address the [lvm Puppet module](https://forge.puppet.com/modules/puppetlabs/lvm) directly in Hiera:: + +```yaml +lvm::volume_groups: + vg_root: + physical_volumes: + - /dev/nvme0n1p3 + logical_volumes: + lv_data: + size: 3TB + fs_type: 'xfs' + mountpath: '/mnt/data' + size_is_minsize: true +``` + +Please note that you need also to list the partition on which `vg_root` is located. + +The same you can do to add partitions outside of the system disk, but here you need to define the full LVM volume group: + +```yaml +lvm::volume_groups: + vg_data: + physical_volumes: + - '/dev/sdb' + logical_volumes: + lv_usr_local: + mountpath: '/usr/local' + fs_type: 'xfs' +``` \ No newline at end of file diff --git a/admin-guide/deployment/partitioning.md b/admin-guide/deployment/partitioning.md new file mode 100644 index 00000000..fdb57835 --- /dev/null +++ b/admin-guide/deployment/partitioning.md @@ -0,0 +1,42 @@ +# Partitioning + +## Default Partitioning + +Partitions system are configured with a standard schema using LVM, so that they can be possibly changed afterwards. + +By default the whole space available on the first block device is used and any existing partition is removed. + +Alternatively you might set the sysdb attribute `system_disk` with the device name of the disk which should be used instead:: + +```bash +bob node set-attr $FQDN system_disk=md126 +``` + +### RHEL7 +The default partition schema for RHEL7 is: + +- create one primary ``/boot`` partition of 1Gb; +- create the ``vg_root`` Volume Group that uses the rest of the disk; +- on ``vg_root`` create the following logical volumes: + - ``lv_root`` of 12 Gb size for ``/root``; + - ``lv_var`` of 8 Gb size for ``/var``; + - ``lv_var_log`` of 2 Gb size for ``/var/log``; + - ``lv_tmp`` of 2 Gb size for ``/tmp``. + +### RHEL8 +The default partition schema for RHEL8 is: + + - create one primary ``/boot`` partition of 1Gb; + - create the ``vg_root`` Volume Group that uses the rest of the disk; + - on ``vg_root`` create the following logical volumes: + - ``lv_root`` of 14 Gb size for ``/root``; + - ``lv_home`` of 2 Gb size for ``/home``; + - ``lv_var`` of 8 Gb size for ``/var``; + - ``lv_var_log`` of 3 Gb size for ``/var/log``; + - ``lv_var_tmp`` of 2 Gb size for ``/var/log``; + - ``lv_tmp`` of 2 Gb size for ``/tmp``. + + +# Custom Partitioning + +It is possible to customize the partitioning by using the `partitions` attribute on sysdb. See https://git.psi.ch/linux-infra/bob for more details. diff --git a/admin-guide/deployment/partitioning.rst b/admin-guide/deployment/partitioning.rst deleted file mode 100644 index 8d5aa208..00000000 --- a/admin-guide/deployment/partitioning.rst +++ /dev/null @@ -1,88 +0,0 @@ -Partitioning -============ - -Default Partitioning --------------------- -Partitions system are configured with a standard schema using LVM, so -that they can be possibly changed afterwards. - -By default the whole space available on the first block device is used -and any existing partition is removed. - -Alternatively you might set the sysdb attribute ``system_disk`` with the -device name of the disk which should be used instead:: - - bob node set-attr $FQDN system_disk=md126 - -The default partition schema for RHEL 7 is: - - - create one primary ``/boot`` partition of 1Gb; - - create the ``vg_root`` Volume Group that uses the rest of the disk; - - on ``vg_root`` create the following logical volumes: - - ``lv_root`` of 12 Gb size for ``/root``; - - ``lv_var`` of 8 Gb size for ``/var``; - - ``lv_var_log`` of 2 Gb size for ``/var/log``; - - ``lv_tmp`` of 2 Gb size for ``/tmp``. - -For RHEL 8 it is: - - - create one primary ``/boot`` partition of 1Gb; - - create the ``vg_root`` Volume Group that uses the rest of the disk; - - on ``vg_root`` create the following logical volumes: - - ``lv_root`` of 14 Gb size for ``/root``; - - ``lv_home`` of 2 Gb size for ``/home``; - - ``lv_var`` of 8 Gb size for ``/var``; - - ``lv_var_log`` of 3 Gb size for ``/var/log``; - - ``lv_var_tmp`` of 2 Gb size for ``/var/log``; - - ``lv_tmp`` of 2 Gb size for ``/tmp``. - -Partial Custom Partitioning ---------------------------- - -To increase these sizes of the above listed default volumes, you might use :doc:`vgroot::path <../puppet/profiles/vgroot>` in Hiera:: - - vgroot::path: - lv_root: 50GB - lv_var: 30GB - -To add a new volume to the system disk (Volume Group ``vg_root``), you need to address the `lvm Puppet module `_ directly in Hiera:: - - lvm::volume_groups: - vg_root: - physical_volumes: - - /dev/nvme0n1p3 - logical_volumes: - lv_data: - size: 3TB - fs_type: 'xfs' - mountpath: '/mnt/data' - size_is_minsize: true - -Please note that you need also to list the partition on which ``vg_root`` is located. - -The same you can do to add partitions outside of the system disk, but here you need to define the full LVM volume group:: - - lvm::volume_groups: - vg_data: - physical_volumes: - - '/dev/sdb' - logical_volumes: - lv_usr_local: - mountpath: '/usr/local' - fs_type: 'xfs' - - - -Full Custom Partitioning ------------------------- -It is possible to customize the partitioning by using the ``partitions`` attribute on sysdb. - -The ``partitions`` attribute can take two values: - - - ``manual``: this will not partition the disks and the installation process will wait for manual partitioning; - - ````: it is assumed to be a file containing the partitioning commands as used in kickstart. - -If it is not possible to download the given URL the system fails-back to manual at installation time. -Please also note that no check is done on the URL content. - - diff --git a/admin-guide/deployment/sysdb_env.md b/infrastructure-guide/new_sysdb_environment.md similarity index 99% rename from admin-guide/deployment/sysdb_env.md rename to infrastructure-guide/new_sysdb_environment.md index 6d949c36..5e759e3c 100644 --- a/admin-guide/deployment/sysdb_env.md +++ b/infrastructure-guide/new_sysdb_environment.md @@ -1,4 +1,4 @@ -# New Sysdb Deployment Environment +# New Sysdb Environment ## Introduction