1LFC_ADDREPLICA(3)                 LFC      Library      Functions
2LFC_ADDREPLICA(3)
3
4
5
6[1mNAME[0m
7       lfc_addreplica ‐ add a replica for a given file
8
9[1mSYNOPSIS[0m
10       [1m#include <sys/types.h>[0m
11       [1m#include "lfc_api.h"[0m
12
13       [1mint  lfc_addreplica  (const  char  *[4m[22mguid[24m[1m,
14struct lfc_fileid *[4m[22mfile_uniqueid[24m[1m,[0m
15       [1mconst    char    *[4m[22mserver[24m[1m,    const   char
16*[4m[22msfn[24m[1m,  const   char   [4m[22mstatus[24m[1m,   const
17char[0m
18       [4mf_type[24m[1m, const char *[4m[22mpoolname[24m[1m, con‐
19st char *[4m[22mfs[24m[1m)[0m
20
21       [1mint         lfc_addreplicax         (const         char
22*[4m[22mguid[24m[1m,   struct   lfc_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       [1mlfc_addreplica  [22madds  a  replica  for a given file.
33The file can be speci‐
34       fied  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,         [1mlfc_delreplica(3)[22m,
130[1mlfc_listreplica(3)[0m
131
132
133
134LFC                         $Date:    2006/12/01    09:19:37    $
135LFC_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