1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

[AIX] 論理ボリュームのディスク・割り振りポリシーの確認

Last updated at Posted at 2022-07-13
はじめに

AIX で LV(Logical Volume:論理ボリューム) を複数ディスクで構成する際のディスクへの配置が設定値 (RANGE of physical volumes) で変わることを確認しました。

参考:
・AIX 7.3:ディスク間割り振りポリシー
https://www.ibm.com/docs/ja/aix/7.3?topic=strategy-inter-disk-allocation-policies

・論理ボリュームの単一コピーのディスク間設定
https://www.ibm.com/docs/ja/aix/7.3?topic=policies-inter-disk-settings-single-copy-logical-volume


環境

AIX 7.3 TL0 SP1 (on S922)
hdisk0 rootvg
hdisk1,2 確認用の VG(testvg)、LV (testlv1, testlv2) を構成

# oslevel -s
7300-00-01-2148
#

確認
# lspv
hdisk0          00fa00d6b552f41b                    rootvg          active
hdisk1          00cc1cd0f6d11326                    testvg          active
hdisk2          00cc1cd0f6d113b1                    testvg          active

# lsvg -l testvg
testvg:
LV NAME             TYPE       LPs     PPs     PVs  LV STATE      MOUNT POINT
#

hdisk1,2 で構成されたボリューム・グループ testvg にはまだ lv が存在していない状態です。

testvg に testlv という名前の jfs2 論理ボリュームを作成します。

# smit lv
 -> Add a Logical Volume
  -> VOLUME GROUP NAME  [ testvg ]

---

                                        Add a Logical Volume

Type or select values in entry fields.
Press Enter AFTER making all desired changes.

                                                        [Entry Fields]
  Logical volume NAME                                [testlv1]
* VOLUME GROUP name                                   testvg
* Number of LOGICAL PARTITIONS                       [10]                                         #
  PHYSICAL VOLUME names                              [hdisk1 hdisk2]                             +
  Logical volume TYPE                                []                                          +
  POSITION on physical volume                         outer_middle                               +
  RANGE of physical volumes                           minimum                                    +
  MAXIMUM NUMBER of PHYSICAL VOLUMES                 []                                           #
    to use for allocation
  Number of COPIES of each logical                    1                                          +
    partition
  Mirror Write Consistency?                           active                                     +
  Allocate each logical partition copy                yes                                        +
    on a SEPARATE physical volume?
  RELOCATE the logical volume during reorganization?  yes                                        +
  Logical volume LABEL                               []
  MAXIMUM NUMBER of LOGICAL PARTITIONS               [512]                                        #
  Enable BAD BLOCK relocation?                        yes                                        +
  SCHEDULING POLICY for writing/reading               parallel                                   +
    logical partition copies
  Enable WRITE VERIFY?                                no                                         +
  File containing ALLOCATION MAP                     []
  Stripe Size?                                       [Not Striped]                               +
  Serialize IO?                                       no                                         +
  Mirror Pool for First Copy                                                                     +
  Mirror Pool for Second Copy                                                                    +
  Mirror Pool for Third Copy                                                                     +
  Infinite Retry Option?                              no                                         +
  Enable Logical Volume Encryption?                   no                                         +

上記では RANGE of physical volumesminimum を設定しています。

testlv1 が作成されました。

# lsvg -l testvg
testvg:
LV NAME             TYPE       LPs     PPs     PVs  LV STATE      MOUNT POINT
testlv1              jfs2       10      10      1    closed/syncd  N/A
#

testlv1 の物理パーティション(PP,Physical Partition)の配置を見ると、hdisk1 に偏っています。

# lslv -m testlv1
testlv:N/A
LP    PP1  PV1               PP2  PV2               PP3  PV3
0001  0129 hdisk1
0002  0130 hdisk1
0003  0131 hdisk1
0004  0132 hdisk1
0005  0133 hdisk1
0006  0134 hdisk1
0007  0135 hdisk1
0008  0136 hdisk1
0009  0137 hdisk1
0010  0138 hdisk1
#

続いて、testvg に testlv2 という名前の jfs2 論理ボリュームを作成します。

# smit lv
 -> Add a Logical Volume
  -> VOLUME GROUP NAME  [ testvg ]

---
                                        Add a Logical Volume


Type or select values in entry fields.
Press Enter AFTER making all desired changes.

                                                        [Entry Fields]
  Logical volume NAME                                [testlv2]
* VOLUME GROUP name                                   testvg
* Number of LOGICAL PARTITIONS                       [10]                                         #
  PHYSICAL VOLUME names                              [hdisk1 hdisk2]                             +
  Logical volume TYPE                                [jfs2]                                      +
  POSITION on physical volume                         outer_middle                               +
  RANGE of physical volumes                           maximum                                    +
  MAXIMUM NUMBER of PHYSICAL VOLUMES                 []                                           #
    to use for allocation
  Number of COPIES of each logical                    1                                          +
    partition
  Mirror Write Consistency?                           active                                     +
  Allocate each logical partition copy                yes                                        +
    on a SEPARATE physical volume?
  RELOCATE the logical volume during reorganization?  yes                                        +
  Logical volume LABEL                               []
  MAXIMUM NUMBER of LOGICAL PARTITIONS               [512]                                        #
  Enable BAD BLOCK relocation?                        yes                                        +
  SCHEDULING POLICY for writing/reading               parallel                                   +
    logical partition copies
  Enable WRITE VERIFY?                                no                                         +
  File containing ALLOCATION MAP                     []
  Stripe Size?                                       [Not Striped]                               +
  Serialize IO?                                       no                                         +
  Mirror Pool for First Copy                                                                     +
  Mirror Pool for Second Copy                                                                    +
  Mirror Pool for Third Copy                                                                     +
  Infinite Retry Option?                              no                                         +
  Enable Logical Volume Encryption?                   no

上記では、RANGE of physical volumesmaximum を設定しています。

testlv2 が作成されました。

# lsvg -l testvg
testvg:
LV NAME             TYPE       LPs     PPs     PVs  LV STATE      MOUNT POINT
testlv              jfs2       10      10      1    closed/syncd  N/A
testlv2             jfs2       10      10      2    closed/syncd  N/A
#

testlv2 の物理パーティションの配置を見ると、hdisk1、hdisk2 に分散していました。

# lslv -m testlv2
testlv2:N/A
LP    PP1  PV1               PP2  PV2               PP3  PV3
0001  0139 hdisk1
0002  0129 hdisk2
0003  0140 hdisk1
0004  0130 hdisk2
0005  0141 hdisk1
0006  0131 hdisk2
0007  0142 hdisk1
0008  0132 hdisk2
0009  0143 hdisk1
0010  0133 hdisk2
#

確認は smit で設定しましたが、mklv コマンドでは -e オプションが該当します。

-e  range : Sets the inter-physical volume allocation policy (the number of physical volumes to extend across, using the volumes that provide the best allocation). The Range value is limited by the upperbound variable, (set with the -u flag) and can be one of the following:
  x : Allocates across the maximum number of physical volumes.
  m : Allocates logical partitions across the minimum number of physical volumes. This is the default range.


おわりに

マニュアルにもありますように、可用性とパフォーマンスを考えて LV を構成することが可能です。

最小ディスク間設定 (Range = minimum) を選択すると、論理ボリュームに割り当てられた物理区画は、単一ディスク上に配置され、可用性が増します。 最大ディスク間設定 (Range = maximum) を選択すると、物理区画は複数のディスクに配置され、パフォーマンスが向上します。

以上です。

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?