Red Hat Training

A Red Hat training course is available for Red Hat Enterprise Linux

A.2. dmsetup 指​​​​​​​令​​​​​​​

dmsetup 指​​​​​​​令​​​​​​​是​​​​​​​一​​​​​​​項​​​​​​​用​​​​​​​來​​​​​​​和​​​​​​​ Device Mapper 進​​​​​​​行​​​​​​​通​​​​​​​訊​​​​​​​的​​​​​​​指​​​​​​​令​​​​​​​列​​​​​​​ wrapper。​​​​​​​如​​​​​​​欲​​​​​​​取​​​​​​​得​​​​​​​有​​​​​​​關​​​​​​​於​​​​​​​ LVM 裝​​​​​​​置​​​​​​​的​​​​​​​一​​​​​​​般​​​​​​​系​​​​​​​統​​​​​​​資​​​​​​​訊​​​​​​​,您​​​​​​​可​​​​​​​使​​​​​​​用​​​​​​​描​​​​​​​述​​​​​​​於​​​​​​​下​​​​​​​列​​​​​​​部​​​​​​​份​​​​​​​的​​​​​​​ dmsetup 指​​​​​​​令​​​​​​​的​​​​​​​ info、​​​​​​​ls、​​​​​​​status 和​​​​​​​ deps 選​​​​​​​項​​​​​​​。​​​​​​​
如​​​​​​​欲​​​​​​​取​​​​​​​得​​​​​​​有​​​​​​​關​​​​​​​於​​​​​​​ dmsetup 指​​​​​​​令​​​​​​​的​​​​​​​額​​​​​​​外​​​​​​​選​​​​​​​項​​​​​​​和​​​​​​​功​​​​​​​能​​​​​​​上​​​​​​​的​​​​​​​相​​​​​​​關​​​​​​​資​​​​​​​訊​​​​​​​,請​​​​​​​查​​​​​​​看​​​​​​​ dmsetup(8) man page。​​​​​​​

A.2.1. dmsetup info 指​​​​​​​令​​​​​​​

