Page tree

Following is the process to increase disk space for a Lumeta system in Azure. The first two steps are representative in that they apply only to the Azure platform. If you plan to run your Lumeta system another supported platform and need assistance, please contact us.

    1. Login to the Azure portal select the VM. On the Disks pane, under Data disks, select Create and attach a new disk.
    2. Enter a name for your managed disk. Review the default settings, and update the Storage typeSize (GiB)Encryption and Host caching (read/write) as necessary; 100GB for Cloud Scout, 500GB or more for Command Center.
    3. When you are done, select Save at the top of the page to create the managed disk and update the VM configuration.Then perform the following steps utilize the new disk space:
    4. Login to Lumeta via ssh as the user you created during the deployment. Run:
      1. sudo su
      2. provide password for the user
      3. (you will become root)

View Existing Disk Space Allocations

  1. Run fdisk -l to obtain information about Disk Partitions. For Lumeta the /dev/sda is the default disk  /dev/sdc is the added Data disk..

 

  1. Run df -h, lvs, vgs to gather information on Disk Space, Logical Group, and current Logical Volumes.

a)     For Lumeta the Volume Group is called “vg_sys”

There are five logical volumes:

  • · /home: Small space to store files for individual users (2% of vg_sys, mounted nosuid to comply with V-72041)
  • · /var/log/audit: Location for the Linux Audit Framework to store data. These logs show who did what and when. While this is technically a log, STIGs specify that the audit log must be in it's own space (2% of vg_sys).
  • · /var: A place for persistent data to be stored for applications such as the Lumeta database. Also, logs are stored in this location (70% of vg_sys).
  • · /tmp: A space for temporary files to be stored. Lumeta does not currently clean this (2% of vg_sys).
  • · : The root of the file system. This is the top level directory for all other files (10% of vg_sys).

 

2.   Add Disk Space to existing VM Disk

  1. Create a New Partition that takes up the remaining space and is of filesystem type 8e (Logical Volume).  

a)     fdisk /dev/sdc

b)     Now enter n to create a new partition, and choose p to create a new primary partition.

c)     Partition Number: 1 - using the default 

d)     Select default first available cylinder to the default last cylinder

e)     t: change a partition’s system id

f)      1: partition number

g)     Set type to 8e for LVM

h)     p to view the new partition layout.

i)      w to write the partition layout to disk



3.   Create the Physical Volume as a basis for your LVM

  1. Type fdisk -l Your new partition layout now includes /dev/sdc1. 

  1. Create the physical volume.

a)     pvcreate /dev/sdc1

  1. Add the sdc1 new physical volume to Volume Group vg_sys

a)     vgextend vg_sys /dev/sdc1

b)     Type vgdisplay.  You’ll see the physical volume is now in the volume groups size.  In this example 500GB have been added to the Volume Group.


5.   Allocate Memory to Logical Volume

Now that the New Physical Volume in the Volume Group has been created, it can be distributed to the Logical Volumes.  Below is a template on disk space distribution.

Each customer may have their unique needs.  Note if partitions are not sda#, but instead xvda# then use xfs_growfs command instead of resize2fs.

  1. First allocate 70 percent of the new disk space to lv_var
    1. Type lvextend -l +70%FREE /dev/mapper/vg_sys-lv_var
    2. Trigger online resizing of the live and mounted filesystem so the new disk space can be utilized immediately:
      1. resize2fs /dev/mapper/vg_sys-lv_var

  2. Second we will allocate 15 percent (half of the 30% left) of the new disk space to lv_root
    1. Type lvextend -l +50%FREE /dev/mapper/vg_sys-lv_root
    2. Trigger online resizing of the live and mounted filesystem so the new disk space can be utilized immediately:
      1. resize2fs /dev/mapper/vg_sys-lv_root

  3. Third we will allocate 5 percent (third of the 15% left) of the new disk space to lv_home
    1. Type lvextend -l +33%FREE /dev/mapper/vg_sys-lv_home
    2. Trigger online resizing of the live and mounted filesystem so the new disk space can be utilized immediately:
      1. resize2fs /dev/mapper/vg_sys-lv_home

  4. Fourth we will allocate 5 percent (half of the 10% left) of the new disk space to lv_var_log_audit
    1. Type lvextend -l +50%FREE /dev/mapper/vg_sys-lv_var_log_audit
    2. Trigger online resizing of the live and mounted filesystem so the new disk space can be utilized immediately:
      1. resize2fs /dev/mapper/vg_sys-lv_var_log_audit

  5. Finally we will allocate 5 percent (All of the 5% left) of the new disk space to lv_tmp
    1. Type lvextend -l +100%FREE /dev/mapper/vg_sys-lv_tmp
    2. Trigger online resizing of the live and mounted filesystem so the new disk space can be utilized immediately:
      1. resize2fs /dev/mapper/vg_sys-lv_tmp

  6. Run df -h, lvs, and vgs to view new Disk Space Allocation


 

 

 

 

 

 

  • No labels