1dmd(7D)                             Devices                            dmd(7D)
2
3
4

NAME

6       dmd - Driver for MMS drive managers
7

SYNOPSIS

9       /devices/pseudo/dmd@0:watcher
10
11
12       /devices/pseudo/dmd@0:ndrm
13
14
15       /devices/pseudo/dmd@0:stat
16
17

DESCRIPTION

19       The Media Management System (MMS) is a distributed removable media man‐
20       agement system based on the IEEE 1244 Media Management System  specifi‐
21       cation.  MMS  provides  a  uniform, consistent tape interface to client
22       applications.
23
24
25       Drives managed by MMS have a drive manager on each host that  processes
26       tapes  and  accesses  the drive. The drive manager provides device-spe‐
27       cific operations and label processing. (Note: only ANSI labels are cur‐
28       rently  supported.)  The  handle  returned by the MMS MMP mount command
29       belongs to the drive manager driver (dmd). When dmd receives an open or
30       close  system  call,  it passes it to the drive manager for processing.
31       The drive manager then validates the file according to the file  dispo‐
32       sition  flags.  Note  that only O_RDONLY, O_WRONLY and O_RDWR flags are
33       used in validation. If O_APPEND is specified, the drive  manager  posi‐
34       tions  the  file as if append is specified in the mount command and the
35       record format and blocksize are set.
36

IOCTLS

38       The Device Manager driver supports the MTIOCTOP, MTREW, MTRETEN, MTFSF,
39       MTFSR,  MTBSF, MTBSR, MTWEOF, MTEOM, MTSRSZ, MTGRSZ, MTIOCGET and MTIO‐
40       CLRERR driver ioctls. In addition, MMS provides the ioctls shown  below
41       for  the  device  manager driver. (Note that MMS_LOCATE is supported in
42       both mms and raw modes and MMS_LOCATE is supported only in mms mode).
43
44         MMS_BLK_LIMIT - returns the block limit of a drive.
45                         arg:
46
47                 typedef struct  mms_blk_limit {
48                         uint64_t        mms_max;        /* Max blocksize */
49                         uint32_t        mms_min;        /* Min blocksize */
50                         uint32_t        mms_gran;       /* granularity */
51                 }       mms_blk_limit_t;
52
53           MMS_GET_POS - gets the current position.
54                         arg:
55
56                 typedef struct  mms_pos {
57                         uint32_t        mms_type;       /* LBN or non LBN) */
58                         uint64_t        mms_pos;
59                 }       mms_pos_t;
60
61                 /* Value of mms_pos_type */
62                 #define MMS_LBYTEN              1       /* logical byte */
63                 #define MMS_LBLKN               2       /* logical block */
64
65           MMS_LOCATE -  locate to a specific location.
66                         arg: arg must be a mms_pos_t obtained from a
67                         previous MMS_GET_POS.
68
69           MMS_GET_CAPACITY - returns the tape's capacity.
70                               arg:
71                 typedef struct mms_capacity {
72                         /*
73                          * Capacity is in megabytes (1048576)
74                          */
75                         uint64_t        mms_max;        /* cartridge capacity */
76                         uint64_t        mms_avail;      /* amount available */
77                                                                 /* from EOD */
78                         uint32_t        mms_pc_avail;   /* percent available */
79                 }       mms_capacity_t;
80
81           MMS_SET_DENSITY - sets the tape's density.
82                             arg:
83                 typedef struct  mms_density {
84                         uint32_t        mms_den;
85                 }       mms_density_t;
86
87           MMS_GET_DENSITY - gets the current tape density.
88                             arg:
89                 typedef struct  mms_density {
90                         uint32_t        mms_den;
91                 }       mms_density_t;
92
93           MMS_INQUIRY - gets inquiry data of drive.
94                         arg:
95                 typedef struct  mms_inquiry     {
96                         uchar_t         mms_inq[64];
97                 }       mms_inquiry_t;
98
99
100         Status of dmd
101
102         MMS uses the MTIOCGET ioctl to report status.
103         The status code in mt_dsreg is defined as follows:
104
105                 /usr/include/sys/scsi/generic/status.h
106
107                 #define STATUS_MASK                     0x3E
108                 #define STATUS_GOOD                     0x00
109                 #define STATUS_CHECK                    0x02
110                 #define STATUS_MET                      0x04
111                 #define STATUS_BUSY                     0x08
112                 #define STATUS_INTERMEDIATE             0x10
113                 #define STATUS_SCSI2                    0x20
114                 #define STATUS_INTERMEDIATE_MET         0x14
115                 #define STATUS_RESERVATION_CONFLICT     0x18
116                 #define STATUS_TERMINATED               0x22
117                 #define STATUS_QFULL                    0x28
118                 #define STATUS_ACA_ACTIVE               0x30
119
120         The error code in mt_erreg are defined
121         as follows:
122
123                 /usr/include/sys/scsi/generic/sense.h
124
125                 /*
126                  * Sense Key values for Extended Sense.
127                  */
128
129                 #define KEY_NO_SENSE            0x00
130                 #define KEY_RECOVERABLE_ERROR   0x01
131                 #define KEY_NOT_READY           0x02
132                 #define KEY_MEDIUM_ERROR        0x03
133                 #define KEY_HARDWARE_ERROR      0x04
134                 #define KEY_ILLEGAL_REQUEST     0x05
135                 #define KEY_UNIT_ATTENTION      0x06
136                 #define KEY_WRITE_PROTECT       0x07
137                 #define KEY_DATA_PROTECT        KEY_WRITE_PROTECT
138                 #define KEY_BLANK_CHECK         0x08
139                 #define KEY_VENDOR_UNIQUE       0x09
140                 #define KEY_COPY_ABORTED        0x0A
141                 #define KEY_ABORTED_COMMAND     0x0B
142                 #define KEY_EQUAL               0x0C
143                 #define KEY_VOLUME_OVERFLOW     0x0D
144                 #define KEY_MISCOMPARE          0x0E
145                 #define KEY_RESERVED            0x0F
146
147
148          /usr/include/sys/scsi/impl/sense.h:
149                 /* Status returned by driver */
150                 #define SUN_KEY_FATAL           0x10    /* handshake failure */
151                 #define SUN_KEY_TIMEOUT         0x11    /* command timeout */
152                 #define SUN_KEY_EOF             0x12    /* eof hit */
153                 #define SUN_KEY_EOT             0x13    /* eot hit */
154                 #define SUN_KEY_LENGTH          0x14    /* length error */
155                 #define SUN_KEY_BOT             0x15    /* bot hit */
156                 #define SUN_KEY_WRONGMEDIA      0x16    /* wrong tape media */
157                 #define NUM_IMPL_SENSE_KEYS     7       /* seven extra keys */
158
159
160         In MMS mode, the following values may be in mt_erreg when using
161         mms mode. They are defined in mms.h
162
163                 #define MMS_KEY_BOF     0xe0    /* beginning of file. */
164                 #define MMS_KEY_EOF     0xe1    /* end of file. */
165
166

