Devices dmd(7D)
NAME
dmd - Driver for MS drive managers
SYNOPSIS
/devices/pseudo/dmd@0:watcher
/devices/pseudo/dmd@0:ndrm
/devices/pseudo/dmd@0:stat
DESCRIPTION
The Media Management System (MS) is a distributed removable
media management system based on the IE 1244 Media Manage-
ment System specification. MS provides a uniform, con-
sistent tape interface to client applications.
Drives managed by MS have a drive manager on each host that
processes tapes and accesses the drive. The drive manager
provides device-specific operations and label processing.
(Note: only ANSI labels are currently supported.) The handle
returned by the MS MP mount command belongs to the drive
manager driver (dmd). When dmd receives an open or close
system call, it passes it to the drive manager for process-
ing. The drive manager then validates the file according to
the file disposition flags. Note that only ORDONLY,
OWRONLY and ORDWR flags are used in validation. If
OAPEND is specified, the drive manager positions the file
as if append is specified in the mount command and the
record format and blocksize are set.
IOCTLS
The Device Manager driver supports the MTIOCTOP, MTREW,
MTRETEN, MTFSF, MTFSR, MTBSF, MTBSR, MTWEOF, MTEOM, MTSRSZ,
MTGRSZ, MTIOCGET and MTIOCLRER driver ioctls. In addition,
MS provides the ioctls shown below for the device manager
driver. (Note that MSLOCATE is supported in both mms and
raw modes and MSLOCATE is supported only in mms mode).
MSBLKLIMIT - returns the block limit of a drive.
arg:
typedef struct mmsblklimit {
uint64t mmsmax; /* Max blocksize */
uint32t mmsmin; /* Min blocksize */
uint32t mmsgran; /* granularity */
} mmsblklimitt;
MSGETPOS - gets the current position.
SunOS 5.11 Last change: 17 Nov 2008 1
Devices dmd(7D)
arg:
typedef struct mmspos {
uint32t mmstype; /* LBN or non LBN) */
uint64t mmspos;
} mmspost;
/* Value of mmspostype */
#define MSLBYTEN 1 /* logical byte */
#define MSLBLKN 2 /* logical block */
MSLOCATE - locate to a specific location.
arg: arg must be a mmspost obtained from a
previous MSGETPOS.
MSGETCAPACITY - returns the tape's capacity.
arg:
typedef struct mmscapacity {
/*
* Capacity is in megabytes (1048576)
*/
uint64t mmsmax; /* cartridge capacity */
uint64t mmsavail; /* amount available */
/* from EOD */
uint32t mmspcavail; /* percent available */
} mmscapacityt;
MSETDENSITY - sets the tape's density.
arg:
typedef struct mmsdensity {
uint32t mmsden;
} mmsdensityt;
MSGETDENSITY - gets the current tape density.
arg:
typedef struct mmsdensity {
uint32t mmsden;
} mmsdensityt;
MSINQUIRY - gets inquiry data of drive.
arg:
typedef struct mmsinquiry {
uchart mmsinq[64];
} mmsinquiryt;
Status of dmd
MS uses the MTIOCGET ioctl to report status.
The status code in mtdsreg is defined as follows:
/usr/include/sys/scsi/generic/status.h
SunOS 5.11 Last change: 17 Nov 2008 2
Devices dmd(7D)
#define STATUSMASK 0x3E
#define STATUSGOD 0x00
#define STATUSCHECK 0x02
#define STATUSMET 0x04
#define STATUSBUSY 0x08
#define STATUSINTERMEDIATE 0x10
#define STATUSCSI2 0x20
#define STATUSINTERMEDIATEMET 0x14
#define STATUSRESERVATIONCONFLICT 0x18
#define STATUSTERMINATED 0x22
#define STATUSQFUL 0x28
#define STATUSACACTIVE 0x30
The error code in mterreg are defined
as follows:
/usr/include/sys/scsi/generic/sense.h
/*
* Sense Key values for Extended Sense.
*/
#define KEYNOSENSE 0x00
#define KEYRECOVERABLEROR 0x01
#define KEYNOTREADY 0x02
#define KEYMEDIUMEROR 0x03
#define KEYHARDWAREROR 0x04
#define KEYILEGALREQUEST 0x05
#define KEYUNITATENTION 0x06
#define KEYWRITEPROTECT 0x07
#define KEYDATAPROTECT KEYWRITEPROTECT
#define KEYBLANKCHECK 0x08
#define KEYVENDORUNIQUE 0x09
#define KEYCOPYABORTED 0x0A
#define KEYABORTEDCOMAND 0x0B
#define KEYEQUAL 0x0C
#define KEYVOLUMEOVERFLOW 0x0D
#define KEYMISCOMPARE 0x0E
#define KEYRESERVED 0x0F
/usr/include/sys/scsi/impl/sense.h:
/* Status returned by driver */
#define SUNKEYFATAL 0x10 /* handshake failure */
#define SUNKEYTIMEOUT 0x11 /* command timeout */
#define SUNKEYEOF 0x12 /* eof hit */
#define SUNKEYEOT 0x13 /* eot hit */
#define SUNKEYLENGTH 0x14 /* length error */
#define SUNKEYBOT 0x15 /* bot hit */
#define SUNKEYWRONGMEDIA 0x16 /* wrong tape media */
#define NUMIMPLSENSEKEYS 7 /* seven extra keys */
SunOS 5.11 Last change: 17 Nov 2008 3
Devices dmd(7D)
In MS mode, the following values may be in mterreg when using
mms mode. They are defined in mms.h
#define MSKEYBOF 0xe0 /* beginning of file. */
#define MSKEYEOF 0xe1 /* end of file. */
FILES
/kernel/drv/dmd 32-bit kernel module (x86)
/kernel/drv/sparcv9/dmd 64-bit kernel module (SPARC)
/kernel/drv/amd64/dmd 64-bit kernel module (x86)
/kernel/drv/dmd.conf Configuration file
ATRIBUTES
See attributes(5) for a description of the following attri-
butes:
ATRIBUTE TYPE ATRIBUTE VALUE
Architecture SPARC, x86
Availability SUNWmmsr
Interface Stability Uncommitted
SEE ALSO
mt(1), mmsadm(1M), attributes(5), dda(7D), st(7D), mtio(7I)
IE 1244 Removable Media Standards Specification - IE,
2000
SunOS 5.11 Last change: 17 Nov 2008 4
|