Create a custom thin pool

You can create custom thin pools to have a better control over the storage.

Before you begin

  • Administrative access.

Procedure

  1. Display available volume groups:
    # vgs -o vg_name
      VG
      VolumeGroupName
  2. List available devices:
    # lsblk
  3. Create a LV to hold the thin pool data:
    # lvcreate --name ThinPoolDataName --size Size VolumeGroupName /DevicePath

    Replace ThinPoolDataName with the name for your thin pool data LV. Replace Size with the size for your LV. Replace VolumeGroupName with the name of your volume group. Replace /DevicePath with your device path.

  4. Create a LV to hold the thin pool metadata:
    # lvcreate --name ThinPoolMetadataName --size Size VolumeGroupName /DevicePath
  5. Combine the LVs into a thin pool:
    # lvconvert --type thin-pool --poolmetadata ThinPoolMetadataName VolumeGroupName/ThinPoolDataName

Results

  1. Verify that the custom thin pool is created:
    # lvs -o lv_name,seg_type
      LV                Type
      ThinPoolDataName  thin-pool