Steps:
Steps to add a new hard disk to LVM on IBM Security SOAR appliance running Red Hat Linux with LVM support:
1. In vSphere client, add a new hard disk at Virtual Device Node SCSI (0: 1).
2. SSH to the server.
3. Get the host bus number:
sudo grep mpt /sys/class/scsi_host/host?/proc_name
The response is similar to
/sys/class/scsi_host/host2/proc_name:mptspi
4. Rescan for new disks on host bus 2:
echo "- - -" > sudo /sys/class/scsi_host/host2/scan
5. Make sure new disk /dev/sdb is added to the system:
sudo fdisk -l
6. Create a new partition on /dev/sdb with file system type 8e (Linux LVM):
sudo fdisk /dev/sdb
=======
Command (m for help): n
Select (default p): p
Partition number (1-4, default 1): 1
First sector (a-b, default a): [Enter to use the default value]
Last sector, +sectors or +size{K,M,G} (a-b, default b): [Enter to use the default value]
Command (m for help): t
Hex code (type L to list all codes): 8e
Command (m for help): p
Command (m for help): w
=======
7. Create a physical volume for LVM:
sudo pvcreate /dev/sdb1
8. Get the volume group name (VG Name):
sudo vgdisplay
9. Extend the 'resilient' volume group by adding in the physical volume of /dev/sdb1:
sudo vgextend resilient /dev/sdb1
10. Scan all disks for physical volumes:
sudo pvscan
11. Check the volume group name (VG Name) again to make sure free space is added:
sudo vgdisplay
12. Display the path of the logical volume (LV Path):
sudo lvdisplay
The following assumes that you want to split the new disk over the three logical volumes.
13. Extend the logical volume for multiple logical volumes:
sudo lvresize --resizefs --extents +80%FREE /dev/resilient/root
sudo lvresize --resizefs --extents +100%FREE /dev/resilient/co3
The previous commands allocate 80% of the extended space to "/dev/resilient/root" LVM, and then allocate the rest 20% to "/dev/resilient/co3" LVM.
14. Display the disk space usage to ensure new space is added:
sudo df -h
Reference:
No comments:
Post a Comment