Table of Contents

<== Back to menu
<= Back

LVM configuration in ASMS

by Patrik Hermansson

This is the LVM setup for the Algosec Appliance, change accordingly. This will extend the / (root) partition to 50GB and put the rest of the disk(s) in /data partition.

up to A30.10 version

Fix the LVM on the devices

Lists all disks in the system (as fdisk -l)

lsblk
parted /dev/sdb

Moves from msdos to guided partition table for disks over 2TB

    mktable GPT

Creates a partition of 50GB

    mkpart 0 1 50000 

Create a partition of the rest of the disk

    mkpart 0 50001 100%

Lists all disks in the system (as fdisk -l)

lsblk

Creates the physical volumes of the new partitions

pvcreate /dev/sdb1
pvcreate /dev/sdb2

Extend the volume group /dev/vg_algsoec with the new physical volumes

vgextend /dev/vg_algosec /dev/sdb1
vgextend /dev/vg_algosec /dev/sdb2

Extend the logial volumes with the new partitions (-r will extend automaticly)

lvextend -r /dev/vg_algosec/vg_system /dev/sdb1
lvextend -r /dev/vg_algosec/vg_data /dev/sdb2

if not -r extends the logical volumes automaticly do the following

for ext4 filesystem

resize2fs /dev/vg_algosec/vg_system
resize2fs /dev/vg_algosec/vg_data

for xfs filesystem

xfs_growfs /dev/vg_algosec/vg_system
xfs_growfs /dev/vg_algosec/vg_data

To check the filesystem expends ok via watch per second

screen
watch -n 1 -d "df -hT"
ip addr
watch -n 1 -d "df -hT"

For ASMS V32 =>

Differences is that volume group and logical volumes have new names / different locations.

Fix the LVM on the devices Lists all disks in the system (as fdisk -l)

lsblk
parted /dev/sdb

moves from msdos to guided partition table for disks over 2TB

    mktable GPT

Creates a partition of 50GB

    mkpart 0 1 50000 

Create a partition of the rest of the disk

    mkpart 0 50001 100%

Lists all disks in the system (as fdisk -l)

lsblk

Creates the physical volumes of the new partitions

pvcreate /dev/sdb1
pvcreate /dev/sdb2

Extend the volume group /dev/vg_algsoec with the new physical volumes

vgextend /dev/centos /dev/sdb1
vgextend /dev/centos /dev/sdb2

Extend the logial volumes with the new partitions (-r will extend automaticly)

lvextend -r /dev/centos/root /dev/sdb1
lvextend -r /dev/centos/data /dev/sdb2

if not -r extends the logical volumes automaticly do the following for ext4 filesystem

resize2fs /dev/vg_algosec/vg_system
resize2fs /dev/vg_algosec/vg_data

for xfs filesystem

xfs_growfs /dev/vg_algosec/vg_system
xfs_growfs /dev/vg_algosec/vg_data

To check the filesystem expends ok via watch per second

screen
watch -n 1 -d "df -hT"
ip addr
watch -n 1 -d "df -hT"