5.4.4. シンプロビジョニングされた論理ボリュームの作成


As of the Red Hat Enterprise Linux 6.4 release, logical volumes can be thinly provisioned. This allows you to create logical volumes that are larger than the available extents. Using thin provisioning, you can manage a storage pool of free space, known as a thin pool, which can be allocated to an arbitrary number of devices when needed by applications. You can then create devices that can be bound to the thin pool for later allocation when an application actually writes to the logical volume. The thin pool can be expanded dynamically when needed for cost-effective allocation of storage space.

注記

This section provides an overview of the basic commands you use to create and grow thinly-provisioned logical volumes. For detailed information on LVM thin provisioning as well as information on using the LVM commands and utilities with thinly-provisioned logical volumes, see the lvmthin(7) man page.

注記

シンボリュームはクラスターのノード間ではサポートされません。シンプールとそのすべてのシンボリュームは、1 つのクラスターノードでのみ排他的にアクティブ化する必要があります。
シンプロビジョニングされたボリュームを作成するには、以下のタスクを実行してください。
  1. vgcreate コマンドを使用して、ボリュームグループを作成します。
  2. lvcreate コマンドを使用して、シンプールを作成します。
  3. lvcreate コマンドを使用して、シンプール内にシンプロビジョニングされたボリュームを作成します。
lvcreate コマンドに -T (または --thin) オプションを使用して、シンプールまたはシンプロビジョニングされたボリュームを作成します。また、lvcreate コマンドの -T オプションを使用して、1 つのコマンドで同時にプール内にシンプールとシンプロビジョニングされたボリュームの両方を作成することも可能です。
以下のコマンドは、lvcreate コマンドに -T オプションを使用して、mythinpool と呼ばれるシンプールを作成します。これは、ボリュームグループ vg001 内にあり、サイズは 100M です。物理領域のプールを作成しているため、プールのサイズを指定する必要があります。lvcreate コマンドの -T オプションは引数を取りません。コマンドが指定する他のオプションから作成されるデバイスのタイプを推定します。
# lvcreate -L 100M -T vg001/mythinpool
  Rounding up size to full physical extent 4.00 MiB
  Logical volume "mythinpool" created
# lvs
  LV            VG     Attr     LSize   Pool Origin Data%  Move Log Copy% Convert
  my mythinpool vg001  twi-a-tz 100.00m               0.00
Copy to Clipboard Toggle word wrap
以下のコマンドは、lvcreate コマンドに -T オプションを使用して、シンプール vg001/mythinpoolthinvolume と呼ばれるシンプロビジョニングされたボリュームを作成します。ここでは、仮想サイズを指定して、ボリュームを含むプールよりも大きなボリュームの仮想サイズを指定している点に注意してください。
# lvcreate -V1G -T vg001/mythinpool -n thinvolume
  Logical volume "thinvolume" created
# lvs
  LV          VG       Attr     LSize   Pool       Origin Data%  Move Log Copy%  Convert
  mythinpool  vg001    twi-a-tz 100.00m                     0.00                        
  thinvolume  vg001    Vwi-a-tz   1.00g mythinpool          0.00
Copy to Clipboard Toggle word wrap
以下のコマンドは、lvcreate コマンドに -T オプションを使用して、プール内にシンプールとシンプロビジョニングされたボリュームを作成します。その際、lvcreate コマンドでサイズと仮想サイズの引数を指定します。また、このコマンドは、ボリュームグループ vg001 内に mythinpool と呼ばれるシンプールを作成し、そのプール内に thinvolume と呼ばれるシンプロビジョニングされたボリュームも作成します。
# lvcreate -L 100M -T vg001/mythinpool -V1G -n thinvolume
  Rounding up size to full physical extent 4.00 MiB
  Logical volume "thinvolume" created
# lvs
  LV           VG       Attr     LSize   Pool     Origin Data%  Move Log Copy%  Convert
  mythinpool   vg001    twi-a-tz 100.00m                   0.00                        
  thinvolume   vg001    Vwi-a-tz   1.00g mythinpool        0.00
