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
11 #include <sys/types.h>
14 #include <sys/statfs.h>
21 #include <netinet/in.h>
24 #include <afs/voldefs.h>
27 #include <afs/vlserver.h>
30 #include <afs/cellconfig.h>
33 #include <afs/afsint.h>
34 #include <afs/volser.h>
35 #include <afs/volint.h>
36 #include "../../volser/lockdata.h"
37 #include "../../vlserver/vlclient.h"
38 #include <afs/com_err.h>
40 #include <afs/kautils.h>
43 #include <afs/afs_Admin.h>
44 #include "../adminutil/afs_AdminInternal.h"
46 #define CLOCKSKEW 2 /* not really skew, but resolution */
48 extern afs_int32 AFSVolPartitionInfo();
49 extern afs_int32 AFSVolTransCreate();
50 extern afs_int32 AFSVolEndTrans();
51 extern afs_int32 AFSVolSetInfo();
52 extern afs_int32 AFSVolDeleteVolume();
53 extern afs_int32 AFSVolNukeVolume();
54 extern afs_int32 AFSVolCreateVolume();
55 extern afs_int32 AFSVolSetFlags();
56 extern afs_int32 AFSVolReClone();
57 extern afs_int32 AFSVolClone();
58 extern afs_int32 AFSVolGetStatus();
59 extern afs_int32 AFSVolSetIdsTypes();
60 extern afs_int32 AFSVolSetDate();
61 extern afs_int32 AFSVolXListPartitions();
62 extern afs_int32 AFSVolListPartitions();
63 extern afs_int32 AFSVolListVolumes();
64 extern afs_int32 AFSVolMonitor();
65 extern afs_int32 AFSVolGetName();
66 extern afs_int32 AFSVolForward();
67 extern afs_int32 AFSVolSetForwarding();
68 extern afs_int32 AFSVolXListVolumes();
69 extern afs_int32 AFSVolXListOneVolume();
70 extern afs_int32 AFSVolForwardMultiple();
71 extern afs_int32 AFSVolListOneVolume();
72 extern afs_int32 StartAFSVolDump();
73 extern afs_int32 StartAFSVolRestore();
75 extern int ubik_Call();
76 extern int ubik_Call_New();
79 extern int UV_NukeVolume(
80 afs_cell_handle_p cellHandle,
81 struct rx_connection *server,
82 unsigned int partition,
83 unsigned int volumeId,
87 extern int UV_CreateVolume(
88 afs_cell_handle_p cellHandle,
89 struct rx_connection *server,
90 unsigned int partition,
91 const char *volumeName,
93 unsigned int *volumeId,
97 extern int UV_DeleteVolume(
98 afs_cell_handle_p cellHandle,
99 struct rx_connection *server,
100 unsigned int partition,
101 unsigned int volumeId,
105 extern int UV_MoveVolume(
106 afs_cell_handle_p cellHandle,
108 afs_int32 afromserver,
115 extern int UV_BackupVolume(
116 afs_cell_handle_p cellHandle,
123 extern int UV_ReleaseVolume(
124 afs_cell_handle_p cellHandle,
126 afs_int32 afromserver,
132 extern int UV_DumpVolume(
133 afs_cell_handle_p cellHandle,
135 afs_int32 afromserver,
138 const char *filename,
142 extern int UV_RestoreVolume(
143 afs_cell_handle_p cellHandle,
147 const char *tovolname,
149 const char *dumpFile,
153 extern int UV_AddSite(
154 afs_cell_handle_p cellHandle,
161 extern int UV_RemoveSite(
162 afs_cell_handle_p cellHandle,
169 extern int UV_ListPartitions(
170 struct rx_connection *server,
171 struct partList *ptrPartList,
176 extern int UV_XListVolumes(
177 struct rx_connection *server,
180 struct volintXInfo **a_resultPP,
181 afs_int32 *a_numEntsInResultP,
185 extern int UV_XListOneVolume(
186 struct rx_connection *server,
189 struct volintXInfo **a_resultPP,
193 extern int UV_SyncVldb(
194 afs_cell_handle_p cellHandle,
195 struct rx_connection *server,
202 extern int CheckVldb(
203 afs_cell_handle_p cellHandle,
204 struct nvldbentry *entry,
209 extern int UV_SyncServer(
210 afs_cell_handle_p cellHandle,
211 struct rx_connection *server,
218 extern int UV_VolserStatus(
219 struct rx_connection *server,
220 transDebugInfo **rpntr,
225 extern int UV_VolumeZap(
226 afs_cell_handle_p cellHandle,
227 struct rx_connection *serverHandle,
228 unsigned int partition,
229 unsigned int volumeId,
233 extern int UV_SetVolume(
234 struct rx_connection *server,
243 extern int UV_RenameVolume(
244 afs_cell_handle_p cellHandle,
245 struct nvldbentry *entry,