rmc_unmnt.man 1.83 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
.\" Copyright (C) 2002 by CERN/IT/PDP/DM
.\" All rights reserved
.\"
.TH RMC_UNMNT 3 "$Date: 2013/11/18 16:21:00 $" CASTOR "rmc Library Functions"
.SH NAME
rmc_unmnt \- send a request to the Remote Media Changer daemon to have a volume unmounted
.SH SYNOPSIS
.B #include <sys/types.h>
.br
\fB#include "rmc_api.h"\fR
.sp
12
int \fBrmc_unmnt\f[](const char *const \fIvid\f[], const char *const \fIdrive\f[]);
13
14
.SH DESCRIPTION
.B rmc_unmnt
15
asks the Remote media-changer daemon (rmcd) to unmount the volume
16
17
.I vid
from the drive specified by
18
.IR drive .
19
20
21
22
23
.TP
.I vid
is the volume visual identifier.
It must be at most six characters long.
.TP
24
.I drive
25
specifies the drive in one of the following three forms corresponding to the three supported drive-loader types, namely acs, manual and smc:
26
27
.RS
.TP
28
acs@rmc_host,ACS_NUMBER,LSM_NUMBER,PANEL_NUMBER,TRANSPORT_NUMBER
29
30
31
.TP
manual
.TP
32
smc@rmc_host,drive_ordinal
33
34
35
36
37
.RE

.LP
This function requires TP_SYSTEM privilege in the Cupv database.
.SH RETURN VALUE
38
39
40
This routine returns 0 if a unmount operation was successful, 1 if the unmount
is manual and therefore the system is now waiting for an operator to perform the
unmount, or -1 if the operation failed. In the latter case,
41
42
43
44
.B serrno
is set appropriately.
.SH ERRORS
.TP 1.2i
45
46
47
.B EINVAL
If either \fIvid\f[] or \fIdrive\f[] are passed a NULL pointer.
.TP
48
49
50
51
.B SECOMERR
Communication error.
.TP
.B ERMCUNREC
52
Unknown host or invalid drive or vid too long or requester does not have
53
54
55
56
57
58
59
TP_SYSTEM privilege in the Cupv database.
.TP
.B ERMCFASTR
Unit attention.
.TP
.B ERMCOMSGR
Hardware error or Medium Removal Prevented.
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
.TP
.B ERMCUKNLDRTYPE
Unknown drive-loader type.
.TP
.B ERMCVIDTOOLONG
VID is too long.
.TP
.B ERMCPARSERMCHOST
Failed to parse RMC host.
.TP
.B ERMCPARSEACSDRV
Failed to parse ACS drive id.
.TP
.B SEINTERNAL
Internal error
75
76
.SH AUTHOR
\fBCASTOR\fP Team <castor.support@cern.ch>