Copy to Clipboard Toggle word wrap
また、lvcreate コマンドの --thinpool パラメーターを指定して、シンプールを作成することも可能です。-T オプションとは異なり、--thinpool パラメーターには作成しているシンプール論理ボリューム名の引数が必要です。以下の例は、lvcreate コマンドで --thinpool パラメーターを指定して、mythinpool と呼ばれるシンプールを作成します。これは、ボリュームグループ vg001 内にあり、サイズは 100M です。
# lvcreate -L 100M --thinpool mythinpool vg001
  Rounding up size to full physical extent 4.00 MiB
  Logical volume "mythinpool" created
# lvs
  LV          VG     Attr     LSize   Pool Origin Data%  Move Log Copy% Convert
  mythinpool  vg001  twi-a-tz 100.00m               0.00
Copy to Clipboard Toggle word wrap
プール作成用に、ストライピングはサポートされています。以下のコマンドは、2 つの 64 kB のストライプと 256 kB のチャンクサイズがあるボリュームグループ vg001 内に pool と呼ばれる 100M のシンプールを作成します。また、1T のシンプロビジョニングされたボリューム vg00/thin_lv も作成します。
# lvcreate -i 2 -I 64 -c 256 -L100M -T vg00/pool -V 1T --name thin_lv
Copy to Clipboard Toggle word wrap
lvextend コマンドを使用してシンプロビジョニングされたボリュームのサイズを拡張できます。ただし、シンプールのサイズを縮小することはできません。
以下のコマンドは、既存のシンプールのサイズ (100M) を変更し、100M 拡張します。
# lvextend -L+100M vg001/mythinpool
  Extending logical volume mythinpool to 200.00 MiB
  Logical volume mythinpool successfully resized
# lvs
  LV           VG       Attr     LSize   Pool     Origin Data%  Move Log Copy%  Convert
  mythinpool   vg001    twi-a-tz 200.00m                   0.00                        
  thinvolume   vg001    Vwi-a-tz   1.00g mythinpool          0.00
Copy to Clipboard Toggle word wrap
他の論理ボリュームのタイプと同様に、lvrename を使用してボリューム名の変更、lvremove を使用してボリュームの削除、lvslvdisplay のコマンドを使用してボリュームの情報の表示を行うことができます。
By default, the lvcreate command sets the size of the thin pool's metadata logical volume according to the formula (Pool_LV_size / Pool_LV_chunk_size * 64). You cannot currently resize the metadata volume, however, so if you expect significant growth of the size of thin pool at a later time you should increase this value with the --poolmetadatasize parameter of the lvcreate command. The supported value for the thin pool's metadata logical volume is in the range between 2MiB and 16GiB.
You can use the --thinpool parameter of the lvconvert command to convert an existing logical volume to a thin pool volume. When you convert an existing logical volume to a thin pool volume, you must use the --poolmetadata parameter in conjunction with the --thinpool parameter of the lvconvert to convert an existing logical volume to the thin pool volume's metadata volume.

注記

Converting a logical volume to a thin pool volume or a thin pool metadata volume destroys the content of the logical volume, since in this case the lvconvert does not preserve the content of the devices but instead overwrites the content.
The following example converts the existing logical volume lv1 in volume group vg001 to a thin pool volume and converts the existing logical volume lv2 in volume group vg001 to the metadata volume for that thin pool volume.
# lvconvert --thinpool vg001/lv1 --poolmetadata vg001/lv2
  Converted vg001/lv1 to thin pool.
Copy to Clipboard Toggle word wrap
トップに戻る
Red Hat logoGithubredditYoutubeTwitter

詳細情報

試用、購入および販売

コミュニティー

Red Hat ドキュメントについて

Red Hat をお使いのお客様が、信頼できるコンテンツが含まれている製品やサービスを活用することで、イノベーションを行い、目標を達成できるようにします。 最新の更新を見る.

多様性を受け入れるオープンソースの強化

Red Hat では、コード、ドキュメント、Web プロパティーにおける配慮に欠ける用語の置き換えに取り組んでいます。このような変更は、段階的に実施される予定です。詳細情報: Red Hat ブログ.

会社概要

Red Hat は、企業がコアとなるデータセンターからネットワークエッジに至るまで、各種プラットフォームや環境全体で作業を簡素化できるように、強化されたソリューションを提供しています。

Theme

© 2025 Red Hat