9.0
top
← prev up next →

Device MapperπŸ”— i

Jan Dvorak <mordae@anilinux.org>

Linux Device Mapper bindings using "libdevmapper.so.1.02".

(require dm ) package: dm

Linux Device Mapper works with mappings and targets.

Every mapping have a named block device in "/dev/mapper" and a table of targets that together represent surface of the block device. For example a mapping "vg_mordae-lv_root" may represent a logical volume that maps 10 GiB of space in the middle of my laptop’s only disk drive using a linear mapping.

procedure

( dm-createname[#:uuiduuid]target...)void?

name:string?
uuid:(or/c #fstring? )=#f
target:dm-target?
Create new mapping from list of targets. You can supply an uuid or have it automatically generated.

procedure

( dm-reloadnametarget...)void?

name:string?
target:dm-target?
Atomically replace table of specified mapping.

procedure

( dm-rename name
new-name
[ #:new-uuidnew-uuid])void?
name:string?
new-name:string?
new-uuid:(or/c #fstring? )=#f
Rename specified mapping, possibly with uuid (if needed).

procedure

( dm-removename)void?

name:string?
Destroy specified mapping.

procedure

( dm-get-table name)(listof dm-target? )

name:string?
Query current table (that is a list of targets) of specified mapping.

struct

(struct dm-target(startlengthtypeparams)
#:extra-constructor-namemake-dm-target
#:transparent)
start:integer?
length:integer?
type:symbol?
Single row of a device map table. For example when creating a mapping:

(dm-create"test"
(dm-target01024'linear"253:1"2048)
(dm-target10241024'linear"253:2"2048))

procedure

( dm-list )(listof string? )

List names of mappings defined on this machine.

procedure

( dm-get-info name)dm-info?

name:string?
Query information about a mapping.

struct

(struct dm-info ( exists
suspended
live-table
inactive-table
open-count
event-nr
major
minor
read-only
target-count)
#:extra-constructor-namemake-dm-info
#:transparent)
exists:boolean?
suspended:boolean?
live-table:boolean?
inactive-table:boolean?
open-count:integer?
event-nr:integer?
major:integer?
minor:integer?
read-only:boolean?
target-count:integer?
Mapping information that can be obtained with dm-get-info .

procedure

( dm-suspendname)void?

name:string?
Suspend specified mapping, that is: flush pending requests and block new ones.

procedure

( dm-resumename)void?

name:string?
Cancel suspension of specified mapping.

top
← prev up next →

AltStyle γ«γ‚ˆγ£γ¦ε€‰ζ›γ•γ‚ŒγŸγƒšγƒΌγ‚Έ (->γ‚ͺγƒͺγ‚ΈγƒŠγƒ«) /