Red Hat Training

A Red Hat training course is available for Red Hat Ceph Storage

10.2.5. lv-create.yml Ansible Playbook の実行

Playbook lv-create.yml の目的は、単一の NVMe にオブジェクトゲートウェイバケットインデックスおよびジャーナルに論理ボリュームを作成することです。これは、osd_scenario=non-collocated ではなく osd_scenario=lvm を使用して行います。Ansible Playbook の lv-create.yml により、複雑な LVM の作成および設定を自動化することで Ceph を簡単に設定することができます。

  1. root で、Ansible Playbook lv-create.yml を現在のディレクトリーにコピーします。

    # cp infrastructure-playbooks/lv-create.yml .
  2. ストレージデバイスが未処理であることを確認します。

    lv-create.yml を実行して、NVMe デバイスおよび HDD デバイスに論理ボリュームを作成する前に、ファイルシステム、GPT、RAID、その他の署名がないことを確認してください。

    生でない場合には、lv-create.yml を実行すると、以下のエラーで失敗する可能性があります。

    device /dev/sdc excluded by a filter
  3. ストレージデバイスの署名を消去します(オプション)。

    デバイスに署名がある場合は、wipefs を使用して消去できます。

    wipefs を使用してデバイスを消去する例を以下に示します。

    [root@c04-h01-6048r ~]# wipefs -a /dev/sdc
    /dev/sdc: 8 bytes were erased at offset 0x00000200 (gpt): 45 46 49 20 50 41 52 54
    /dev/sdc: 8 bytes were erased at offset 0x1d19ffffe00 (gpt): 45 46 49 20 50 41 52 54
    /dev/sdc: 2 bytes were erased at offset 0x000001fe (PMBR): 55 aa
    /dev/sdc: calling ioclt to re-read partition table: Success
    [root@c04-h01-6048r ~]# wipefs -a /dev/sdd
    /dev/sdd: 8 bytes were erased at offset 0x00000200 (gpt): 45 46 49 20 50 41 52 54
    /dev/sdd: 8 bytes were erased at offset 0x1d19ffffe00 (gpt): 45 46 49 20 50 41 52 54
    /dev/sdd: 2 bytes were erased at offset 0x000001fe (PMBR): 55 aa
    /dev/sdd: calling ioclt to re-read partition table: Success
    [root@c04-h01-6048r ~]# wipefs -a /dev/sde
    /dev/sde: 8 bytes were erased at offset 0x00000200 (gpt): 45 46 49 20 50 41 52 54
    /dev/sde: 8 bytes were erased at offset 0x1d19ffffe00 (gpt): 45 46 49 20 50 41 52 54
    /dev/sde: 2 bytes were erased at offset 0x000001fe (PMBR): 55 aa
    /dev/sde: calling ioclt to re-read partition table: Success
    [root@c04-h01-6048r ~]# wipefs -a /dev/sdf
    /dev/sdf: 8 bytes were erased at offset 0x00000200 (gpt): 45 46 49 20 50 41 52 54
    /dev/sdf: 8 bytes were erased at offset 0x1d19ffffe00 (gpt): 45 46 49 20 50 41 52 54
    /dev/sdf: 2 bytes were erased at offset 0x000001fe (PMBR): 55 aa
    /dev/sdf: calling ioclt to re-read partition table: Success
  4. Ansible Playbook の lv-teardown.yml を実行します。

    lv-create.yml を実行する前に、常に lv-teardown.yml を実行します。

    root で Ansible Playbook lv-teardown.yml を現在のディレクトリーにコピーします。

    # cp infrastructure-playbooks/lv-teardown.yml .

    Ansible Playbook の lv-teardown.yml を実行します。

    $ ansible-playbook lv-teardown.yml
    警告

    Ansible スクリプト lv-teardown.yml を実行する場合は、注意が必要です。データが破棄されます。重要なデータのバックアップを作成してください。

  5. Ansible Playbook の lv-create.yml を実行します。

    $ ansible-playbook lv-create.yml