FortiSIEM
FortiSIEM provides Security Information and Event Management (SIEM) and User and Entity Behavior Analytics (UEBA)
calvinc97
Staff & Editor
Staff & Editor
Article Id 392114
Description

The article describes the steps to extend the existing free space in /dev/mapper/cl-root on the XFS from the FortiSIEM node.

Scope

FortiSIEM

Solution
  1. To grow the existing /dev/mapper/cl-root on XFS, log in to the FortiSIEM CLI and run the 'lsblk' command


For example:

 

# lsblk

 

NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
vda 8:0 0 100G 0 disk
├─vda1 8:1 0 1G 0 part /boot
└─vda2 8:2 0 24G 0 part
├─cl-swap 253:0 0 2.5G 0 lvm [SWAP]
└─cl-root 253:1 0 21.5G 0 lvm /
vdb 8:16 0 100G 0 disk
├─sdb1 8:17 0 22.4G 0 part [SWAP]
└─sdb2 8:18 0 68.9G 0 part /opt
vdc 8:32 0 60G 0 disk
└─sdc1 8:33 0 60G 0 part /cmdb
vdd 8:48 0 60G 0 disk
└─sdd1 8:49 0 60G 0 part /svn
vde 8:64 0 61G 0 disk /data

 

Confirmed that /dev/vda is 100 G while /dev/vda2 remains at 24 G.

 

  1. Extend the partition (/dev/vda2) to fill the disk:

 

Parted /dev/vda

(parted) unit GiB

(parted) unit GiB                    <----- Note the 'Start' of partition 2.

(parted) resizepart 2 100%           <----- Extend to end of disk.

(parted) quit

partprobe /dev/vda                   <----- Re‑read partition table.

lsblk                                 <----- Verify vda2 ≃100G.

 

  1. Resize the physical volume to consume new space

 

pvresize /dev/vda2

vgdisplay cl                          <----- Look for 'Free PE / Size' > 0

vgdisplay

 

This grows the LVM PV on /dev/vda2 to ≃ 100 GiB

 

 

  1. Extend the logical volume:

 

lvextend -l +100%FREE /dev/cl/root

lvdisplay /dev/cl/root               <----- Verify LV size ≃ new VG size.

 

 

  1. Grow the XFS Filesystem:

 

xfs_growfs  /                   <----- Sr xfs_growfs /dev/mapper/cl-root.

df -h                           <----- Should now show ≃100 G on '/'.

 

 

  1. Verify the size of / partition:

 

lsblk

df -h

vgdisplay cl

lvdisplay /dev/cl/root

 

All should now reflect the expanded size.

 

Related articles:

Technical Tip: Extend the /opt partition

Technical Tip: How to expand local disk for eventdb mounted on /data

Technical Tip: How to extend disk in LVM partition 

Contributors