dmsetup info device 這​​​​​​​項​​​​​​​指​​​​​​​令​​​​​​​提​​​​​​​供​​​​​​​了​​​​​​​有​​​​​​​關​​​​​​​於​​​​​​​ Device Mapper 裝​​​​​​​置​​​​​​​的​​​​​​​總​​​​​​​覽​​​​​​​資​​​​​​​訊​​​​​​​。​​​​​​​若​​​​​​​您​​​​​​​不​​​​​​​指​​​​​​​定​​​​​​​一​​​​​​​個​​​​​​​裝​​​​​​​置​​​​​​​名​​​​​​​稱​​​​​​​的​​​​​​​話​​​​​​​,輸​​​​​​​出​​​​​​​便​​​​​​​會​​​​​​​是​​​​​​​有​​​​​​​關​​​​​​​於​​​​​​​目​​​​​​​前​​​​​​​所​​​​​​​有​​​​​​​已​​​​​​​配​​​​​​​置​​​​​​​的​​​​​​​ Device Mapper 裝​​​​​​​置​​​​​​​的​​​​​​​相​​​​​​​關​​​​​​​資​​​​​​​訊​​​​​​​。​​​​​​​若​​​​​​​您​​​​​​​指​​​​​​​定​​​​​​​了​​​​​​​一​​​​​​​個​​​​​​​裝​​​​​​​置​​​​​​​,那​​​​​​​麼​​​​​​​這​​​​​​​項​​​​​​​指​​​​​​​令​​​​​​​便​​​​​​​只​​​​​​​會​​​​​​​產​​​​​​​生​​​​​​​該​​​​​​​裝​​​​​​​置​​​​​​​的​​​​​​​相​​​​​​​關​​​​​​​資​​​​​​​訊​​​​​​​。​​​​​​​
dmsetup info 指​​​​​​​令​​​​​​​提​​​​​​​供​​​​​​​了​​​​​​​下​​​​​​​列​​​​​​​種​​​​​​​類​​​​​​​的​​​​​​​資​​​​​​​訊​​​​​​​:
Name
裝​​​​​​​置​​​​​​​的​​​​​​​名​​​​​​​稱​​​​​​​。​​​​​​​LVM 裝​​​​​​​置​​​​​​​是​​​​​​​以​​​​​​​卷​​​​​​​冊​​​​​​​群​​​​​​​組​​​​​​​名​​​​​​​稱​​​​​​​和​​​​​​​邏​​​​​​​輯​​​​​​​卷​​​​​​​冊​​​​​​​名​​​​​​​稱​​​​​​​來​​​​​​​表​​​​​​​示​​​​​​​並​​​​​​​以​​​​​​​連​​​​​​​字​​​​​​​符​​​​​​​號​​​​​​​來​​​​​​​區​​​​​​​隔​​​​​​​開​​​​​​​。​​​​​​​原​​​​​​​始​​​​​​​名​​​​​​​稱​​​​​​​中​​​​​​​的​​​​​​​連​​​​​​​字​​​​​​​符​​​​​​​號​​​​​​​會​​​​​​​被​​​​​​​轉​​​​​​​譯​​​​​​​為​​​​​​​兩​​​​​​​個​​​​​​​連​​​​​​​字​​​​​​​符​​​​​​​號​​​​​​​。​​​​​​​
State
可​​​​​​​能​​​​​​​的​​​​​​​裝​​​​​​​置​​​​​​​狀​​​​​​​態​​​​​​​有​​​​​​​ SUSPENDED、​​​​​​​ACTIVE 和​​​​​​​ READ-ONLY。​​​​​​​dmsetup suspend 指​​​​​​​令​​​​​​​會​​​​​​​將​​​​​​​裝​​​​​​​置​​​​​​​狀​​​​​​​態​​​​​​​設​​​​​​​為​​​​​​​ SUSPENDED。​​​​​​​當​​​​​​​裝​​​​​​​置​​​​​​​休​​​​​​​眠​​​​​​​(suspend)時​​​​​​​,該​​​​​​​裝​​​​​​​置​​​​​​​的​​​​​​​所​​​​​​​有​​​​​​​ I/O 作​​​​​​​業​​​​​​​都​​​​​​​會​​​​​​​停​​​​​​​下​​​​​​​。​​​​​​​dmsetup resume 指​​​​​​​令​​​​​​​則​​​​​​​會​​​​​​​將​​​​​​​裝​​​​​​​置​​​​​​​狀​​​​​​​態​​​​​​​恢​​​​​​​復​​​​​​​為​​​​​​​ ACTIVE。​​​​​​​
Read Ahead
系​​​​​​​統​​​​​​​將​​​​​​​為​​​​​​​讀​​​​​​​取​​​​​​​作​​​​​​​業​​​​​​​繼​​​​​​​續​​​​​​​進​​​​​​​行​​​​​​​中​​​​​​​的​​​​​​​任​​​​​​​何​​​​​​​已​​​​​​​開​​​​​​​啟​​​​​​​的​​​​​​​檔​​​​​​​案​​​​​​​所​​​​​​​預​​​​​​​讀​​​​​​​的​​​​​​​資​​​​​​​料​​​​​​​區​​​​​​​塊​​​​​​​數​​​​​​​量​​​​​​​。​​​​​​​就​​​​​​​預​​​​​​​設​​​​​​​值​​​​​​​,kernel 會​​​​​​​自​​​​​​​動​​​​​​​地​​​​​​​選​​​​​​​擇​​​​​​​一​​​​​​​個​​​​​​​適​​​​​​​當​​​​​​​的​​​​​​​值​​​​​​​。​​​​​​​您​​​​​​​可​​​​​​​透​​​​​​​過​​​​​​​ --readahead option of the dmsetup 指​​​​​​​令​​​​​​​來​​​​​​​更​​​​​​​改​​​​​​​這​​​​​​​個​​​​​​​值​​​​​​​。​​​​​​​
Tables present
Possible states for this category are LIVE and INACTIVE. An INACTIVE state indicates that a table has been loaded which will be swapped in when a dmsetup resume command restores a device state to ACTIVE, at which point the table's state becomes LIVE. For information, see the dmsetup man page.
Open count
Open reference count 表​​​​​​​示​​​​​​​了​​​​​​​裝​​​​​​​置​​​​​​​被​​​​​​​開​​​​​​​啟​​​​​​​了​​​​​​​多​​​​​​​少​​​​​​​次​​​​​​​。​​​​​​​mount 指​​​​​​​令​​​​​​​可​​​​​​​將​​​​​​​裝​​​​​​​置​​​​​​​開​​​​​​​啟​​​​​​​。​​​​​​​
Event number
The current number of events received. Issuing a dmsetup wait n command allows the user to wait for the n'th event, blocking the call until it is received.
Major, minor
Major 和​​​​​​​ minor
Number of targets
構​​​​​​​成​​​​​​​一​​​​​​​個​​​​​​​裝​​​​​​​置​​​​​​​的​​​​​​​片​​​​​​​段​​​​​​​數​​​​​​​量​​​​​​​。​​​​​​​比​​​​​​​方​​​​​​​說​​​​​​​一​​​​​​​個​​​​​​​跨​​​​​​​距​​​​​​​了​​​​​​​三​​​​​​​個​​​​​​​磁​​​​​​​碟​​​​​​​的​​​​​​​ linear 裝​​​​​​​置​​​​​​​將​​​​​​​會​​​​​​​有​​​​​​​三​​​​​​​個​​​​​​​目​​​​​​​標​​​​​​​。​​​​​​​一​​​​​​​個​​​​​​​由​​​​​​​磁​​​​​​​碟​​​​​​​起​​​​​​​始​​​​​​​和​​​​​​​結​​​​​​​尾​​​​​​​(少​​​​​​​了​​​​​​​中​​​​​​​間​​​​​​​)所​​​​​​​構​​​​​​​成​​​​​​​的​​​​​​​ linear 裝​​​​​​​置​​​​​​​將​​​​​​​會​​​​​​​有​​​​​​​兩​​​​​​​個​​​​​​​目​​​​​​​標​​​​​​​。​​​​​​​
UUID
裝​​​​​​​置​​​​​​​的​​​​​​​ UUID。​​​​​​​
下​​​​​​​列​​​​​​​範​​​​​​​例​​​​​​​顯​​​​​​​示​​​​​​​了​​​​​​​ dmsetup info 指​​​​​​​令​​​​​​​的​​​​​​​部​​​​​​​份​​​​​​​輸​​​​​​​出​​​​​​​。​​​​​​​
[root@ask-07 ~]# dmsetup info
Name:              testgfsvg-testgfslv1
State:             ACTIVE
Read Ahead:        256
Tables present:    LIVE
Open count:        0
Event number:      0
Major, minor:      253, 2
Number of targets: 2
UUID: LVM-K528WUGQgPadNXYcFrrf9LnPlUMswgkCkpgPIgYzSvigM7SfeWCypddNSWtNzc2N
...
Name:              VolGroup00-LogVol00
State:             ACTIVE
Read Ahead:        256
Tables present:    LIVE
Open count:        1
Event number:      0
Major, minor:      253, 0
Number of targets: 1
UUID: LVM-tOcS1kqFV9drb0X1Vr8sxeYP0tqcrpdegyqj5lZxe45JMGlmvtqLmbLpBcenh2L3