1DPNS_ADDREPLICA(3)           DPNS  Library Functions          DP‐
2NS_ADDREPLICA(3)
3
4
5
6[1mNAME[0m
7       dpns_addreplica ‐ add a replica for a given file
8
9[1mSYNOPSIS[0m
10       [1m#include <sys/types.h>[0m
11       [1m#include "dpns_api.h"[0m
12
13       [1mint         dpns_addreplica         (const         char
14*[4m[22mguid[24m[1m,   struct   dpns_fileid[0m
15       [1m*[4m[22mfile_uniqueid[24m[1m,  const char *[4m[22mserv‐
16er[24m[1m, const char *[4m[22msfn[24m[1m, const char  [4m[22msta‐
17tus[24m[1m,[0m
18       [1mconst    char    [4m[22mf_type[24m[1m,    const    char
19*[4m[22mpoolname[24m[1m, const char *[4m[22mfs[24m[1m)[0m
20
21       [1mint         dpns_addreplicax        (const         char
22*[4m[22mguid[24m[1m,   struct   dpns_fileid[0m
23       [1m*[4m[22mfile_uniqueid[24m[1m,  const char *[4m[22mserv‐
24er[24m[1m, const char *[4m[22msfn[24m[1m, const char  [4m[22msta‐
25tus[24m[1m,[0m
26       [1mconst    char    [4m[22mf_type[24m[1m,    const    char
27*[4m[22mpoolname[24m[1m,  const  char  *[4m[22mfs[24m[1m,   const
28char[0m
29       [4mr_type[24m[1m, const char *[4m[22msetname[24m[1m)[0m
30
31[1mDESCRIPTION[0m
32       [1mdpns_addreplica  [22madds  a  replica for a given file.
33The file can be spec‐
34       ified by [4mguid[24m or by [4mfile_uniqueid[24m.  If  both
35are given, [4mfile_uniqueid[24m is
36       used.
37
38       [4mguid[24m   specifies the Grid Unique IDentifier.
39
40       [4mserver[24m  is  either the Storage Element fully quali‐
41fied  hostname  or  the
42              disk server.
43
44       [4msfn[24m    is  either  the  Site  URL  or  the   Physi‐
45cal  File Name for the
46              replica.
47
48       [4mstatus[24m can be set to
49
50              [1m‐      [22mfile is available
51
52              [1mP      [22mfile is being populated
53
54              [1mD      [22mfile is being deleted.
55
56       [4mf_type[24m may be one of the following:
57
58              [1mV      [22mVolatile
59
60              [1mD      [22mDurable
61
62              [1mP      [22mPermanent.
63
64       [4mpoolname[0m
65              specifies the disk pool name (this argument is  on‐
66ly  meaningful
67              for the Disk Pool Manager).
68
69       [4mfs[24m     specifies  the  mount  point  of  the  dedi‐
70cated filesystem (this
71              argument  is only meaningful for the Disk Pool Man‐
72ager).
73
74       [4mr_type[24m may be one of the following:
75
76              [1mP      [22mPrimary
77
78              [1mS      [22mSecondary.
79
80       [4msetname[0m
81              is either the replica set name or the space token.
82
83[1mRETURN VALUE[0m
84       This routine returns 0 if the operation was successful  or
85‐1  if  the
86       operation failed. In the latter case, [1mserrno [22mis set
87appropriately.
88
89[1mERRORS[0m
90       [1mENOENT       [22mThe named file does not exist.
91
92       [1mEACCES       [22mSearch  permission   is  denied  on  a
93component of the parent
94                    directory  or  the  effective  user  ID  does
95not  match  the
96                    owner  of  the  file  or read  permission  on
97the file entry
98                    itself is denied.
99
100       [1mEFAULT        [4m[22mguid[24m  and [4mfile_uniqueid[24m
101are NULL pointers or [4mserver[24m or  [4msfn[0m
102                    is a NULL pointer.
103
104       [1mEEXIST       [22mThe [4msfn[24m exists already.
105
106       [1mEISDIR       [22mThe file is not a regular file.
107
108       [1mEINVAL       [22mThe  length  of   [4mguid[24m  exceeds
109[1mCA_MAXGUIDLEN[22m, the length of
110                    [4mserver[24m    exceeds   [1mCA_MAXHOSTNAME‐
111LEN[22m, the length  of  [4mpoolname[0m
112                    exceeds   [1mCA_MAXPOOLNAMELEN   [22mor   the
113length of [4mfs[24m exceeds 79
114                    or [4msetname[24m exceeds 36.
115
116       [1mENAMETOOLONG   [22mThe  length  of  [4msfn[24m  exceeds
117[1mCA_MAXSFNLEN[22m.
118
119       [1mSENOSHOST    [22mHost unknown.
120
121       [1mSENOSSERV    [22mService unknown.
122
123       [1mSECOMERR     [22mCommunication error.
124
125       [1mENSNACT      [22mName server is not running or is being
126shutdown.
127
128[1mSEE ALSO[0m
129       [1mCastor_limits(4)[22m, [1mdpns_delreplica(3)[22m, [1mdp‐
130ns_listreplica(3)[0m
131
132
133
134DPNS                     $Date: 2006/12/01 09:19:37  $        DP‐
135NS_ADDREPLICA(3)
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
Impressum