Partitioning the OS with the BIOS Boot Option

Depending on the requirements, you can extend the size of the partitions in a physical volume to accommodate all the logs and other appliance related data. You can utilize the Logical Volume Manager (LVM) to increase the partitions in the physical volume. Using LVM, you can manage hard disk storage to allocate, mirror, or resize volumes.

In an appliance, the physical volume is divided into the following three logical volume groups:

PartitionDescription
BootContains the boot information
PTYVGContains the files and information about OS and logs
Data Volume GroupContains the data that in the /opt directory

The PTYVG volume partition contains the OS information. You must increase the PTYVG volume group to extend the root partition. The following table describes the different logical volumes in the PTYVG volume group.

Logical VolumeDescriptionDefault Size
OSThe root partition
  • 8 GB for upgrading the appliance from 9.0.0.0 and 9.1.0.x to v9.2.0.0 and higher versions.
  • 16 GB for ISO and cloud installation.
OS-bakThe backup for the root partition
  • 8 GB for upgrading the appliance from 9.0.0.0 and 9.1.0.x to v9.2.0.0 and higher versions.
  • 16 GB for ISO installation.
LOGSThe logs that are in the /var/log directory
  • 6 GB for upgrading the appliance from 9.0.0.0 and 9.1.0.x to v9.2.0.0 and higher versions.
  • 12 GB for ISO and cloud installation.
SWAPThe swap partition
    By default, 2 GB for appliances products.
    The swap partition for ESA is 8 GB.

The following table illustrates the partitioning of all the logical volume groups in a single hard disk system.

Table: Partition of Logical Volume Groups

PartitionPartition NamePhysical VolumeVolume GroupDirectoryDirectory PathUpgraded Appliances SizeISO and Cloud Installation Size
/dev/sdasda1   /boot 400M
sda2     100M
sda3Physical Volume 1PTYVGOS/8G16G
OS_bak 8G16G
logs/var/log6G12
swap[SWAP]By default, 2G for appliances products.
The swap partition for ESA is 8G.
sda4Physical Volume 2PTYVG_DATAopt/opt/docker/lib50% of rest
opt_bak 50% of rest
  • For Cloud-based platforms, the OS_bak directory is not available in the data volume group. The data in the PTYVG partition is available in the OS directory only.
  • For Cloud-based platforms, the opt_bak directory is not available in the data volume group. The data in the PTYVG_DATA partition is available in the opt directory only.

If multiple hard disks installed on an appliance, then you can select the required hard disks for configuring the OS volume and the data volume. You can also extend the OS partition or the disk partition across the hard disks that are installed on the appliance.

The following table illustrates an example of partitioning in multiple hard disks.

Table: Partitioning in Multiple Hard Drives

PartitionPartition NamePhysical VolumeVolume GroupDirectoryDirectory PathUpgraded Appliances SizeISO and Cloud Installation Size
/dev/sdasda1   /boot 400M
sda2     100M
sda3Physical Volume 1PTYVGOS/8G16G
OS_bak 8G16G
logs/var/log6G12G
swap[SWAP]By default, 2G for appliances products.
The swap partition for ESA is 8G.
sda4Physical Volume 2PTYVG_DATAopt/opt/docker/lib50% of rest
opt_bak 50% of rest
PartitionPhysical VolumeVolume GroupDirectoryDirectory PathSize
/dev/sdbPhysical Volume 1PTYVG_DATAopt/opt/docker/lib50%
opt_bak 50%
  • For Cloud-based platforms, the OS_bak directory is not available in the data volume group. The data in the PTYVG partition is available in the OS directory only.
  • For Cloud-based platforms, the opt_bak directory is not available in the data volume group. The data in the PTYVG_DATA partition is available in the opt directory only.

The hard disk, sda, contains the partitions for the root and the PTYVG volumes. The hard disk, sdb contains the partition for the data volume group.

Extending the OS partition

The following sections describe the procedures to extend the OS partition.

Before you begin

Before extending the OS partition, it is recommended to back up your appliance. It ensures that you can roll back your changes in case of an error.

When you add a new hard disk to the partition, you should restart the system. This ensures that all the hard disks appear.

  • For the Cloud-based platforms, the names of the hard disks may get updated after restarting the system.
  • Ensure that the you verify the names of the hard disks before proceeding further.

Starting in Single User Mode

You must load in the Single User Mode to change the kernel command line.

For Cloud-based platforms, the Single User Mode is unavailable. It is recommended to perform the following operations from the OS Console. While performing these operations, ensure that the system is accessible by only a single user.

To boot into Single User Mode:

  1. Install a new hard disk on the appliance.

    For more information about installing a new hard disk, refer here.

  2. Boot the appliance in Single User Mode.

  3. If the GRUB Credentials are enabled, the screen to enter the GRUB credentials appears. Enter the credentials and press ENTER.

    The following screen appears.

  4. Select Normal and press E.

    The following screen appears.

  5. Select the linux/generic line and append <SPACE>S to the end of the line as shown in the following figure.

  6. Press F10 to restart the appliance.

    After the appliance is restarted, a prompt to enter the root password appears.

  7. Enter the root password and press ENTER.

Creating a Partition

After editing the kernel command line, you must create the required partitions.

