Create physical volumes
Create two physical volumes using the /dev/xvdx and /dev/xvdy device names. For more information, see Creating a Volume.
It is strongly recommended to create volumes of the same type and of the same size.
- Attach these volumes to your instance. For more information, see Attaching a Volume to an Instance.
Create an LVM volume group and a logical volume
- Connect you to your instance using SSH. For more information, see Accessing Your Instances.
To create the LVM logical volume, use the following commands:
You can check each step by using
Initialize your physical volumes in the LVM format:
Create the LVM group named my_volume containing your two LVM-format volumes:
Create the logical volume using your two volumes named performance_volume:
This command contains the following parameters:
name: The name for the logical volume.
size: The size of the logical volume, in gibibytes (GiB).
This size must correspond to the sum of the two volumes in the my_volume LVM group
i: The number of stripes, corresponding to the number of physical volumes used for the logical volume (here, two).
I: The stripes size, in kibibytes (KiB).
By default, the stripes size is 32 KiB.
Create your partition on the new logical volume:
Mount the logical volume
Create the mount point:
Mount the logical volume:
You can check that the volume is properly mounted using the following command:
Save the logical volume mounting in /etc/fstab to keep it functional when rebooting the instance: