LDP/LDP/guide/docbook/EVMSUG/locatingdev-ug.xml

95 lines
4.5 KiB
XML

<chapter id="evmsuglocating"><title>Locating and Fixing Device Files</title>
<para>In order for user-space programs to access EVMS
volumes, device files are created in the <filename>/dev/evms
</filename> directory for each volume that is exported by EVMS. Device files are created every time
the Engine is opened and saves changes, so you can always see the current state of the volume configuration
in the <filename>/dev/evms</filename> directory.</para>
<para>A variety of namespaces exist within the <filename>/dev/evms</filename> directory. Each plug-in defines
and maintains its own namespace. The most common names will
be those of DOS segments. On a non-EVMS Linux system, disk drives and drive partitions appear as files in
<filename>/dev</filename>. The same names are maintained in EVMS by the
local device manager and the DOS segment manager. Corresponding device files are created in
<filename>/dev/evms</filename>. An example of the naming convention follows:</para>
<programlisting>
/dev/hda -> /dev/evms/hda
/dev/hda1 -> /dev/evms/hda1
/dev/sdb -> /dev/evms/sdb
/dev/sdb5 -> /dev/evms/sdb5
</programlisting>
<para>EVMS features create logical volumes with persistent names. The
names of these volumes are used to create the appropriate device
file in <filename>/dev/evms</filename>. For example, if an EVMS
snapshot was created and made into a volume named "Thursday_Snapshot," the file would appear
as <filename>/dev/evms/Thursday_Snapshot</filename>.</para>
<para>The Linux LVM plug-in is an example of a plug-in specific namespace
that uses its own namespace (<filename>/dev/evms/lvm</filename>). In
this directory, additional directories are created for each active
volume group. Device files representing the LVM logical volumes
are created in the appropriate group directory, as demonstrated in the following example:</para>
<programlisting>/dev/Group1/Volume1 -> /dev/evms/lvm/Group1/Volume1</programlisting>
<para>Namespaces exist for other plug-ins. Currently
the OS/2 LVM is in <filename>/dev/evms/os2</filename>, the
AIX LVM is in <filename>/dev/evms/aix</filename>, and the MD is in <filename>/dev/evms/md</filename>.</para>
<note><title>CAUTION</title>
<para>When using EVMS you should perform all filesystem mounts using the
EVMS device nodes. Failure to do so could result in loss of data when running EVMS configuration tools.</para></note>
<sect1 id="DEVFS"><title>devfs</title>
<para>EVMS supports the kernel device file system (devfs). If you have
devfs enabled in the kernel and mounted in your file system tree, you
will see the device files for your volumes immediately upon boot.
devfs is the preferred method for running EVMS
because it ensures that the minor
numbers EVMS dynamically assigns to compatibility volumes will never be
out of sync with the minor numbers of the device files for those volumes.</para>
</sect1>
<sect1 id="DEVNODEFIXUP"><title>Fixing EVMS Device Nodes</title>
<para>On systems that are not running devfs, the device nodes in the
<filename>/dev/evms</filename> directory might become out of sync
with the volumes that are exported by the EVMS
kernel. The following list details potential problems that could occur if you do
not use devfs: </para>
<itemizedlist>
<listitem><para>Nodes might not exist for volumes that are exported.</para></listitem>
<listitem><para>Nodes might have the wrong minor
number associated with them.</para></listitem>
<listitem><para>Nodes might exist for volumes that are no longer exported by the EVMS
kernel.</para></listitem>
</itemizedlist>
<para>Starting one of the user interfaces alleviates the problems listed above. The EVMS Engine will update the device nodes in
the <filename>/dev/evms</filename> so that the nodes agree with the volumes that are exported by
the EVMS kernel.</para>
<para>The <command>evms_devnode_fixup</command> program provides an alternative
means of fixing the device nodes in the <filename>/dev/evms</filename> directory by
updating the device nodes without the overhead of starting the Engine.</para>
<para><command>evms_devnode_fixup</command>
can be run as a daemon by specifying the <option>-d</option> option. In daemon mode,
<command>evms_devnode_fixup</command> will first fix the device nodes in the
<filename>/dev/evms</filename> directory. It then loops, waiting for
notifications of volume changes from the EVMS Runtime. On each notification,
<command>evms_devnode_fixup</command> fixes the device nodes in the
<filename>/dev/evms</filename> directory.</para>
</sect1>
</chapter>