User Tools

Site Tools


section:algosec:documentation:lvmsetupstandard

This is an old revision of the document!


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”

section/algosec/documentation/lvmsetupstandard.1636982096.txt.gz · Last modified: 2023/09/29 07:01 (external edit)