1DPNS_ADDREPLICA(3) DPNS Library Functions DPNS_ADDREPLICA(3)
2
3
4
6 dpns_addreplica - add a replica for a given file
7
9 #include <sys/types.h>
10 #include "dpns_api.h"
11
12 int dpns_addreplica (const char *guid, struct dpns_fileid
13 *file_uniqueid, const char *server, const char *sfn, const char status,
14 const char f_type, const char *poolname, const char *fs)
15
16 int dpns_addreplicax (const char *guid, struct dpns_fileid
17 *file_uniqueid, const char *server, const char *sfn, const char status,
18 const char f_type, const char *poolname, const char *fs, const char
19 r_type, const char *setname)
20
22 dpns_addreplica adds a replica for a given file. The file can be spec‐
23 ified by guid or by file_uniqueid. If both are given, file_uniqueid is
24 used.
25
26 guid specifies the Grid Unique IDentifier.
27
28 server is either the Storage Element fully qualified hostname or the
29 disk server.
30
31 sfn is either the Site URL or the Physical File Name for the
32 replica.
33
34 status can be set to
35
36 - file is available
37
38 P file is being populated
39
40 D file is being deleted.
41
42 f_type may be one of the following:
43
44 V Volatile
45
46 D Durable
47
48 P Permanent.
49
50 poolname
51 specifies the disk pool name (this argument is only meaningful
52 for the Disk Pool Manager).
53
54 fs specifies the mount point of the dedicated filesystem (this
55 argument is only meaningful for the Disk Pool Manager).
56
57 r_type may be one of the following:
58
59 P Primary
60
61 S Secondary.
62
63 setname
64 is either the replica set name or the space token.
65
67 This routine returns 0 if the operation was successful or -1 if the
68 operation failed. In the latter case, serrno is set appropriately.
69
71 ENOENT The named file does not exist.
72
73 EACCES Search permission is denied on a component of the parent
74 directory or the effective user ID does not match the
75 owner of the file or read permission on the file entry
76 itself is denied.
77
78 EFAULT guid and file_uniqueid are NULL pointers or server or sfn
79 is a NULL pointer.
80
81 EEXIST The sfn exists already.
82
83 EISDIR The file is not a regular file.
84
85 EINVAL The length of guid exceeds CA_MAXGUIDLEN, the length of
86 server exceeds CA_MAXHOSTNAMELEN, the length of poolname
87 exceeds CA_MAXPOOLNAMELEN or the length of fs exceeds 79
88 or setname exceeds 36.
89
90 ENAMETOOLONG The length of sfn exceeds CA_MAXSFNLEN.
91
92 SENOSHOST Host unknown.
93
94 SENOSSERV Service unknown.
95
96 SECOMERR Communication error.
97
98 ENSNACT Name server is not running or is being shutdown.
99
101 Castor_limits(4), dpns_delreplica(3), dpns_listreplica(3)
102
103
104
105DPNS $Date: 2006/12/01 09:19:37 $ DPNS_ADDREPLICA(3)