A.2. dmsetup 命​​​​​​​令​​​​​​​

dmsetup 命​​​​​​​令​​​​​​​是​​​​​​​一​​​​​​​个​​​​​​​用​​​​​​​来​​​​​​​与​​​​​​​设​​​​​​​备​​​​​​​映​​​​​​​射​​​​​​​器​​​​​​​沟​​​​​​​通​​​​​​​的​​​​​​​命​​​​​​​令​​​​​​​行​​​​​​​封​​​​​​​装​​​​​​​器​​​​​​​(wrapper)。​​​​​​​对​​​​​​​于​​​​​​​ LVM 设​​​​​​​备​​​​​​​的​​​​​​​一​​​​​​​般​​​​​​​系​​​​​​​统​​​​​​​信​​​​​​​息​​​​​​​,您​​​​​​​可​​​​​​​发​​​​​​​现​​​​​​​ dmsetup 命​​​​​​​令​​​​​​​的​​​​​​​ info、​​​​​​​ls、​​​​​​​status 和​​​​​​​ deps 选​​​​​​​项​​​​​​​是​​​​​​​有​​​​​​​用​​​​​​​的​​​​​​​,如​​​​​​​以​​​​​​​下​​​​​​​部​​​​​​​分​​​​​​​所​​​​​​​述​​​​​​​。​​​​​​​
有​​​​​​​关​​​​​​​ dmsetup 命​​​​​​​令​​​​​​​的​​​​​​​额​​​​​​​外​​​​​​​选​​​​​​​项​​​​​​​和​​​​​​​功​​​​​​​能​​​​​​​,请​​​​​​​参​​​​​​​考​​​​​​​ dmsetup(8) man page。​​​​​​​

A.2.1. dmsetup info 命​​​​​​​令​​​​​​​

