The way volume disks are used in the Cloud is different from classic IT usages. Volumes are no longer present locally on the machine but are available via the network connected to a huge NetApp disk array. Using Logical Volume Manager (LVM), you can create groups of physical volumes attached to an instance, and then create one or more logical volumes in this group, independently from the technical limits of each physical volume.

To improve a volume performance, you can use the "stripe" option provided by LVM to share the I/O load between as many physical volumes as you want.

In this use case, two physical volumes are attached to an instance and assembled in an LVM group. A single logical volume is then created using these two physical volumes. Therefore, you only see this logical volume in your instance, which corresponds to your two volumes behind.

3DS OUTSCALE provides different types of volumes with different characteristics. For more information about each volume type, see About Volumes.

Create physical volumes

  1. 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.

  2.  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

  1. Connect you to your instance using SSH. For more information, see Accessing Your Instances.

  2. To create the LVM logical volume, use the following commands:

    You can check each step by using vgdisplay or pvdisplay commands.

    1. Initialize your physical volumes in the LVM format:

      $> pvcreate /dev/xvdx /dev/xvdy
    2. Create the LVM group named my_volume containing your two LVM-format volumes:

      $> vgcreate my_volume /dev/xvdx /dev/xvdy
    3. Create the logical volume using your two volumes named performance_volume:

      $> lvcreate --name performance_volume --size 200GiB -i 2 -I 64 my_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.

    4. Create your partition on the new logical volume:

      $> mkfs.ext4 /dev/my_volume/performance_volume


Mount the logical volume

  1. Create the mount point:

    $> mkdir -p /mnt/mount_point
  2. Mount the logical volume:

    $> mount /dev/my_volume/performance_volume  /mnt/mount_point


    You can check that the volume is properly mounted using the following command:

    $> df -h
  3. Save the logical volume mounting in /etc/fstab to keep it functional when rebooting the instance:

    $> cat /etc/mtab | grep mount_point >> /etc/fstab