User Tools

Site Tools


section:algosec:documentation:lvmsetupstandard

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
section:algosec:documentation:lvmsetupstandard [2021/11/15 13:18] patriksection:algosec:documentation:lvmsetupstandard [2023/09/29 07:01] (current) – external edit 127.0.0.1
Line 1: Line 1:
-[[https://techwiki.keepthelogs.com | <== Back to menu]]+[[https://techwiki.keepthelogs.com | <== Back to menu]] \\ 
 +[[sections:algosec | <= Back]] 
 +====== LVM configuration in ASMS ====== 
 +// 
 +by Patrik Hermansson 
 +//
  
-Fix the LVM on the devices +This is the LVM setup for the Algosec Appliance, change accordingly.  
-## Lists all disks in the system (as fdisk -l) +This will extend the / (root) partition to 50GB and put the rest of the disk(s) in /data partition. 
-lsblk + 
-parted /dev/sdb +===== up to A30.10 version ===== 
-## moves from msdos to guided partition table for disks over 2TB +==== Fix the LVM on the devices ==== 
-    mktable GPT +Lists all disks in the system (as fdisk -l) 
-## Creates a partition of 50GB +  lsblk 
-    mkpart 0 1 50000  + 
-## Create a partition of the rest of the disk +  parted /dev/sdb 
-    mkpart 0 50001 100% + 
-## Lists all disks in the system (as fdisk -l) +Moves from msdos to guided partition table for disks over 2TB 
-lsblk +      mktable GPT 
-## Creates the physical volumes of the new partitions +Creates a partition of 50GB 
-pvcreate /dev/sdb1 +      mkpart 0 1 50000  
-pvcreate /dev/sdb2+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
  
-## Extend the volume group /dev/vg_algsoec with the new physical volumes +for ext4 filesystem 
-vgextend /dev/vg_algosec /dev/sdb1 +  resize2fs /dev/vg_algosec/vg_system 
-vgextend /dev/vg_algosec /dev/sdb2+  resize2fs /dev/vg_algosec/vg_data
  
-## Extend the logial volumes with the new partitions (-r will extend automaticly) +for xfs filesystem 
-lvextend -r /dev/vg_algosec/vg_system /dev/sdb1 +  xfs_growfs /dev/vg_algosec/vg_system 
-lvextend -r /dev/vg_algosec/vg_data /dev/sdb2+  xfs_growfs /dev/vg_algosec/vg_data
  
-## if not -r extends the logical volumes automaticly do the following +To check the filesystem expends ok via watch per second 
-## for ext4 filesystem +  screen 
-resize2fs /dev/vg_algosec/vg_system +  watch -n 1 -d "df -hT" 
-resize2fs /dev/vg_algosec/vg_data+  ip addr 
 +  watch -n 1 -d "df -hT"
  
-## 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 +===== For ASMS V32 => =====
-screen +
-watch -n 1 -d "df -hT" +
-ip addr +
-watch -n 1 -d "df -hT"+
  
-################### +//**Differences is that volume group and logical volumes have new names / different locations.**//
-# For ASMS V32 => # +
-################### +
-?? Differences is that volume group and logical volumes have new names / different locations. ??+
  
 Fix the LVM on the devices Fix the LVM on the devices
-## Lists all disks in the system (as fdisk -l) +Lists all disks in the system (as fdisk -l) 
-lsblk +  lsblk 
-parted /dev/sdb +  parted /dev/sdb 
-## moves from msdos to guided partition table for disks over 2TB +moves from msdos to guided partition table for disks over 2TB 
-    mktable GPT +      mktable GPT 
-## Creates a partition of 50GB +Creates a partition of 50GB 
-    mkpart 0 1 50000  +      mkpart 0 1 50000  
-## Create a partition of the rest of the disk +Create a partition of the rest of the disk 
-    mkpart 0 50001 100% +      mkpart 0 50001 100% 
-## Lists all disks in the system (as fdisk -l) +Lists all disks in the system (as fdisk -l) 
-lsblk +  lsblk 
-## Creates the physical volumes of the new partitions +Creates the physical volumes of the new partitions 
-pvcreate /dev/sdb1 +  pvcreate /dev/sdb1 
-pvcreate /dev/sdb2+  pvcreate /dev/sdb2
  
-## Extend the volume group /dev/vg_algsoec with the new physical volumes +Extend the volume group /dev/vg_algsoec with the new physical volumes 
-vgextend /dev/centos /dev/sdb1 +  vgextend /dev/centos /dev/sdb1 
-vgextend /dev/centos /dev/sdb2+  vgextend /dev/centos /dev/sdb2
  
-## Extend the logial volumes with the new partitions (-r will extend automaticly) +Extend the logial volumes with the new partitions (-r will extend automaticly) 
-lvextend -r /dev/centos/root /dev/sdb1 +  lvextend -r /dev/centos/root /dev/sdb1 
-lvextend -r /dev/centos/data /dev/sdb2+  lvextend -r /dev/centos/data /dev/sdb2
  
-## if not -r extends the logical volumes automaticly do the following +if not -r extends the logical volumes automaticly do the following 
-## for ext4 filesystem +for ext4 filesystem 
-resize2fs /dev/vg_algosec/vg_system +  resize2fs /dev/vg_algosec/vg_system 
-resize2fs /dev/vg_algosec/vg_data+  resize2fs /dev/vg_algosec/vg_data
  
-## for xfs filesystem +for xfs filesystem 
-xfs_growfs /dev/vg_algosec/vg_system +  xfs_growfs /dev/vg_algosec/vg_system 
-xfs_growfs /dev/vg_algosec/vg_data+  xfs_growfs /dev/vg_algosec/vg_data
  
-## To check the filesystem expends ok via watch per second +To check the filesystem expends ok via watch per second 
-screen +  screen 
-watch -n 1 -d "df -hT" +  watch -n 1 -d "df -hT" 
-ip addr +  ip addr 
-watch -n 1 -d "df -hT"+  watch -n 1 -d "df -hT"
  
section/algosec/documentation/lvmsetupstandard.1636982311.txt.gz · Last modified: 2023/09/29 07:01 (external edit)