RAID1でLVMを使用する

RAID1でLVMを使用する

私はSLES 15 SP3を使用しています。 autoyast.xmlを使用してLVMを介してRAID1を設定する必要があります。

AutoYastガイドでこれを設定する方法の例を見つけました。

本当に単純に見え、試してみましたが、とても素敵に動作しました。ただし、AutoYastを使用して設定する方法の例が見つかりません。

その後、コマンドラインを使用していくつかの例を見つけました。

https://wiki.gentoo.org/wiki/Raid1_with_LVM_from_scratch

https://linuxconfig.org/linux-lvm-logic-volume-manager

そのため、指示に従ってLVM RAID1を設定しました。

# lvdisplay
  --- Logical volume ---
  LV Path                /dev/nitin-vgr1/nitin-lvr1
  LV Name                nitin-lvr1
  VG Name                nitin-vgr1
  LV UUID                kPeOlZ-1laD-faVM-o20q-wd0y-wala-N3kMNq
  LV Write Access        read/write
  LV Creation host, time nit, 2021-11-13 17:28:19 +0000
  LV Status              available
  # open                 1
  LV Size                49.99 GiB
  Current LE             12798
  Mirrored volumes       2
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     1024
  Block device           254:9

各ディスクは50GB(/dev/sddおよび/dev/sde)、LVサイズ= 49.99GiBなので、これは意味があります。

ミラーボリュームも 2 に設定されます。 RAID1構成が正常に動作しているようです。

また、このコマンドについては知っていますがyast clone_system(デフォルトではシステム構成の詳細を含むautoyast.xml fpr実行可能システムを作成します)、残念ながらこのコマンドは機能しません。

出力は次のとおりです(他の不要な項目はすべて削除しました)。

<partitioning t="list">
    <drive t="map">
        <device>/dev/nitin-vgr1</device>
        <partitions t="list">
            <partition t="map">
                <create t="boolean">true</create>
                <filesystem t="symbol">ext4</filesystem>
                <format t="boolean">false</format>
                <fstopt>rw,relatime</fstopt>
                <lv_name>nitin-lvr1</lv_name>
                <mount>/nit-raid</mount>
                <mountby t="symbol">device</mountby>
                <pool t="boolean">false</pool>
                <resize t="boolean">false</resize>
                <size>53678702592</size>
                <stripes t="integer">2</stripes>
                <stripesize t="integer">0</stripesize>
            </partition>
        </partitions>
        <pesize>4194304</pesize>
        <type t="symbol">CT_LVM</type>
    </drive>
    <drive t="map">
        <device>/dev/sdd</device>
        <disklabel>none</disklabel>
        <partitions t="list">
            <partition t="map">
                <create t="boolean">false</create>
                <format t="boolean">false</format>
                <lvm_group>nitin-vgr1</lvm_group>
                <resize t="boolean">false</resize>
            </partition>
        </partitions>
        <type t="symbol">CT_DISK</type>
        <use>all</use>
    </drive>
    <drive t="map">
        <device>/dev/sde</device>
        <disklabel>none</disklabel>
        <partitions t="list">
            <partition t="map">
                <create t="boolean">false</create>
                <format t="boolean">false</format>
                <lvm_group>nitin-vgr1</lvm_group>
                <resize t="boolean">false</resize>
            </partition>
        </partitions>
        <type t="symbol">CT_DISK</type>
        <use>all</use>
    </drive>
</partitioning>

私はこれが正しいとは思わない。ここでは言及されていませんRAID1

誰でも私を助けることができますか? 2日が過ぎましたが、まだこれを行う方法が見つかりませんでした。どんな助けでも大変感謝します。

ベストアンサー1

私はこれをすることができる。従うべきステップは次のとおりです。expert-partitionerオペレーティングシステムをインストールするとき。

  • (100.00 GIB)および(100.00 GiB)からRAID1 /dev/md0(99.87 GIB)を作成します。/dev/sda/dev/sdb
  • /dev/md0p1(5.00GiB)を使用したパーティションの作成/boot/efivfat
  • /dev/md0p2LVM物理ボリュームによるパーティション(94.87GB)の作成
  • raidvg(94.87 GiB)を使用してボリュームグループ(/dev/mdOp294.87 GiB)を作成します。
  • /dev/raidvg/var/var以下を使用して、ボリュームグループraidvgにLVM論理ボリューム(54.87 GIB)を作成します。btrfs
  • ボリュームグループにLVM論理ボリューム/dev/raidvg/system(40.00GiB)を作成します。raidvg/btrfs

システムのインストールが完了したら、コマンドを使用してyast2 system_clonedir の下に autoyast ファイルを生成します。/root

RAID1を使用してLVMを設定するための規則は、このファイルのセクションにありますpartitioning

おすすめ記事