Driver-Taper protocol: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 39: | Line 39: | ||
|- | |- | ||
|<message>|| Error or Status message | |<message>|| Error or Status message | ||
|} | |||
==Protocol command reference== | |||
===Taper command reply=== | |||
{|border=1 | |||
!Reply!!Description | |||
|- | |||
|DONE||Full dump is on the media | |||
|- | |||
|PARTIAL||Dump was partially written to the media. PARTIAL responses also contain | |||
* TRYAGAIN - The dump should retried | |||
* NOTRYAGAIN - Should not retry (Example: If there is missing chunk in the holding disk) | |||
|- | |||
|FAILED||Nothing was written to the media | |||
|- | |||
|SAME-TAPE||This tape can be use for another dump | |||
|- | |||
|TAPE-ERROR|| No more space in the current tape | |||
|- | |||
|PORT||Reply sent in response to PORT-WRITE command | |||
|} | |||
===Driver/Taper Requests/Replies=== | |||
{|border=1 | |||
!Driver request!!Taper reply!!Description | |||
|- | |||
|START-TAPER||TAPE-OK||normal taper setup (a tape is available, nothing is written on it) | |||
|- | |||
|START-TAPER||TAPE-ERROR||failed taper setup (no tape are available or something else is broken) | |||
|- | |||
|NEW-TAPE||NEW-TAPE||The driver tell the taper to use a new tape, the taper found one | |||
|- | |||
|NEW-TAPE||NO-NEW-TAPE||The driver tell the taper to use a new tape, no tape are available | |||
|- | |||
|FILE-WRITE||DONE||normal protocol for a success | |||
|- | |||
|||SAME-TAPE||Continue using the same tape | |||
|- | |||
|FILE-WRITE||FAILED||protocol for error in setup (before something is written to tape) | |||
|- | |||
|||TRYAGAIN or NOTRYAGAIN||Information on whether the command should be retried | |||
|- | |||
|||SAMETAPE or TAPE-ERROR||Continue using the same tape for next dump or not | |||
|- | |||
|FILE-WRITE||PARTIAL or FAILED||protocol for error in data phase | |||
|- | |||
|||TRYAGAIN or NOTRYAGAIN||Information on whether the command should be retried | |||
|- | |||
|||SAMETAPE or TAPE-ERROR||Continue using the same tape for next dump or not | |||
|- | |||
|PORT-WRITE||PORT||Normal port establishment protocol and dumper status | |||
|- | |||
|DONE||DONE or PARTIAL||Dumper can send DONE reply to driver but, dumper can fail to write everything to the tape (PARTIAL) | |||
|- | |||
|||TRYAGAIN or NOTRYAGAIN|| | |||
|- | |||
|||SAME-TAPE or TAPE-ERROR|| | |||
|- | |||
|PORT-WRITE||FAILED||Protocol error in port setup | |||
|- | |||
|||TRYAGAIN or NOTRYAGAIN|| | |||
|- | |||
|||SAME-TAPE or TAPE-ERROR|| | |||
|- | |||
|PORT-WRITE||PORT||Protocol for error in data phase (dumper errors) | |||
|- | |||
|FAILED||PARTIAL or FAILED||result of the dumper | |||
|- | |||
|||TRYAGAIN or NOTRYAGAIN|| | |||
|- | |||
|||SAME-TAPE or TAPE-ERROR|| | |||
|- | |||
|<Split dump handling>||SPLIT_CONTINUE||if it's a split dump, then taper send this after each chunk is written | |||
to tape. | |||
|- | |||
|||SPLIT_NEED_NEXT||it it hit end of tape | |||
|- | |||
|NEW-TAPE||NEW-TAPE||driver tells the taper to use a new tape, taper found one | |||
|- | |||
|||NO-NEW-TAPE||driver tell the taper to use a new, no tape are available. Continues with a PARTIAL result | |||
|- | |||
|NO-NEW-TAPE||||Taper continues with PARTIAL result | |||
|- | |||
|} | |} |
Revision as of 16:45, 24 November 2005
Communication method
driver talks via two pipes connected to taper's stdin and stdout. The commands and responses are plain text.
Command sequence during backup operation
- driver initialises taper with: START-TAPER <datestamp> to which taper replies with: TAPER-OK or, for fatal errors, with: TAPER-ERROR [<message>]
- driver can ask taper to to copy a file from the holding disk to tape: FILE-WRITE <handle> <filename> <host> <disk> <level> or directly from a dumper: PORT-WRITE <handle> <host> <disk> <level> or exit at the end of the run: QUIT
- taper responds to the PORT-WRITE command with: PORT <port> which driver should then hand on to dumper in a PORT-DUMP command.
- If the copy to tape finishes correctly taper replies with: DONE <handle> [<message>]
- If something goes wrong with the tape, taper can request that the dump be retried at a later time with: TRY-AGAIN <handle> [<message>] or, for fatal errors, be abandoned with: TAPE-ERROR <handle> [<message>]
Other commands
- If driver says something that taper doesn't recognise it responds with: BAD-COMMAND <message>
- taper responds to the QUIT command with: QUITING
Protocol data
data | description |
---|---|
<datestamp> | Date as "yymmdd" |
<handle> | Request ID |
<filename> | Name of file on the holding disk where backup will be written to |
<port> | Taper port to send the backup data to |
<host> | Hostname of the client |
<disk> | Disk on the client being backed up |
<level> | Dump level being used for backup |
<message> | Error or Status message |
Protocol command reference
Taper command reply
Reply | Description |
---|---|
DONE | Full dump is on the media |
PARTIAL | Dump was partially written to the media. PARTIAL responses also contain
|
FAILED | Nothing was written to the media |
SAME-TAPE | This tape can be use for another dump |
TAPE-ERROR | No more space in the current tape |
PORT | Reply sent in response to PORT-WRITE command |
Driver/Taper Requests/Replies
Driver request | Taper reply | Description |
---|---|---|
START-TAPER | TAPE-OK | normal taper setup (a tape is available, nothing is written on it) |
START-TAPER | TAPE-ERROR | failed taper setup (no tape are available or something else is broken) |
NEW-TAPE | NEW-TAPE | The driver tell the taper to use a new tape, the taper found one |
NEW-TAPE | NO-NEW-TAPE | The driver tell the taper to use a new tape, no tape are available |
FILE-WRITE | DONE | normal protocol for a success |
SAME-TAPE | Continue using the same tape | |
FILE-WRITE | FAILED | protocol for error in setup (before something is written to tape) |
TRYAGAIN or NOTRYAGAIN | Information on whether the command should be retried | |
SAMETAPE or TAPE-ERROR | Continue using the same tape for next dump or not | |
FILE-WRITE | PARTIAL or FAILED | protocol for error in data phase |
TRYAGAIN or NOTRYAGAIN | Information on whether the command should be retried | |
SAMETAPE or TAPE-ERROR | Continue using the same tape for next dump or not | |
PORT-WRITE | PORT | Normal port establishment protocol and dumper status |
DONE | DONE or PARTIAL | Dumper can send DONE reply to driver but, dumper can fail to write everything to the tape (PARTIAL) |
TRYAGAIN or NOTRYAGAIN | ||
SAME-TAPE or TAPE-ERROR | ||
PORT-WRITE | FAILED | Protocol error in port setup |
TRYAGAIN or NOTRYAGAIN | ||
SAME-TAPE or TAPE-ERROR | ||
PORT-WRITE | PORT | Protocol for error in data phase (dumper errors) |
FAILED | PARTIAL or FAILED | result of the dumper |
TRYAGAIN or NOTRYAGAIN | ||
SAME-TAPE or TAPE-ERROR | ||
<Split dump handling> | SPLIT_CONTINUE | if it's a split dump, then taper send this after each chunk is written
to tape. |
SPLIT_NEED_NEXT | it it hit end of tape | |
NEW-TAPE | NEW-TAPE | driver tells the taper to use a new tape, taper found one |
NO-NEW-TAPE | driver tell the taper to use a new, no tape are available. Continues with a PARTIAL result | |
NO-NEW-TAPE | Taper continues with PARTIAL result |