Product SiteDocumentation Site

16.13.3. LVM based storage pools

This section gives instructions on how to create an lvm based storage pool using the virt-manager. This same action can also be done using the command line window. For directions on creating a dedicated disk storage pool with the CLI, refer to Section 11.1.4, “LVM-based storage pools”.
  1. Open the storage pool settings

    1. In the virt-manager graphical interface, select the host from the main window.
      Open the Edit menu and select Connection Details
      Connection details
      Figure 16.28. Connection details

    2. Click on the Storage tab.
      Storage tab
      Figure 16.29. Storage tab

  2. Create the new storage pool

    1. Start the Wizard

      Press the + button (the add pool button). The Add a New Storage Pool wizard appears.
      Choose a Name for the storage pool. We use guest_images_lvm for this example. Then change the Type to logical: LVM Volume Group, and
      Add LVM storage pool
      Figure 16.30. Add LVM storage pool

      Press the Forward button to continue.
    2. Add a new pool (part 2)

      Change the Target Path field. This example uses /guest_images.
      Now fill in the Target Path and Source Path fields, then tick the Build Pool check box.
      • Use the Target Path field to either select an existing LVM volume group or as the name for a new volume group. The default format is /dev/storage_pool_name.
        This example uses a new volume group named /dev/guest_images_lvm.
      • The Source Path field is optional if an existing LVM volume group is used in the Target Path.
        For new LVM volume groups, input the location of a storage device in the Source Path field. This example uses a blank partition /dev/sdc.
      • The Build Pool checkbox instructs virt-manager to create a new LVM volume group. If you are using an existing volume group you should not select the Build Pool checkbox.
        This example is using a blank partition to create a new volume group so the Build Pool checkbox must be selected.
      Add target and source
      Figure 16.31. Add target and source

      Verify the details and press the Finish button format the LVM volume group and create the storage pool.
    3. Confirm the device to be formatted

      A warning message appears.
      Warning message
      Figure 16.32. Warning message

      Press the Yes button to proceed to erase all data on the storage device and create the storage pool.
  3. Verify the new storage pool

    The new storage pool will appear in the list on the left after a few seconds. Verify the details are what you expect, 465.76 GB Free in our example. Also verify the State field reports the new storage pool as Active.
    It is generally a good idea to have the Autostart check box enabled, to ensure the storage pool starts automatically with libvirtd.
    Confirm LVM storage pool details
    Figure 16.33. Confirm LVM storage pool details

    Close the Host Details dialog, as the task is now complete.