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>
12 #include <sys/types.h>
15 #include <sys/statfs.h>
22 #include <netinet/in.h>
25 #include <afs/voldefs.h>
28 #include <afs/vlserver.h>
31 #include <afs/cellconfig.h>
34 #include <afs/afsint.h>
35 #include <afs/volser.h>
36 #include <afs/volint.h>
37 #include "../../volser/lockdata.h"
38 #include "../../vlserver/vlclient.h"
39 #include <afs/com_err.h>
41 #include <afs/kautils.h>
44 #include <afs/afs_Admin.h>
45 #include "../adminutil/afs_AdminInternal.h"
47 #define CLOCKSKEW 2 /* not really skew, but resolution */
49 extern afs_int32 AFSVolPartitionInfo();
50 extern afs_int32 AFSVolTransCreate();
51 extern afs_int32 AFSVolEndTrans();
52 extern afs_int32 AFSVolSetInfo();
53 extern afs_int32 AFSVolDeleteVolume();
54 extern afs_int32 AFSVolNukeVolume();
55 extern afs_int32 AFSVolCreateVolume();
56 extern afs_int32 AFSVolSetFlags();
57 extern afs_int32 AFSVolReClone();
58 extern afs_int32 AFSVolClone();
59 extern afs_int32 AFSVolGetStatus();
60 extern afs_int32 AFSVolSetIdsTypes();
61 extern afs_int32 AFSVolSetDate();
62 extern afs_int32 AFSVolXListPartitions();
63 extern afs_int32 AFSVolListPartitions();
64 extern afs_int32 AFSVolListVolumes();
65 extern afs_int32 AFSVolMonitor();
66 extern afs_int32 AFSVolGetName();
67 extern afs_int32 AFSVolForward();
68 extern afs_int32 AFSVolSetForwarding();
69 extern afs_int32 AFSVolXListVolumes();
70 extern afs_int32 AFSVolXListOneVolume();
71 extern afs_int32 AFSVolForwardMultiple();
72 extern afs_int32 AFSVolListOneVolume();
73 extern afs_int32 StartAFSVolDump();
74 extern afs_int32 StartAFSVolRestore();
76 extern int ubik_Call();
77 extern int ubik_Call_New();
80 extern int UV_NukeVolume(
81 afs_cell_handle_p cellHandle,
82 struct rx_connection *server,
83 unsigned int partition,
84 unsigned int volumeId,
88 extern int UV_CreateVolume(
89 afs_cell_handle_p cellHandle,
90 struct rx_connection *server,
91 unsigned int partition,
92 const char *volumeName,
94 unsigned int *volumeId,
98 extern int UV_DeleteVolume(
99 afs_cell_handle_p cellHandle,
100 struct rx_connection *server,
101 unsigned int partition,
102 unsigned int volumeId,
106 extern int UV_MoveVolume(
107 afs_cell_handle_p cellHandle,
109 afs_int32 afromserver,
116 extern int UV_BackupVolume(
117 afs_cell_handle_p cellHandle,
124 extern int UV_ReleaseVolume(
125 afs_cell_handle_p cellHandle,
127 afs_int32 afromserver,
133 extern int UV_DumpVolume(
134 afs_cell_handle_p cellHandle,
136 afs_int32 afromserver,
139 const char *filename,
143 extern int UV_RestoreVolume(
144 afs_cell_handle_p cellHandle,
148 const char *tovolname,
150 const char *dumpFile,
154 extern int UV_AddSite(
155 afs_cell_handle_p cellHandle,
162 extern int UV_RemoveSite(
163 afs_cell_handle_p cellHandle,
170 extern int UV_ListPartitions(
171 struct rx_connection *server,
172 struct partList *ptrPartList,
177 extern int UV_XListVolumes(
178 struct rx_connection *server,
181 struct volintXInfo **a_resultPP,
182 afs_int32 *a_numEntsInResultP,
186 extern int UV_XListOneVolume(
187 struct rx_connection *server,
190 struct volintXInfo **a_resultPP,
194 extern int UV_SyncVldb(
195 afs_cell_handle_p cellHandle,
196 struct rx_connection *server,
203 extern int CheckVldb(
204 afs_cell_handle_p cellHandle,
205 struct nvldbentry *entry,
210 extern int UV_SyncServer(
211 afs_cell_handle_p cellHandle,
212 struct rx_connection *server,
219 extern int UV_VolserStatus(
220 struct rx_connection *server,
221 transDebugInfo **rpntr,
226 extern int UV_VolumeZap(
227 afs_cell_handle_p cellHandle,
228 struct rx_connection *serverHandle,
229 unsigned int partition,
230 unsigned int volumeId,
234 extern int UV_SetVolume(
235 struct rx_connection *server,
244 extern int UV_RenameVolume(
245 afs_cell_handle_p cellHandle,
246 struct nvldbentry *entry,