2 * Copyright 2000, International Business Machines Corporation and others.
5 * This software has been released under the terms of the IBM Public
6 * License. For details, see the LICENSE file in the top-level source
7 * directory or online at http://www.openafs.org/dl/license10.html
10 #include <afs/param.h>
11 #include <afsconfig.h>
13 #include <sys/types.h>
16 #include <sys/statfs.h>
23 #include <netinet/in.h>
26 #include <afs/voldefs.h>
29 #include <afs/vlserver.h>
32 #include <afs/cellconfig.h>
35 #include <afs/afsint.h>
36 #include <afs/volser.h>
37 #include <afs/volint.h>
38 #include "../../volser/lockdata.h"
39 #include "../../vlserver/vlclient.h"
40 #include <afs/com_err.h>
42 #include <afs/kautils.h>
45 #include <afs/afs_Admin.h>
46 #include "../adminutil/afs_AdminInternal.h"
48 #define CLOCKSKEW 2 /* not really skew, but resolution */
50 extern afs_int32 AFSVolPartitionInfo();
51 extern afs_int32 AFSVolTransCreate();
52 extern afs_int32 AFSVolEndTrans();
53 extern afs_int32 AFSVolSetInfo();
54 extern afs_int32 AFSVolDeleteVolume();
55 extern afs_int32 AFSVolNukeVolume();
56 extern afs_int32 AFSVolCreateVolume();
57 extern afs_int32 AFSVolSetFlags();
58 extern afs_int32 AFSVolReClone();
59 extern afs_int32 AFSVolClone();
60 extern afs_int32 AFSVolGetStatus();
61 extern afs_int32 AFSVolSetIdsTypes();
62 extern afs_int32 AFSVolSetDate();
63 extern afs_int32 AFSVolXListPartitions();
64 extern afs_int32 AFSVolListPartitions();
65 extern afs_int32 AFSVolListVolumes();
66 extern afs_int32 AFSVolMonitor();
67 extern afs_int32 AFSVolGetName();
68 extern afs_int32 AFSVolForward();
69 extern afs_int32 AFSVolSetForwarding();
70 extern afs_int32 AFSVolXListVolumes();
71 extern afs_int32 AFSVolXListOneVolume();
72 extern afs_int32 AFSVolForwardMultiple();
73 extern afs_int32 AFSVolListOneVolume();
74 extern afs_int32 StartAFSVolDump();
75 extern afs_int32 StartAFSVolRestore();
77 extern int ubik_Call();
78 extern int ubik_Call_New();
81 extern int UV_NukeVolume(
82 afs_cell_handle_p cellHandle,
83 struct rx_connection *server,
84 unsigned int partition,
85 unsigned int volumeId,
89 extern int UV_CreateVolume(
90 afs_cell_handle_p cellHandle,
91 struct rx_connection *server,
92 unsigned int partition,
93 const char *volumeName,
95 unsigned int *volumeId,
99 extern int UV_DeleteVolume(
100 afs_cell_handle_p cellHandle,
101 struct rx_connection *server,
102 unsigned int partition,
103 unsigned int volumeId,
107 extern int UV_MoveVolume(
108 afs_cell_handle_p cellHandle,
110 afs_int32 afromserver,
117 extern int UV_BackupVolume(
118 afs_cell_handle_p cellHandle,
125 extern int UV_ReleaseVolume(
126 afs_cell_handle_p cellHandle,
128 afs_int32 afromserver,
134 extern int UV_DumpVolume(
135 afs_cell_handle_p cellHandle,
137 afs_int32 afromserver,
140 const char *filename,
144 extern int UV_RestoreVolume(
145 afs_cell_handle_p cellHandle,
149 const char *tovolname,
151 const char *dumpFile,
155 extern int UV_AddSite(
156 afs_cell_handle_p cellHandle,
163 extern int UV_RemoveSite(
164 afs_cell_handle_p cellHandle,
171 extern int UV_ListPartitions(
172 struct rx_connection *server,
173 struct partList *ptrPartList,
178 extern int UV_XListVolumes(
179 struct rx_connection *server,
182 struct volintXInfo **a_resultPP,
183 afs_int32 *a_numEntsInResultP,
187 extern int UV_XListOneVolume(
188 struct rx_connection *server,
191 struct volintXInfo **a_resultPP,
195 extern int UV_SyncVldb(
196 afs_cell_handle_p cellHandle,
197 struct rx_connection *server,
204 extern int CheckVldb(
205 afs_cell_handle_p cellHandle,
206 struct nvldbentry *entry,
211 extern int UV_SyncServer(
212 afs_cell_handle_p cellHandle,
213 struct rx_connection *server,
220 extern int UV_VolserStatus(
221 struct rx_connection *server,
222 transDebugInfo **rpntr,
227 extern int UV_VolumeZap(
228 afs_cell_handle_p cellHandle,
229 struct rx_connection *serverHandle,
230 unsigned int partition,
231 unsigned int volumeId,
235 extern int UV_SetVolume(
236 struct rx_connection *server,
245 extern int UV_RenameVolume(
246 afs_cell_handle_p cellHandle,
247 struct nvldbentry *entry,