increasing local space in oracle avdf

Today, we are going to add space to the local storage in the Audit Vault in AVDF.

In my test environment on VirtualBox, I installed the highlighted machines. Alongside the DNS server, I also set up an NTP server. Synchronizing time in AVDF is crucial at all stages. It's worth mentioning that often the errors received from AVDF do not directly indicate the main issue, making troubleshooting challenging. Therefore, it’s essential to properly configure the infrastructure to prevent these problems as much as possible.

 

The NFS server is related to the backup & restore process, and I will soon post about that as well.

I'm adding 50GB disks to the AV and AV2 servers.

You can see the work process from the beginning of the link below:

Configure AFD on Oracle Linux R8U9

Now, let's power on the machines.

Steps to Increase the Volume Group and Logical Volume Space

  1. Log in via SSH: Log into your Oracle AVDF system via SSH and switch to the root user.

  2. Check Free Space in the Volume Group: Use the following command to check the available free space in the Volume Group:

/usr/sbin/vgs

The output will be similar to:

[root@avs080027b57279 ~]# /usr/sbin/vgs

  VG      #PV #LV #SN Attr   VSize   VFree

  vg_root   1  12   0 wz--n- 160.15g <57.54g

  • As we can see, there is about 57GB of free space available.

  • Check Partition Status:

 [root@avs080027b57279 ~]# df -h

Filesystem                             Size  Used Avail Use% Mounted on

devtmpfs                               5.7G     0  5.7G   0% /dev

tmpfs                                  7.5G  637M  6.9G   9% /dev/shm

tmpfs                                  5.7G  8.9M  5.7G   1% /run

tmpfs                                  5.7G     0  5.7G   0% /sys/fs/cgroup

/dev/mapper/vg_root-lv_ol7root         6.4G  2.9G  3.3G  47% /

/dev/mapper/vg_root-lv_tmp             1.9G  120K  1.8G   1% /tmp

/dev/mapper/vg_root-lv_opt_dbfw        943M  628K  877M   1% /opt/dbfw

/dev/mapper/vg_root-lv_local_dbfw      943M  202M  677M  23% /usr/local/dbfw

/dev/mapper/vg_root-lv_var_dbfw        2.8G   52K  2.6G   1% /var/dbfw

/dev/mapper/vg_root-lv_var_log         5.5G   43M  5.1G   1% /var/log

tmpfs                                  1.0G     0  1.0G   0% /usr/local/dbfw/volatile

/dev/mapper/vg_root-lv_local_dbfw_tmp  6.4G  372K  6.1G   1% /usr/local/dbfw/tmp

/dev/mapper/vg_root-lv_var_tmp         5.5G   44K  5.2G   1% /var/tmp

/dev/mapper/vg_root-lv_home            943M  104K  878M   1% /home

/dev/mapper/vg_root-lv_oracle           58G   27G   28G  50% /var/lib/oracle

tmpfs                                  1.2G     0  1.2G   0% /run/user/1000

tmpfs                                  1.2G     0  1.2G   0% /run/user/503

 Select Partition to Extend: To test, we will select the partition related to Oracle and extend it by about 5GB:

/usr/sbin/lvextend -r -L+5G /dev/mapper/vg_root-lv_oracle

Example output:

[root@avs080027b57279 ~]# /usr/sbin/lvextend -r -L+5G /dev/mapper/vg_root-lv_oracle

  Size of logical volume vg_root/lv_oracle changed from 58.59 GiB (15000 extents) to 63.59 GiB (16280 extents).

  Logical volume vg_root/lv_oracle successfully resized.

resize2fs 1.45.4 (23-Sep-2019)

Filesystem at /dev/mapper/vg_root-lv_oracle is mounted on /var/lib/oracle; on-line resizing required

old_desc_blocks = 8, new_desc_blocks = 8

The filesystem on /dev/mapper/vg_root-lv_oracle is now 16670720 (4k) blocks long.

Verify Changes: You can see the results using the df command:

 

[root@avs080027b57279 ~]# df -h

Filesystem                             Size  Used Avail Use% Mounted on

devtmpfs                               5.7G     0  5.7G   0% /dev

