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>
29 #include <afs/cellconfig.h>
32 #include <afs/afsint.h>
33 #include <afs/volser.h>
34 #include <afs/volint.h>
35 #include "../../volser/lockdata.h"
36 #include "../../vlserver/vlclient.h"
37 #include <afs/com_err.h>
39 #include <afs/kautils.h>
42 #include <afs/afs_Admin.h>
43 #include "../adminutil/afs_AdminInternal.h"
45 #define CLOCKSKEW 2 /* not really skew, but resolution */
47 extern int ubik_Call();
48 extern int ubik_Call_New();
51 extern int UV_NukeVolume(afs_cell_handle_p cellHandle,
52 struct rx_connection *server, unsigned int partition,
53 afs_uint32 volumeId, afs_status_p st);
55 extern int UV_CreateVolume(afs_cell_handle_p cellHandle,
56 struct rx_connection *server,
57 unsigned int partition, const char *volumeName,
58 unsigned int quota, afs_uint32 *volumeId,
61 extern int UV_DeleteVolume(afs_cell_handle_p cellHandle,
62 struct rx_connection *server,
63 unsigned int partition, afs_uint32 volumeId,
66 extern int UV_MoveVolume(afs_cell_handle_p cellHandle, afs_uint32 afromvol,
67 afs_int32 afromserver, afs_int32 afrompart,
68 afs_int32 atoserver, afs_int32 atopart,
71 extern int UV_BackupVolume(afs_cell_handle_p cellHandle, afs_int32 aserver,
72 afs_int32 apart, afs_uint32 avolid,
75 extern int UV_ReleaseVolume(afs_cell_handle_p cellHandle, afs_uint32 afromvol,
76 afs_int32 afromserver, afs_int32 afrompart,
77 int forceflag, afs_status_p st);
79 extern int UV_DumpVolume(afs_cell_handle_p cellHandle, afs_uint32 afromvol,
80 afs_int32 afromserver, afs_int32 afrompart,
81 afs_int32 fromdate, const char *filename,
84 extern int UV_RestoreVolume(afs_cell_handle_p cellHandle, afs_int32 toserver,
85 afs_int32 topart, afs_uint32 tovolid,
86 const char *tovolname, int flags,
87 const char *dumpFile, afs_status_p st);
89 extern int UV_AddSite(afs_cell_handle_p cellHandle, afs_int32 server,
90 afs_int32 part, afs_uint32 volid, afs_status_p st);
92 extern int UV_RemoveSite(afs_cell_handle_p cellHandle, afs_int32 server,
93 afs_int32 part, afs_uint32 volid, afs_status_p st);
95 extern int UV_ListPartitions(struct rx_connection *server,
96 struct partList *ptrPartList, afs_int32 * cntp,
99 extern int UV_XListVolumes(struct rx_connection *server, afs_int32 a_partID,
100 int a_all, struct volintXInfo **a_resultPP,
101 afs_int32 * a_numEntsInResultP, afs_status_p st);
103 extern int UV_XListOneVolume(struct rx_connection *server, afs_int32 a_partID,
105 struct volintXInfo **a_resultPP,
108 extern int UV_ListOneVolume(struct rx_connection *server, afs_int32 a_partID,
109 afs_uint32 a_volID, struct volintInfo **a_resultPP,
112 extern int UV_SyncVldb(afs_cell_handle_p cellHandle,
113 struct rx_connection *server, afs_int32 apart,
114 int flags, int force, afs_status_p st);
116 extern int CheckVldb(afs_cell_handle_p cellHandle, struct nvldbentry *entry,
117 afs_int32 * modified, afs_status_p st);
119 extern int UV_SyncServer(afs_cell_handle_p cellHandle,
120 struct rx_connection *server, afs_int32 apart,
121 int flags, afs_status_p st);
124 extern int UV_VolserStatus(struct rx_connection *server,
125 transDebugInfo ** rpntr, afs_int32 * rcount,
128 extern int UV_VolumeZap(afs_cell_handle_p cellHandle,
129 struct rx_connection *serverHandle,
130 unsigned int partition, afs_uint32 volumeId,
133 extern int UV_SetVolume(struct rx_connection *server, afs_int32 partition,
134 afs_uint32 volid, afs_int32 transflag,
135 afs_int32 setflag, unsigned int sleep,
138 extern int UV_RenameVolume(afs_cell_handle_p cellHandle,
139 struct nvldbentry *entry, const char *newname,