VDSPIN(2) —
NAME
vdspin, vdspind − spin up or spin down a Remote Virtual Disk (RVD)
SYNOPSIS
#include <machineio/vdreg.h>
#include <netinet/in.h>
vdspin(drive, args, mode, server, err_p)
unsigned long drive;
struct spinargs ∗args;
unsigned long mode;
struct sockaddr_in ∗server;
unsigned long ∗err_p;
vdspind(drive)
unsigned longdrive;
DESCRIPTION
Vdspin will cause an RVD server machine to spin up a virtual disk pack. This pack must already be defined in the RVD configuration of the server machine. After being spun up, the pack is usually mounted on the client system to access its files (see mount(2) and mount(8)).
Drive is a single digit integer denoting the drive number on which to spin up the virtual disk pack. Args stores the pack name (i.e., “usr”) and the optional pack password (under the misnomer of “capability”) in the spinargs structure defined in <machineio/vdreg.h>:
struct spinargs {
charname[32];/∗ Pack Name ∗/
charcapab[32];/∗ Capability for pack in specified mode ∗/
};
Mode is a flag for the opening mode; its legal values are 1 for read-only, 2 for shared read/write, or 4 for exclusive read/write. Server is an internet socket address structure. Err_p is used to return error messages more specific than the system error messages returned (see below).
Warning: While an RVD pack may be spun up in shared mode, this mode is not supported; thus the results of shared access are undetermined (and files might be corrupted).
Vdspind will spin down a virtual disk pack spun up with vdspin. Drive is a single digit integer denoting the drive number to spin down.
Warning: Virtual disk packs should always be unmounted before using vdspind. Calling vdspind on a mounted RVD device may cause the client system to hang or crash when an attempt is made to access that device (see mount(2) and mount(8)).
RETURN VALUE
Vdspin: Upon successful completion, a value of 0 is returned. A value of -1 is returned in the event of failures caused by bad drive number, bad mode, or an attempt to spin up a virtual disk pack which is already spun up (from this client) on the server machine.
Vdspind: Upon successful completion, a value of 0 is returned. A value of -1 is returned in the event of failures caused by bad drive number or a non-existent disk pack.
ERRORS
Vdspin returns user error codes through err_p , and one catch-all system error:
[EVDBAD] The drive does not exist, the access mode is bad, or the drive is already spun up.
Vdspind returns only the following error:
[ENXIO] The disk pack does not exist or is not loaded, or the drive number is invalid.
The user error codes returned through err_p are:
[RVDEND] The drive does not exist.
[RVDEBMD] The access mode is bad.
[RVDESPN] The drive is already spun up.
SEE ALSO
down(1), up(1), spindown(8), spinup(8)
“The Remote Virtual Disk System” in Volume II, Supplementary Documents
BUGS
There are hazards associated with the access modes in vdspin and with the use of vdspind; see Warnings above.
The error codes are in a state of disarray; to be consistent with vdspin, vdspind should return the [EVDBAD] error code in the case of an invalid drive number.
PRPQs 5799-WZQ/5799-PFF: IBM/4.3 — 15 Dec 1986