<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> <!--Converted with LaTeX2HTML 2008 (1.71) original version by: Nikos Drakos, CBLU, University of Leeds * revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan * with significant contributions from: Jens Lippmann, Marek Rouchal, Martin Wilck and others --> <HTML> <HEAD> <TITLE>The Save Protocol Between the File Daemon and the Storage Daemon</TITLE> <META NAME="description" CONTENT="The Save Protocol Between the File Daemon and the Storage Daemon"> <META NAME="keywords" CONTENT="developers"> <META NAME="resource-type" CONTENT="document"> <META NAME="distribution" CONTENT="global"> <META NAME="Generator" CONTENT="LaTeX2HTML v2008"> <META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css"> <LINK REL="STYLESHEET" HREF="developers.css"> <LINK REL="previous" HREF="Protocol_Used_Between_Direc.html"> <LINK REL="up" HREF="Daemon_Protocol.html"> <LINK REL="next" HREF="Director_Services_Daemon.html"> </HEAD> <BODY > <!--Navigation Panel--> <A NAME="tex2html862" HREF="Director_Services_Daemon.html"> <IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.png"></A> <A NAME="tex2html856" HREF="Daemon_Protocol.html"> <IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up.png"></A> <A NAME="tex2html852" HREF="Protocol_Used_Between_Direc.html"> <IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="prev.png"></A> <A NAME="tex2html858" HREF="Contents.html"> <IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" SRC="contents.png"></A> <A NAME="tex2html860" HREF="GNU_Free_Documentation_Lice.html"> <IMG WIDTH="43" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="index" SRC="index.png"></A> <BR> <B> Next:</B> <A NAME="tex2html863" HREF="Director_Services_Daemon.html">Director Services Daemon</A> <B> Up:</B> <A NAME="tex2html857" HREF="Daemon_Protocol.html">Daemon Protocol</A> <B> Previous:</B> <A NAME="tex2html853" HREF="Protocol_Used_Between_Direc.html">The Protocol Used Between</A> <B> <A NAME="tex2html859" HREF="Contents.html">Contents</A></B> <B> <A NAME="tex2html861" HREF="GNU_Free_Documentation_Lice.html">Index</A></B> <BR> <BR> <!--End of Navigation Panel--> <!--Table of Child-Links--> <A NAME="CHILD_LINKS"><STRONG>Subsections</STRONG></A> <UL> <LI><A NAME="tex2html864" HREF="Save_Protocol_Between_File.html#SECTION00661000000000000000">Command and Control Information</A> <LI><A NAME="tex2html865" HREF="Save_Protocol_Between_File.html#SECTION00662000000000000000">Data Information</A> </UL> <!--End of Table of Child-Links--> <HR> <H1><A NAME="SECTION00660000000000000000"></A> <A NAME="1872"></A> <A NAME="1873"></A> <BR> The Save Protocol Between the File Daemon and the Storage Daemon </H1> <P> Once the Director has send a <B>save</B> command to the File daemon, the File daemon will contact the Storage daemon to begin the save. <P> In what follows: FD: refers to information set via the network from the File daemon to the Storage daemon, and SD: refers to information set from the Storage daemon to the File daemon. <P> <H2><A NAME="SECTION00661000000000000000"></A> <A NAME="1879"></A> <A NAME="1880"></A> <BR> Command and Control Information </H2> <P> Command and control information is exchanged in human readable ASCII commands. <P> <PRE> FD: listens SD: makes connection FD: append open session = <JobId> [<password>] SD: 3000 OK ticket = <number> FD: append data <ticket-number> SD: 3000 OK data address = <IPaddress> port = <port> </PRE> <P> <H2><A NAME="SECTION00662000000000000000"></A> <A NAME="1887"></A> <A NAME="1888"></A> <BR> Data Information </H2> <P> The Data information consists of the file attributes and data to the Storage daemon. For the most part, the data information is sent one way: from the File daemon to the Storage daemon. This allows the File daemon to transfer information as fast as possible without a lot of handshaking and network overhead. <P> However, from time to time, the File daemon needs to do a sort of checkpoint of the situation to ensure that everything is going well with the Storage daemon. To do so, the File daemon sends a packet with a negative length indicating that he wishes the Storage daemon to respond by sending a packet of information to the File daemon. The File daemon then waits to receive a packet from the Storage daemon before continuing. <P> All data sent are in binary format except for the header packet, which is in ASCII. There are two packet types used data transfer mode: a header packet, the contents of which are known to the Storage daemon, and a data packet, the contents of which are never examined by the Storage daemon. <P> The first data packet to the Storage daemon will be an ASCII header packet consisting of the following data. <P> File-Index Stream-Id Info where <B>File-Index</B> is a sequential number beginning from one that increments with each file (or directory) sent. <P> where <B>Stream-Id</B> will be 1 for the Attributes record and 2 for uncompressed File data. 3 is reserved for the MD5 signature for the file. <P> where <B>Info</B> transmit information about the Stream to the Storage Daemon. It is a character string field where each character has a meaning. The only character currently defined is 0 (zero), which is simply a place holder (a no op). In the future, there may be codes indicating compressed data, encrypted data, etc. <P> Immediately following the header packet, the Storage daemon will expect any number of data packets. The series of data packets is terminated by a zero length packet, which indicates to the Storage daemon that the next packet will be another header packet. As previously mentioned, a negative length packet is a request for the Storage daemon to temporarily enter command mode and send a reply to the File daemon. Thus an actual conversation might contain the following exchanges: <P> <PRE> FD: <1 1 0> (header packet) FD: <data packet containing file-attributes> FD: Null packet FD: <1 2 0> FD: <multiple data packets containing the file data> FD: Packet length = -1 SD: 3000 OK FD: <2 1 0> FD: <data packet containing file-attributes> FD: Null packet FD: <2 2 0> FD: <multiple data packets containing the file data> FD: Null packet FD: Null packet FD: append end session <ticket-number> SD: 3000 OK end FD: append close session <ticket-number> SD: 3000 OK Volumes = <number of volumes> SD: 3001 Volume = <volumeid> <start file> <start block> <end file> <end block> <volume session-id> SD: 3002 Volume data = <date/time of last write> <Number bytes written> <number errors> SD: ... additional Volume / Volume data pairs for volumes 2 .. n FD: close socket </PRE> <P> The information returned to the File daemon by the Storage daemon in response to the <B>append close session</B> is transmit in turn to the Director. <P> <HR> <!--Navigation Panel--> <A NAME="tex2html862" HREF="Director_Services_Daemon.html"> <IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.png"></A> <A NAME="tex2html856" HREF="Daemon_Protocol.html"> <IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up.png"></A> <A NAME="tex2html852" HREF="Protocol_Used_Between_Direc.html"> <IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="prev.png"></A> <A NAME="tex2html858" HREF="Contents.html"> <IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" SRC="contents.png"></A> <A NAME="tex2html860" HREF="GNU_Free_Documentation_Lice.html"> <IMG WIDTH="43" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="index" SRC="index.png"></A> <BR> <B> Next:</B> <A NAME="tex2html863" HREF="Director_Services_Daemon.html">Director Services Daemon</A> <B> Up:</B> <A NAME="tex2html857" HREF="Daemon_Protocol.html">Daemon Protocol</A> <B> Previous:</B> <A NAME="tex2html853" HREF="Protocol_Used_Between_Direc.html">The Protocol Used Between</A> <B> <A NAME="tex2html859" HREF="Contents.html">Contents</A></B> <B> <A NAME="tex2html861" HREF="GNU_Free_Documentation_Lice.html">Index</A></B> <!--End of Navigation Panel--> <ADDRESS> 2010-06-14 </ADDRESS> </BODY> </HTML>