Show Table of Contents
A.2.2. dmsetup ls 指令
您可透過
dmsetup ls 指令來列出映射裝置的裝置名稱。您可透過使用 dmsetup ls --target target_type 指令來列出擁有至少一個指定類型的目標的裝置。如欲取得其它 dmsetup ls 的選項的相關資訊,請參閱 dmsetup man page。
下列範例顯示了用來列出目前已配置的映射裝置之裝置名稱的指令。
# dmsetup ls
testgfsvg-testgfslv3 (253:4)
testgfsvg-testgfslv2 (253:3)
testgfsvg-testgfslv1 (253:2)
VolGroup00-LogVol01 (253:1)
VolGroup00-LogVol00 (253:0)
下列範例顯示了用來列出目前已配置的鏡像映射之裝置名稱的指令。
# dmsetup ls --target mirror
lock_stress-grant--02.1722 (253, 34)
lock_stress-grant--01.1720 (253, 18)
lock_stress-grant--03.1718 (253, 52)
lock_stress-grant--02.1716 (253, 40)
lock_stress-grant--03.1713 (253, 47)
lock_stress-grant--02.1709 (253, 23)
lock_stress-grant--01.1707 (253, 8)
lock_stress-grant--01.1724 (253, 14)
lock_stress-grant--03.1711 (253, 27)
堆在 multipath 或其它 device mapper 裝置上的 LVM 配置可能非常複雜。
dmsetup ls 指令提供了一項 --tree 選項,以將裝置之間的相依性,如下列範例以樹狀顯示。
# dmsetup ls --tree
vgtest-lvmir (253:13)
├─vgtest-lvmir_mimage_1 (253:12)
│ └─mpathep1 (253:8)
│ └─mpathe (253:5)
│ ├─ (8:112)
│ └─ (8:64)
├─vgtest-lvmir_mimage_0 (253:11)
│ └─mpathcp1 (253:3)
│ └─mpathc (253:2)
│ ├─ (8:32)
│ └─ (8:16)
└─vgtest-lvmir_mlog (253:4)
└─mpathfp1 (253:10)
└─mpathf (253:6)
├─ (8:128)
└─ (8:80)

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.