The following procedure describes how to create a partition on a new hard disk, sdb. You can add multiple hard disks to the appliance.

  • If you add multiple hard disks to the appliance, then the devices are created as /dev/sdb, /dev/sdc, /dev/sdd, and so on. You can select the required hard disk based on the storage space available.

  • For Cloud-based platforms, the names of the hard disk might differ. Based on the cloud platform, the hard disk names may appear as nvme1n1, xvdb, or so on.

To create a partition:

  1. Run the following command to list the hard disks that are available.

    lsblk
    
  2. Run the following command to format the partition.

    fdisk /dev/sdb
    
  3. Type o to create a partition table and press ENTER.

  4. Type n to create a new partition and press ENTER.

  5. Type p to create a primary partition and press ENTER.

  6. In the following prompt, assign a partition number to the new partition.

    If you want to enter the default number for the partition, then press ENTER.

  7. Type the required starting partition sector for the partition.

    If you want to enter the default sector for the partition, then press ENTER.

  8. Type the last sector for the partition and press ENTER.

    If you want to enter the default sector for the partition, then press ENTER.

  9. Type t to change the type of the new partition and press ENTER.

  10. Type 8e to convert the disk partition to Linux LVM and press ENTER.

  11. Type w to save the changes and press ENTER.

    A message The partition table has been altered! appears.

  12. Run the following command to initialize the disk partition that is used with LVM.

    pvcreate /dev/sdb1
    

    For Cloud-based platforms, you should use the name of the disk partition only. For instance, if the name of the hard disk on the Cloud-based platform is nvme0n1, then run the following command to initialize the disk partition that is used with LVM.

    pvcreate /dev/nvme0n1
    

    If the following confirmation message appears, then press y.

     WARNING: dos signature detected on /dev/sdb1 at offset 510. Wipe it? [y/n]: y
    

    A message Physical volume “/dev/sdb1” is successfully created appears.

  13. Run the following command to extend the PTYVG volume.

    vgextend PTYVG /dev/sdb1
    

    A message Volume group “PTYVG” successfully extended appears.

Extending the OS and the Backup Volume

After extending the PTYVG volume you can resize the OS and the OS_bak volumes using the lvextend and resize commands.

Ensure that you consider the following points before extending the partitions in the PTYVG volume group:

  • Back up the OS partition before extending the partition.
  • Back up the policy, LDAP, and other required data to the /opt directory before extending the volume.

The following procedure describes how to extend the OS and the OS_bak volumes by 4 GB.

Ensure that there is enough free space available while extending the size of the OS, the OS_bak, and the log volumes. For instance, if you extend the hard disk by 1 GB and if the space is less than the required level, then the following error appears.

Insufficient free space: 1024 extents needed, but only 1023 available

To resolve this error, you must increase the partition size by 0.9 GB.

To create a partition:

  1. Run the following commands to extend the OS-bak and OS volume.

    # lvextend -L +4G /dev/PTYVG/OS_bak
    

    A message Logical Volume OS_bak successfully resized appears.

    Ensure that the you extend the size of the OS and the OS_bak volumes to the same value.

  2. Run the following command to resize the file system in the OS_bak volume.

    # resize2fs /dev/mapper/PTYVG-OS_bak
    

    A message resize2fs: On-Line resizing finished successfully appears.

  3. Run the following commands to extend the OS volume.

    # lvextend -L +4G /dev/PTYVG/OS
    

    A message Logical Volume OS successfully resized appears.

  4. Run the following command to resize the file system in the OS volume.

    # resize2fs /dev/mapper/PTYVG-OS
    

    A message resize2fs: On-Line resizing finished successfully appears.

  5. Restart the appliance.

Extending the Logs Volume

You can resize the logs volume using the lvextend and resize commands. This ensures that you provision the required space for the logs that are generated. You must back up the current logs to the /opt directory before extending the logs volume.

Before extending the logs volume, ensure that you start the appliance in Single User Mode and create a partition.

For more information about Single User Mode, refer here.

For more information about creating a partition, refer here.

The following procedure describes how to extend the logs volume by 4 GB.

To extend the logs volume:

  1. Run the following commands to create a temporary folder in the /opt directory.

    # mkdir /opt/tmp/logs
    
  2. Run the following command to copy the files from the logs volume to the /opt directory.

    # /usr/bin/rsync -axzHS --delete-before /var/log/ /opt/tmp/logs/
    

    While copying the logs from the /var/log/ directory to the /opt directory, ensure that the space available in the /opt directory is more than the size of the logs.

  3. Run the following commands to extend the logs volume.

    # lvextend -L +4G /dev/PTYVG/logs
    

    A message Logical Volume logs successfully resized appears.

  4. Run the following command to resize the file system in the logs volume.

    # resize2fs /dev/mapper/PTYVG-logs
    

    A message resize2fs: On-Line resizing finished successfully appears.

  5. Run the following command to copy the files from /opt directory to the logs volume.

    # /usr/bin/rsync -axzHS --delete-before /opt/tmp/logs/ /var/log/
    
  6. Run the following command to remove the temporary folder created in the /opt directory.

    # rm -r /opt/tmp/logs
    
  7. Restart the appliance.

Last modified : September 10, 2024