Installation guide

C.3. Inherit ance, t he <resources> Block, and Reusing Resources
Some resources benefit by inheriting values from a parent resource; that is commonly the case in an
NFS service. Example C.5, ā€œ NFS Service Set Up for Resource Reuse and Inheritanceā€ shows a typical
NFS service configuration, set up for resource reuse and inheritance.
Examp le C.5. N FS Service Set Up f o r R eso u rce Reu se an d In h erit an ce
<resources>
<nfsclient name="bob" target="bob.example.com"
options="rw,no_root_squash"/>
<nfsclient name="jim" target="jim.example.com"
options="rw,no_root_squash"/>
<nfsexport name="exports"/>
</resources>
<service name="foo">
<fs name="1" mountpoint="/mnt/foo" device="/dev/sdb1"
fsid="12344">
<nfsexport ref="exports"> <!-- nfsexport's path and fsid
attributes
are inherited from the
mountpoint &
fsid attribute of the
parent fs
resource -->
<nfsclient ref="bob"/> <!-- nfsclient's path is
inherited from the
mountpoint and the fsid is
added to the
options string during
export -->
<nfsclient ref="jim"/>
</nfsexport>
</fs>
<fs name="2" mountpoint="/mnt/bar" device="/dev/sdb2"
fsid="12345">
<nfsexport ref="exports">
<nfsclient ref="bob"/> <!-- Because all of the critical
data for this
resource is either defined
in the
resources block or
inherited, we can
reference it again! -->
<nfsclient ref="jim"/>
</nfsexport>
</fs>
<ip address="10.2.13.20"/>
</service>
If the service were flat (that is, with no parent/child relationships), it would need to be configured as
follows:
Red Hat Ent erprise Linux 6 Clust er Administ rat ion
212