FILES

168       /kernel/drv/dmd            32-bit kernel module (x86)
169
170
171       /kernel/drv/sparcv9/dmd    64-bit kernel module (SPARC)
172
173
174       /kernel/drv/amd64/dmd      64-bit kernel module (x86)
175
176
177       /kernel/drv/dmd.conf       Configuration file
178
179

ATTRIBUTES

181       See attributes(5) for a description of the following attributes:
182
183
184
185
186       ┌────────────────────┬─────────────────────────────────────────────────────────┐
187       │  ATTRIBUTE TYPE    │                     ATTRIBUTE VALUE                     │
188       ├────────────────────┼─────────────────────────────────────────────────────────┤
189       │Architecture        │ SPARC, x86                                              │
190       ├────────────────────┼─────────────────────────────────────────────────────────┤
191       │Availability        │ SUNWmmsr                                                │
192       ├────────────────────┼─────────────────────────────────────────────────────────┤
193       │Interface Stability │ Uncommitted                                             │
194       └────────────────────┴─────────────────────────────────────────────────────────┘
195

SEE ALSO

197       mt(1), mmsadm(1M), attributes(5), dda(7D), st(7D), mtio(7I)
198
199
200       IEEE 1244 Removable Media Standards Specification — IEEE, 2000
201
202
203
204SunOS 5.11                        17 Nov 2008                          dmd(7D)
Impressum