section:algosec:documentation:lvmsetupstandard
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| section:algosec:documentation:lvmsetupstandard [2021/11/15 13:18] – patrik | section:algosec:documentation:lvmsetupstandard [2023/09/29 07:01] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | [[https:// | + | [[https:// |
| + | [[sections: | ||
| + | ====== 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 | + | |
| - | 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 / | ||
| + | vgextend / | ||
| + | vgextend / | ||
| + | |||
| + | Extend the logial volumes with the new partitions (-r will extend automaticly) | ||
| + | lvextend -r / | ||
| + | lvextend -r / | ||
| + | |||
| + | if not -r extends the logical volumes automaticly do the following | ||
| - | ## Extend the volume group / | + | for ext4 filesystem |
| - | vgextend | + | |
| - | vgextend | + | |
| - | ## Extend the logial volumes with the new partitions (-r will extend automaticly) | + | for xfs filesystem |
| - | lvextend -r / | + | |
| - | lvextend -r / | + | |
| - | ## if not -r extends | + | To check the filesystem |
| - | ## for ext4 filesystem | + | |
| - | resize2fs / | + | watch -n 1 -d "df -hT" |
| - | resize2fs / | + | ip addr |
| + | watch -n 1 -d "df -hT" | ||
| - | ## for xfs filesystem | ||
| - | xfs_growfs / | ||
| - | xfs_growfs / | ||
| - | ## 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 / | + | Extend the volume group / |
| - | 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 / | + | lvextend -r / |
| - | lvextend -r / | + | lvextend -r / |
| - | ## 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 / | + | resize2fs / |
| - | resize2fs / | + | resize2fs / |
| - | ## for xfs filesystem | + | for xfs filesystem |
| - | xfs_growfs / | + | xfs_growfs / |
| - | xfs_growfs / | + | xfs_growfs / |
| - | ## 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)