<& xfsTemplate,top=>1,side=>1 &>
<!-- Start Project Content -->
<h2>
<b><font face="ARIAL NARROW,HELVETICA">The Data Management API (DMAPI)</font></b></h2>
<p>
The Data Management API (DMAPI) is the mechanism within
the XFS filesystem for passing file management
requests between the kernel and a hierarchical
storage management system (HSM).
</p>
<p>
In order to configure an HSM, you must ensure that
you have installed DMAPI and the appropriate patches.
</p>
<p>
This page provides information on the following topics:
<br>
<br>
<li>
<A HREF="#_dmapistatus">DMAPI status in XFS</A>
</li>
<li>
<A HREF="#_dmapibuild">Building DMAPI</A>
</li>
<li>
<A HREF="#_dmapidev">The DMAPI device</A>
</li>
<li>
<A HREF="#_dmapilib">The DMAPI libraries</A>
</li>
<li>
<A HREF="#_mountdmapi">Mounting filesystems for use with DMAPI</A>
</li>
</p>
<h3>
<A NAME="_dmapistatus">DMAPI Status in XFS</A>
</h3>
<p>
The current status of the individual DMAPI functions in XFS can
be found in the file <tt>linux/fs/xfs/dmapi/Status</tt>.
</p>
<h3>
<A NAME="_dmapibuild">Building DMAPI</A>
</h3>
<p>
To build DMAPI, set the DMAPI config flag when you
configure XFS as part of your build. This
flag is in the collection of XFS configuration options.
</p>
<h3>
<A NAME="_dmapidev">The DMAPI Device</A>
</h3>
<p>
In order to use DMAPI, you need to create the device <tt>/dev/dmapi</tt>;
this is the interface the user library uses to communicate with the
kernel side of DMAPI.
</p>
<p>
Execute the following command to create the DMAPI device:
</p>
<ul>
<tt>mknod /dev/dmapi c 10 140</tt>
</ul>
<h3>
<A NAME="_dmapilib">The DMAPI Libraries</A>
</h3>
<p>
The user library for DMAPI is <tt>cmd/xfs/libdm/libdm.so</tt>.
The user library requires the handle
library <tt>cmd/xfs/handle/libhandle.a</tt>.
The handle library is located at tt>cmd/xfsprogs/libhandle</tt>.
Both the libdm and handle directories are installed by the RPMs.
DMAPI applications need to link with both of of these libraries.
</p>
<p>If you have the entire source tree, the DMAPI libraries are
found in the following locations:
</p>
<ul>
<li><tt>cmd/dmapi/libdm</tt></tt>
<li><tt>cmd/xfsprogs/libhandle</tt></tt>
</ul>
<p>
The RPMs for the libraries are:
</p>
<ul>
<li><tt>dmapi</tt></tt>
<li><tt>dmapi-devel</tt></tt>
<li><tt>xfsprogs-devel</tt></tt>
</ul>
<h3>
<A NAME="_mountdmapi">Mounting Filesystems for use with DMAPI</A>
</h3>
<p>
In order for filesystems to be managed by an HSM,
they must be mounted to enable the DMAPI interface.
To mount a filesystem for use with DMAPI, use the following
command:
</p>
<ul>
<tt>mount -o dmapi /dev/<i>fs-dev</i> /mntpt</tt>
</ul>
<br>
<br>
<& xfsTemplate,bottom=>1 &>