Step 1: Launch EC2 Instance with Instance type “d2.xlarge”.
● “D2.xlarge” comes with 3 instance store Volumes, Each volume having “2TB” Volume.
● We can check volumes in the servers with command lsblk
Step 2: Initialize devices to use with the LVM in order to do this, we need to use the pvcreate command.
● pvcreate is used to initialize disk or partitions that will be used by LVM
● It can either initialize a complete physical disk or a partition on physical disks.
Step 3: Display device attributes for this, we need to use the pvdisplay command to display information about physical disks. # pvdisplay
Step 4: Create the LVM volume group. Once the devices are initialized, we can create the LVM volume group.
● A group of physical volumes or disks are combined together into a single storage file which is referred to as the LVM volume group.
● For this, we used the vgcreate command to create a volume group by providing the name of the volume group and the path of actual physical volumes.
● Command “vgscan”, which scan all disks for LVM volume groups.
Step 5: Create logical volume from the logical volume Group.
● Once the logical volumes are created, we can view their status using the “lvdisplay” command.
Step 6: Format your logical volumes. Once the logical volumes are created, we can format them using any filesystem like ext4, XFS, and more.
Top comments (0)