1DPM_ADDPOOL(3) DPM Library Functions DPM_ADDPOOL(3)
2
3
4
6 dpm_addpool - define a new disk pool
7
9 #include <sys/types.h>
10 #include "dpm_api.h"
11
12 int dpm_addpool (struct dpm_pool *dpm_pool)
13
15 dpm_addpool defines a new disk pool.
16
17 dpm_pool
18 contains the pool definition.
19
20 struct dpm_pool {
21 char poolname[CA_MAXPOOLNAMELEN+1];
22 u_signed64 defsize;
23 int gc_start_thresh;
24 int gc_stop_thresh;
25 int def_lifetime;
26 int defpintime;
27 int max_lifetime;
28 int maxpintime;
29 char fss_policy[CA_MAXPOLICYLEN+1];
30 char gc_policy[CA_MAXPOLICYLEN+1];
31 char mig_policy[CA_MAXPOLICYLEN+1];
32 char rs_policy[CA_MAXPOLICYLEN+1];
33 int nbgids;
34 gid_t *gids;
35 char ret_policy;
36 char s_type;
37 u_signed64 capacity;
38 u_signed64 free;
39 int nbelem;
40 };
41
42 poolname
43 specifies the disk pool name.
44
45 defsize
46 specifies the default amount of space reserved for a file (in
47 bytes).
48
49 gc_start_thresh
50 specifies the minimum free space in the pool. If the percentage
51 of free space goes below this value, the garbage collector is
52 started. Default is 0.
53
54 gc_stop_thresh
55 specifies the percentage of free space in the pool above which
56 the garbage collector is stopped. Default is 0.
57
58 def_lifetime
59 specifies the default time a space or volatile file is kept in
60 the system (in seconds).
61
62 defpintime
63 specifies the default time a file is kept on a given disk (in
64 seconds).
65
66 max_lifetime
67 specifies the maximum time a space or volatile file is kept in
68 the system (in seconds).
69
70 maxpintime
71 specifies the maximum time a file is kept on a given disk (in
72 seconds).
73
74 nbgids is the size of the array of group ids gids.
75
76 gids The disk pool is restricted to this set of gids unless the group
77 gid is zero.
78
79 ret_policy
80 specifies the retention policy supported by the disk pool. It
81 can be R (for Replica), O (for Output) or C (for Custodial).
82
83 s_type indicates the type of space supported in the disk pool. It can
84 be V (for Volatile), D (for Durable), P (for Permanent) or - (to
85 accept any type).
86
87 This function requires ADMIN privilege.
88
90 This routine returns 0 if the operation was successful or -1 if the
91 operation failed. In the latter case, serrno is set appropriately.
92
94 EACCES The caller does not have ADMIN privilege.
95
96 EFAULT dpm_pool is a NULL pointer.
97
98 EEXIST This pool exists already.
99
100 ENOMEM Memory could not be allocated for storing the pool definiā
101 tion.
102
103 EINVAL The length of poolname exceeds CA_MAXPOOLNAMELEN.
104
105 SENOSHOST Host unknown.
106
107 SEINTERNAL Database error.
108
109 SECOMERR Communication error.
110
111
112
113LCG $Date: 2010-02-05 10:56:02 +0100 (Fri, 05 Feb 2010)D$PM_ADDPOOL(3)