 |
Index for Section 8 |
|
 |
Alphabetical listing for M |
|
 |
Bottom of page |
|
mkcdsl(8)
NAME
mkcdsl - Make a context-dependent symbolic link (CDSL)
SYNOPSIS
/usr/sbin/mkcdsl -[fnv] [-i | -c | -a] [sourcename] targetname
FLAGS
-a All members. Copy the existing file or directory to a member-
specific area on all members.
-c Copy the existing file or directory to a member-specific area on
this member only.
-f Force the overwriting of the existing CDSL or member-specific
file or directory. When the force option is used with a copy
option, mkcdsl will overwrite an existing member-specific file or
directory.
Without the force (-f) option, mkcdsl prompts for confirmation
whenever the physical path of the target differs from the
specified targetname (for example, when targetname resolution
traverses a symbolic link), the specified sourcename differs from
the calculated sourcename, or the source for a specified copy
option cannot be found.
-i Inventory only. Check the files and update the inventory:
·
If targetname is a CDSL, add a new entry or update the existing
entry in /var/adm/cdsl_admin.inv.
·
If targetname is not a CDSL or does not exist, remove its entry
from /var/adm/cdsl_admin.inv.
-n No execute mode. Display what would be done but do not create or
change anything.
-v Verbose.
sourcename
The pathname of the member-specific file to be linked.
By default, each CDSL created by mkcdsl has a sourcename that
points to the default member-specific area in the file system
where the targetname resolves. For example,
/usr/cluster/members/{memb}/ is the default member-specific area
for the /usr file system. When issued without an explicit
sourcename, mkcdsl creates a sourcename that points to this
default member-specific area using a relative pathname.
In most cases, this default behavior is satisfactory. It creates
a relative link that resolves properly regardless of where the
file system is mounted.
If you specify a sourcename, mkcdsl uses this value as the
pathname to the member-specific file or directory. The sourcename
must include the member-context path component {memb}.
targetname
The pathname of the new CDSL entry to be created.
If targetname exists, the -f, -c or -a options are required. If
the resolution of the targetname traverses any symbolic links or
file system mount points, the default value of sourcename is
adjusted such that the member-specific files are placed in the
same file system to which targetname resolves.
DESCRIPTION
A context-dependent symbolic link (CDSL) is a special form of a symbolic
link, described in ln(1), whose target pathname includes a variable
({memb}). The value of {memb} is determined during pathname resolution,
making it possible to maintain member-specific configuration and data files
within the clusterwide namespace.
The mkcdsl command creates a CDSL, effectively making the specified
targetname file or directory member-specific. The command simplifies the
creation of a CDSL by automatically calculating a default sourcename, which
resolves to the default member-specific area in the file system where the
CDSL is created.
When mkcdsl creates a CDSL, it adds an inventory entry to a clusterwide
CDSL inventory file, /var/adm/cdsl_admin.inv. This entry makes it possible
for the cdslinvchk command to check CDSLs created by mkcdsl. The mkcdsl -i
option updates the inventory file to reflect the current state of the CDSL
by adding, modifying, or removing entries from the CDSL inventory file.
EXAMPLES
To create a CDSL, /usr/testfile that points to
cluster/members/{memb}/testfile:
# mkcdsl /usr/testfile
# ls -l /usr/testfile
... /usr/testfile -> cluster/members/{memb}/testfile
In the previous example, /usr/testfile must not exist. The CDSL is created
in /usr and no files are created in any member's
/usr/cluster/members/{memb} directory.
To copy the existing file or directory /usr/testfile1 to this member's
/usr/cluster/members/membern directory and replace it with a CDSL that
points to cluster/members/{memb}/testfile1:
# mkcdsl -c /usr/testfile1
Although the CDSL references all members, only this member has a copy of
the original /usr/testfile1 file.
To copy the existing file or directory /usr/testfile2 to all members'
/usr/cluster/members/{memb} directories and replace it with a CDSL that
points to cluster/members/{memb}/testfile2:
# mkcdsl -a /usr/testfile2
All members have a copy of the original /usr/testfile2 file.
To create a CDSL and explicitly specify the sourcename:
# mkcdsl /usr/share/cluster/members/{memb}/testfile3 /usr/share/doclib/testfile3
The passed source name, '/usr/share/cluster/members/{memb}/testfile3'
differs from the calculated source name: cluster/members/{memb}/testfile3
Do you want to create the CDSL using the passed source name anyway? [yes]: y
Because the specified sourcename differs from mkcdsl's calculated default
value, the command prompts for confirmation before creating the link.
To add an inventory record for an existing CDSL to the
/var/adm/cdsl_admin.inv file:
# mkcdsl -i /etc/testfile4
To remove a CDSL and then remove its entry from the /var/adm/cdsl_admin.inv
file:
# rm /etc/testfile4
# mkcdsl -i /etc/testfile4
Note that removing the CDSL and its entry does not remove any files
referenced by the CDSL.
EXIT VALUES
The exit values for mkcdsl are:
0 Success.
nonzero Failure.
FILES
/usr/sbin/mkcdsl
Specifies the command path.
/var/adm/cdsl_admin.inv
CDSL administrative inventory file. This file will not exist on
all systems.
RELATED INFORMATION
Commands: ln(1), cdslinvchk(8)
Files: local(4)
Miscellaneous: hier(5)
 |
Index for Section 8 |
|
 |
Alphabetical listing for M |
|
 |
Top of page |
|