dmsetup info device 命​​​​​​​令​​​​​​​提​​​​​​​供​​​​​​​有​​​​​​​关​​​​​​​设​​​​​​​备​​​​​​​映​​​​​​​射​​​​​​​器​​​​​​​设​​​​​​​备​​​​​​​概​​​​​​​述​​​​​​​。​​​​​​​如​​​​​​​果​​​​​​​您​​​​​​​没​​​​​​​有​​​​​​​指​​​​​​​定​​​​​​​设​​​​​​​备​​​​​​​名​​​​​​​称​​​​​​​,则​​​​​​​输​​​​​​​出​​​​​​​所​​​​​​​余​​​​​​​目​​​​​​​前​​​​​​​配​​​​​​​置​​​​​​​的​​​​​​​设​​​​​​​备​​​​​​​映​​​​​​​射​​​​​​​器​​​​​​​设​​​​​​​备​​​​​​​信​​​​​​​息​​​​​​​。​​​​​​​如​​​​​​​果​​​​​​​您​​​​​​​指​​​​​​​定​​​​​​​了​​​​​​​一​​​​​​​个​​​​​​​设​​​​​​​备​​​​​​​,那​​​​​​​么​​​​​​​这​​​​​​​个​​​​​​​命​​​​​​​令​​​​​​​只​​​​​​​会​​​​​​​生​​​​​​​成​​​​​​​那​​​​​​​个​​​​​​​设​​​​​​​备​​​​​​​的​​​​​​​信​​​​​​​息​​​​​​​。​​​​​​​
dmsetup info 命​​​​​​​令​​​​​​​提​​​​​​​供​​​​​​​以​​​​​​​下​​​​​​​分​​​​​​​类​​​​​​​中​​​​​​​的​​​​​​​信​​​​​​​息​​​​​​​:
Name
该​​​​​​​设​​​​​​​备​​​​​​​的​​​​​​​名​​​​​​​称​​​​​​​。​​​​​​​使​​​​​​​用​​​​​​​以​​​​​​​连​​​​​​​字​​​​​​​符​​​​​​​分​​​​​​​开​​​​​​​的​​​​​​​卷​​​​​​​组​​​​​​​名​​​​​​​称​​​​​​​和​​​​​​​逻​​​​​​​辑​​​​​​​卷​​​​​​​名​​​​​​​称​​​​​​​表​​​​​​​示​​​​​​​ LVM 设​​​​​​​备​​​​​​​。​​​​​​​会​​​​​​​将​​​​​​​原​​​​​​​始​​​​​​​名​​​​​​​称​​​​​​​中​​​​​​​的​​​​​​​连​​​​​​​字​​​​​​​符​​​​​​​转​​​​​​​换​​​​​​​成​​​​​​​两​​​​​​​个​​​​​​​连​​​​​​​字​​​​​​​符​​​​​​​。​​​​​​​
State
可​​​​​​​能​​​​​​​的​​​​​​​设​​​​​​​备​​​​​​​状​​​​​​​态​​​​​​​是​​​​​​​ SUSPENDED、​​​​​​​ACTIVE 和​​​​​​​ READ-ONLY。​​​​​​​dmsetup suspend 命​​​​​​​令​​​​​​​将​​​​​​​设​​​​​​​备​​​​​​​状​​​​​​​态​​​​​​​设​​​​​​​定​​​​​​​为​​​​​​​ SUSPENDED。​​​​​​​当​​​​​​​挂​​​​​​​起​​​​​​​某​​​​​​​个​​​​​​​设​​​​​​​备​​​​​​​时​​​​​​​,所​​​​​​​有​​​​​​​到​​​​​​​那​​​​​​​个​​​​​​​设​​​​​​​备​​​​​​​的​​​​​​​ I/O 操​​​​​​​作​​​​​​​都​​​​​​​会​​​​​​​停​​​​​​​止​​​​​​​。​​​​​​​dmsetup resume 命​​​​​​​令​​​​​​​将​​​​​​​设​​​​​​​备​​​​​​​状​​​​​​​态​​​​​​​恢​​​​​​​复​​​​​​​到​​​​​​​ ACTIVE。​​​​​​​
Read Ahead
系​​​​​​​统​​​​​​​对​​​​​​​任​​​​​​​意​​​​​​​正​​​​​​​在​​​​​​​进​​​​​​​行​​​​​​​读​​​​​​​取​​​​​​​操​​​​​​​作​​​​​​​的​​​​​​​打​​​​​​​开​​​​​​​的​​​​​​​文​​​​​​​件​​​​​​​提​​​​​​​前​​​​​​​读​​​​​​​取​​​​​​​的​​​​​​​数​​​​​​​据​​​​​​​块​​​​​​​的​​​​​​​数​​​​​​​目​​​​​​​。​​​​​​​模​​​​​​​热​​​​​​​情​​​​​​​况​​​​​​​下​​​​​​​,内​​​​​​​核​​​​​​​会​​​​​​​自​​​​​​​动​​​​​​​选​​​​​​​择​​​​​​​一​​​​​​​个​​​​​​​合​​​​​​​适​​​​​​​的​​​​​​​值​​​​​​​。​​​​​​​您​​​​​​​可​​​​​​​使​​​​​​​用​​​​​​​ dmsetup 命​​​​​​​令​​​​​​​的​​​​​​​ --readahead 选​​​​​​​项​​​​​​​更​​​​​​​改​​​​​​​这​​​​​​​个​​​​​​​值​​​​​​​。​​​​​​​
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
打​​​​​​​开​​​​​​​参​​​​​​​考​​​​​​​计​​​​​​​数​​​​​​​指​​​​​​​示​​​​​​​该​​​​​​​打​​​​​​​开​​​​​​​该​​​​​​​设​​​​​​​备​​​​​​​的​​​​​​​次​​​​​​​数​​​​​​​。​​​​​​​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
主​​​​​​​设​​​​​​​备​​​​​​​号​​​​​​​码​​​​​​​和​​​​​​​副​​​​​​​设​​​​​​​备​​​​​​​号​​​​​​​码​​​​​​​
Number of targets
组​​​​​​​成​​​​​​​一​​​​​​​个​​​​​​​设​​​​​​​备​​​​​​​的​​​​​​​片​​​​​​​段​​​​​​​数​​​​​​​目​​​​​​​。​​​​​​​例​​​​​​​如​​​​​​​:一​​​​​​​个​​​​​​​跨​​​​​​​越​​​​​​​三​​​​​​​个​​​​​​​磁​​​​​​​盘​​​​​​​的​​​​​​​线​​​​​​​性​​​​​​​设​​​​​​​备​​​​​​​会​​​​​​​有​​​​​​​三​​​​​​​个​​​​​​​对​​​​​​​象​​​​​​​。​​​​​​​由​​​​​​​一​​​​​​​个​​​​​​​磁​​​​​​​盘​​​​​​​起​​​​​​​始​​​​​​​和​​​​​​​结​​​​​​​尾​​​​​​​,而​​​​​​​不​​​​​​​是​​​​​​​中​​​​​​​间​​​​​​​组​​​​​​​成​​​​​​​的​​​​​​​线​​​​​​​性​​​​​​​设​​​​​​​备​​​​​​​有​​​​​​​两​​​​​​​个​​​​​​​设​​​​​​​备​​​​​​​。​​​​​​​
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