tmpfs                                  7.5G  637M  6.9G   9% /dev/shm

tmpfs                                  5.7G  8.9M  5.7G   1% /run

tmpfs                                  5.7G     0  5.7G   0% /sys/fs/cgroup

/dev/mapper/vg_root-lv_ol7root         6.4G  2.9G  3.3G  47% /

/dev/mapper/vg_root-lv_tmp             1.9G  120K  1.8G   1% /tmp

/dev/mapper/vg_root-lv_opt_dbfw        943M  628K  877M   1% /opt/dbfw

/dev/mapper/vg_root-lv_local_dbfw      943M  202M  677M  23% /usr/local/dbfw

/dev/mapper/vg_root-lv_var_dbfw        2.8G   52K  2.6G   1% /var/dbfw

/dev/mapper/vg_root-lv_var_log         5.5G   43M  5.1G   1% /var/log

tmpfs                                  1.0G     0  1.0G   0% /usr/local/dbfw/volatile

/dev/mapper/vg_root-lv_local_dbfw_tmp  6.4G  372K  6.1G   1% /usr/local/dbfw/tmp

/dev/mapper/vg_root-lv_var_tmp         5.5G   44K  5.2G   1% /var/tmp

/dev/mapper/vg_root-lv_home            943M  104K  878M   1% /home

/dev/mapper/vg_root-lv_oracle           63G   27G   33G  46% /var/lib/oracle

tmpfs                                  1.2G     0  1.2G   0% /run/user/1000

tmpfs                                  1.2G     0  1.2G   0% /run/user/503

  • As shown, the space increased from 58GB to 63GB.

  • Scenario 2: Not Enough Space in VG: If there isn't enough space in the VG (Volume Group), which is part of the LVM terminology, follow these steps:

  • Check if the new disk is recognized:

[root@avs080027b57279 ~]# lsblk

NAME                          MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT

sdb                             8:16   0    50G  0 disk

sr0                            11:0    1  1024M  0 rom

sda                             8:0    0   300G  0 disk

├─sda4                          8:4    0  46.2G  0 part

├─sda2                          8:2    0     1G  0 part /boot

├─sda3                          8:3    0   512M  0 part [SWAP]

├─sda1                          8:1    0     1M  0 part

└─sda5                          8:5    0  252.3G  0 part

  ├─vg_root-lv_ol7root        252:0    0   6.4G  0 lvm  /

  ├─vg_root-lv_tmp            252:1    0   1.9G  0 lvm  /tmp

  ├─vg_root-lv_opt_dbfw       252:2    0   943M  0 lvm  /opt/dbfw

  ├─vg_root-lv_local_dbfw     252:3    0   943M  0 lvm  /usr/local/dbfw

  ├─vg_root-lv_var_dbfw       252:4    0   2.8G  0 lvm  /var/dbfw

  ├─vg_root-lv_var_log        252:5    0   5.5G  0 lvm  /var/log

  ├─vg_root-lv_local_dbfw_tmp 252:6    0   6.4G  0 lvm  /usr/local/dbfw/tmp

  ├─vg_root-lv_var_tmp        252:7    0   5.5G  0 lvm  /var/tmp

  ├─vg_root-lv_home           252:8    0   943M  0 lvm  /home

  └─vg_root-lv_oracle         252:9    0    63G  0 lvm  /var/lib/oracle

Add Disk to PV (Physical Volume):**

  

  [root@avs080027b57279 ~]# pvcreate /dev/sdb

    Physical volume "/dev/sdb" successfully created.

Add the Disk to VG:

[root@avs080027b57279 ~]# vgextend vg_root /dev/sdb

  Volume group "vg_root" successfully extended

Verify VG Size

[root@avs080027b57279 ~]# vgs

  VG      #PV #LV #SN Attr   VSize  VFree

  vg_root   2  12   0 wz--n- 210.15g <107.54g

Now, about 107GB of free space is available, allowing us to extend any required partition.

Conclusion: As mentioned, errors in AVDF are not always direct, and sometimes a problem may be from another part of the infrastructure. Therefore, to avoid any possible errors, it is essential to set up and configure the infrastructure correctly from the start.