JP2000311470A - Magnetic tape device - Google Patents

Magnetic tape device

Info

Publication number
JP2000311470A
JP2000311470A JP11119548A JP11954899A JP2000311470A JP 2000311470 A JP2000311470 A JP 2000311470A JP 11119548 A JP11119548 A JP 11119548A JP 11954899 A JP11954899 A JP 11954899A JP 2000311470 A JP2000311470 A JP 2000311470A
Authority
JP
Japan
Prior art keywords
data
block data
buffer
magnetic tape
block
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP11119548A
Other languages
Japanese (ja)
Other versions
JP3451978B2 (en
Inventor
Tadashi Hanagata
匡 花形
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
NEC Corp
Original Assignee
NEC Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by NEC Corp filed Critical NEC Corp
Priority to JP11954899A priority Critical patent/JP3451978B2/en
Publication of JP2000311470A publication Critical patent/JP2000311470A/en
Application granted granted Critical
Publication of JP3451978B2 publication Critical patent/JP3451978B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Management Or Editing Of Information On Record Carriers (AREA)

Abstract

PROBLEM TO BE SOLVED: To enable the restoration processing of original data without affecting a host device when erroneous overwriting is performed by controlling a buffer so that data already written is read out to a buffer before writing. SOLUTION: When continuity exists in a block number between lookahead data left in a buffer 3 and a first block normally read, as interpolation can be performed by loockahead data in the buffer 3, the lookahead data in the buffer 3 is held as it is, a record signal of a magnetic tape 13 before a block X is reproduced and the reproduced data is written in the buffer 3. When the last end of data is reproduced before the buffer 3 is filled with reproduced data, the magnetic tape 13 is positioned so that data can be written from the head of data of a block received first out of write-in data, lookahead data in the buffer 3 is read out, and restoration is performed by starting recording from the position already positioned as mentioned above.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明は磁気テープ装置に係
り、特に情報データを磁気テープに記録する磁気テープ
装置に関する。
The present invention relates to a magnetic tape device, and more particularly to a magnetic tape device for recording information data on a magnetic tape.

【0002】[0002]

【従来の技術】上位装置から読み出し指示命令を受けた
ときは、磁気テープに記録されているデータを再生ヘッ
ドにより磁気テープから読み出して上位装置へ転送し、
また上位装置から磁気テープ装置にデータ書き込み命令
を受領した時は、入力されたデータを記録ヘッドにより
磁気テープに書き込む磁気テープ装置が知られている。
2. Description of the Related Art When a read command is received from a host device, data recorded on the magnetic tape is read from the magnetic tape by a reproducing head and transferred to the host device.
Also, a magnetic tape device is known in which when a data write command is received from a host device to a magnetic tape device, input data is written on a magnetic tape by a recording head.

【0003】[0003]

【発明が解決しようとする課題】しかるに、上記の磁気
テープ装置では、磁気テープに既に必要な情報が記録し
てある部分に別のデータを誤って上書きした場合は、上
書き前の必要な情報を復元できないという問題がある。
ハードディスク装置などのランダムアクセスが可能な装
置では、新たにデータを記録するときは、未使用領域か
消去された領域のうち一番古い領域に書き込むことによ
り、直前に消去された情報は復元できるようになってい
る。しかし、磁気テープ装置のようなシーケンシャルア
クセスの装置では、そのような方法が使えず、上書き前
の必要な情報は上書きされた情報に置き換わってしまっ
ているので、復元することはできない。
However, in the above-described magnetic tape device, if another data is erroneously overwritten on a portion where the necessary information is already recorded on the magnetic tape, the necessary information before the overwriting is overwritten. There is a problem that cannot be restored.
In a device such as a hard disk device capable of random access, when newly recording data, by writing to the oldest area among unused areas or erased areas, the previously erased information can be restored. It has become. However, in a sequential access device such as a magnetic tape device, such a method cannot be used, and necessary information before overwriting has been replaced by the overwritten information, so that it cannot be restored.

【0004】本発明は以上の点に鑑みなされたもので、
書き込みを始める前に書き込まれているデータをバッフ
ァに読み出しておくようにバッファを制御することによ
り、誤って上書きしてしまった場合に、元のデータを上
位装置に影響を与えずに復元処理が可能な磁気テープ装
置を提供することを目的とする。
[0004] The present invention has been made in view of the above points,
By controlling the buffer so that the written data is read into the buffer before starting writing, if the data is accidentally overwritten, the original data can be restored without affecting the host device. It is an object to provide a possible magnetic tape device.

【0005】[0005]

【課題を解決するための手段】上記の目的を達成するた
め、本発明は記録時は上位装置から入力された複数のブ
ロックデータを一時格納し、再生時は格納されているブ
ロックデータを上位装置へ転送するバッファと、磁気テ
ープにブロックデータを記録ヘッドにより記録し、記録
されたブロックデータを磁気テープから再生ヘッドによ
り読み出すテープドライブと、上位装置から所望のブロ
ックデータの読み出し命令を受けたときは、バッファ内
に所望のブロックデータが格納されているかどうか判別
し、格納されているときは所望のブロックデータを上位
装置へ転送し、格納されていないときはテープドライブ
を制御して磁気テープから所望のブロックデータを再生
してバッファに格納した時点で上位装置へ所望のブロッ
クデータを転送した後、所望のブロックデータに後続す
る一又は二以上のブロックデータを再生してバッファに
順次格納し、上位装置から書き込み命令を受けたとき
は、バッファ内に書き込むべきブロックデータが格納さ
れているかどうか判断し、格納されていないときはテー
プドライブを制御して書き込むべきブロックデータとそ
れに後続する一又は二以上のブロックデータからなるバ
ッファの一定量分のデータを磁気テープから再生してバ
ッファに順次格納した後で一定時間が経過するか、バッ
ファの吐き出しが必要な命令を受領するかしたときに読
み出し、テープドライブに入力して磁気テープに記録す
ると共に記録ブロックデータをバッファ内からクリアす
る制御手段とを有する磁気テープ装置である。
In order to achieve the above object, the present invention temporarily stores a plurality of block data input from a host device during recording, and stores the stored block data during reproduction in a host device. A buffer for transferring data to a magnetic tape, a block drive for recording block data on a magnetic tape, and a tape drive for reading the recorded block data from a magnetic tape by a reproducing head. It is determined whether or not the desired block data is stored in the buffer. If the block data is stored, the desired block data is transferred to the host device. When the block data is reproduced and stored in the buffer, the desired block data is transferred to the host device. Thereafter, one or two or more block data subsequent to the desired block data are reproduced and sequentially stored in a buffer. When a write command is received from a higher-level device, whether or not the block data to be written is stored in the buffer is determined. Judgment, if not stored, controls the tape drive to reproduce a fixed amount of buffer data consisting of block data to be written and one or more subsequent block data from the magnetic tape and sequentially store them in the buffer Control means for reading out when a certain time has elapsed after receiving or receiving a command that requires ejection of the buffer, inputting it to a tape drive, recording it on a magnetic tape, and clearing recording block data from within the buffer; Is a magnetic tape device having:

【0006】ここで、本発明は、上記の制御手段によ
り、上位装置から書き込み取消し命令を受領したとき
は、書き込みブロックデータのうち最初に受け取ったブ
ロックデータがバッファに残っているときは書き込みブ
ロックデータの磁気テープへの書き込み予約をクリア
し、最初に受け取ったブロックデータがバッファに残っ
ていないときは、磁気テープ上の書き込みブロックデー
タの先の記録ブロックデータを再生して正常に再生され
た最初のブロックデータとバッファ内に保持されている
ブロックデータとが連続しているかどうか判断し、連続
しているときは磁気テープ上の正常に再生された最初の
ブロックデータの先の記録ブロックデータを、データ終
端信号を検出するまで再生して、バッファ内に書き込ん
だ後、テープドライブを制御して記録ヘッドを磁気テー
プ上の書き込みデータのうち最初に受け取ったブロック
データの直前の記録位置に位置付けた後、記録位置から
最初に受け取ったブロックデータの直前の記録ブロック
に続く順番のバッファ内に保持されているブロックデー
タと再生されて格納されたブロックデータとを順番にバ
ッファから読み出して磁気テープに記録することを特徴
とする。
Here, according to the present invention, when the above-mentioned control means receives a write cancel command from the host device, the first block data received among the write block data remains in the buffer when the write block data is left in the buffer. Clears the write reservation to the magnetic tape, and if the first received block data is not left in the buffer, the first recorded block data is reproduced by reproducing the recording block data preceding the write block data on the magnetic tape. Judge whether the block data and the block data held in the buffer are continuous, and if so, replace the recorded block data ahead of the first block data that was normally reproduced on the magnetic tape with the data Play until the end signal is detected, write it in the buffer, and then drive the tape drive. After the recording head is positioned at the recording position immediately before the first received block data of the write data on the magnetic tape, the buffer in the sequence following the recording block immediately before the first received block data from the recording position The block data stored in the memory and the block data reproduced and stored are sequentially read from the buffer and recorded on a magnetic tape.

【0007】また、本発明は、上記の制御手段により、
磁気テープ上の正常に再生された最初のブロックデータ
の先の記録ブロックデータを再生して、その再生データ
をバッファ内に書き込み、データ終端信号を検出するこ
となくバッファの容量一杯まで再生データが書き込まれ
たときは、バッファ内のブロックデータを転送した後、
データ終端信号を検出するまで磁気テープの再生を継続
して、その再生データを上位装置に転送して上位装置に
より復元処理を行わせた後、テープドライブを制御して
記録ヘッドを磁気テープ上の書き込みデータのうち最初
に受け取ったブロックデータの直前の記録位置に位置付
けた後、上位装置から復元処理されたブロックデータを
受領して位置付けた記録位置から順番にブロックデータ
を磁気テープに記録することを特徴とする。
Further, the present invention provides the above-mentioned control means
Reproduces the recording block data after the first block data that was normally reproduced on the magnetic tape, writes the reproduced data in the buffer, and writes the reproduced data to the full capacity of the buffer without detecting the data end signal. Is transferred, after transferring the block data in the buffer,
The reproduction of the magnetic tape is continued until the end of data signal is detected, the reproduced data is transferred to the host device, and the host device performs a restoration process. Then, the tape drive is controlled to move the recording head on the magnetic tape. After positioning the block data immediately before the first received block data among the write data, receiving the restored block data from the host device and recording the block data on the magnetic tape in order from the positioned recording position. Features.

【0008】更に、本発明は、上記の制御手段を、上位
装置から書き込み取消し命令を受領したときは、書き込
みブロックデータにより上書きされる前の磁気テープ記
録ブロックデータがバッファに残っているかどうか調
べ、残っているときはバッファ内のブロックデータを保
持したまま、磁気テープの先頭から書き込みブロックデ
ータのうち最初に受け取ったブロックデータの直前まで
のブロックデータを再生してバッファ内に書き込んだ
後、テープドライブを制御して記録ヘッドを磁気テープ
上のバッファ内の最後の順番のブロックデータの直後の
記録位置に位置付け、バッファ内のブロックデータを逆
順でテープ始端に向かって走行する磁気テープに記録す
る構成としたことを特徴とする。
Further, the present invention, when receiving the write cancel command from the host device, checks whether or not the magnetic tape recording block data before being overwritten by the write block data remains in the buffer. When remaining, the block data from the beginning of the magnetic tape to the block data just before the first received block data is reproduced and written into the buffer while retaining the block data in the buffer. Controlling the recording head to position the recording head immediately after the last-ordered block data in the buffer on the magnetic tape, and recording the block data in the buffer on the magnetic tape running in the reverse order toward the beginning of the tape. It is characterized by having done.

【0009】また、本発明は、上記の制御手段を、磁気
テープ上の正常に再生された最初のブロックデータの先
の記録ブロックデータを再生して、その再生データをバ
ッファ内に書き込み、データ終端信号を検出することな
くバッファの容量一杯まで再生データが書き込まれたと
きは、テープドライブを制御して記録ヘッドを磁気テー
プ上の書き込みデータのうち最初に受け取ったブロック
データの直前の記録位置に位置付けた後、バッファ内の
ブロックデータを順番に所定量だけ磁気テープに記録し
た後、再生ヘッドをバッファ内の最後の順番のブロック
データのテープ記録位置の直後に位置付けて磁気テープ
の再生を所定量のブロックデータが再生されるまで行う
と共に、その再生ブロックデータをバッファに書き込む
ことを、データ終端信号を検出するまで繰り返す構成と
したことを特徴とする。
Further, according to the present invention, the control means reproduces the recording block data preceding the first block data normally reproduced on the magnetic tape, writes the reproduced data in a buffer, When the playback data is written to the full capacity of the buffer without detecting a signal, the tape drive is controlled to position the recording head at the recording position immediately before the first received block data among the write data on the magnetic tape. After the block data in the buffer is sequentially recorded on the magnetic tape by a predetermined amount, the reproducing head is positioned immediately after the tape recording position of the last-ordered block data in the buffer to reproduce the magnetic tape by a predetermined amount. The operation is performed until the block data is reproduced, and the writing of the reproduced block data to the buffer is performed at the data end. Characterized by being configured to repeat to the detection of the signal.

【0010】本発明では、いずれも所望のブロックデー
タを磁気テープに記録あるいは再生するときには、所望
のブロックデータだけではなく、その先の複数のブロッ
クデータもバッファに書き込み保持するように、バッフ
ァを制御するようにしたので、上位装置から書き込み取
消し命令を受領したときは、バッファ内のブロックデー
タを用いて上書きされた部分のブロックデータに置き換
えることができる。なお、本明細書では「ブロックデー
タ」は「ブロック」及び「データ」を総称するものと
し、ブロックは一般にはヘッダ等の冗長ビットがデータ
に付加された構成である。
In the present invention, when recording or reproducing desired block data on or from a magnetic tape, the buffer is controlled so that not only the desired block data but also a plurality of subsequent block data are written and held in the buffer. Therefore, when a write cancel instruction is received from the host device, it can be replaced with the overwritten block data using the block data in the buffer. In this specification, "block data" is a generic term for "block" and "data", and a block generally has a configuration in which redundant bits such as a header are added to data.

【0011】[0011]

【発明の実施の形態】次に、本発明の一実施の形態につ
いて図面と共に説明する。図1は本発明になる磁気テー
プ装置の第1の実施の形態のブロック図を示す。同図に
示す第1の実施の形態の磁気テープ装置1は、磁気テー
プを読み書き(記録再生)する命令を出すホストコンピ
ュータ等の上位装置2と接続されている。磁気テープ装
置1は、磁気テープ13を走行させ、磁気テープ13に
記録再生するテープドライブ10と、上位装置2からの
命令を解釈し、テープドライブ10を動作させる制御部
11と、上位装置2からのデータやテープドライブ10
から再生したデータを一時的に貯めるバッファ3と、上
位装置2からのデータをテープドライブ10で記録する
ための信号に変換する記録回路4と、テープドライブ1
0で再生された信号を上位装置2に転送するデータに変
換する再生回路5と、記憶部16とを含む。
Next, an embodiment of the present invention will be described with reference to the drawings. FIG. 1 shows a block diagram of a first embodiment of a magnetic tape device according to the present invention. The magnetic tape device 1 according to the first embodiment shown in FIG. 1 is connected to a host device 2 such as a host computer that issues a command to read / write (record / reproduce) a magnetic tape. The magnetic tape device 1 runs a magnetic tape 13 and records and reproduces data on and from the magnetic tape 13. The magnetic tape device 1 interprets commands from the host device 2, and a control unit 11 that operates the tape drive 10. Data and tape drive 10
A buffer 3 for temporarily storing data reproduced from the tape drive 1, a recording circuit 4 for converting data from the host device 2 into a signal for recording by the tape drive 10, and a tape drive 1.
The reproduction circuit 5 converts the signal reproduced at 0 to data to be transferred to the host device 2, and the storage unit 16.

【0012】テープドライブ10は、制御部11内の制
御手段12からの信号に従ってリール9を回転させ、磁
気テープ13を走行させる駆動回路8と、駆動回路8に
よって回転する2つのリール9と、その両端を2つのリ
ール9に巻き付けられ、リール9の回転によって走行す
る磁気テープ13と、2つのリール9の間で磁気テープ
13に接触する位置にあり、記録回路4からの信号を磁
気テープ13に書き込む記録ヘッド6と、磁気テープ1
3に記録された信号を読み出して再生回路5に送る再生
ヘッド7とを含む。制御部11は、プログラム制御で動
く制御装置であり、そのプログラムは記憶部16に記憶
されており、また、上位装置2から入ってくる命令を解
釈して駆動回路8を制御する制御手段12を含む。
The tape drive 10 rotates a reel 9 in accordance with a signal from a control unit 12 in a control unit 11 to drive a magnetic tape 13, two reels 9 rotated by the drive circuit 8, Both ends are wound around two reels 9, and a magnetic tape 13 running by rotation of the reel 9 is located at a position where the magnetic tape 13 is in contact with the magnetic tape 13 between the two reels 9, and a signal from the recording circuit 4 is transmitted to the magnetic tape 13. Recording head 6 for writing and magnetic tape 1
3 and a reproducing head 7 for reading out the signal recorded in 3 and sending it to the reproducing circuit 5. The control unit 11 is a control device that operates under program control. The program is stored in the storage unit 16, and the control unit 12 that interprets a command input from the host device 2 and controls the drive circuit 8 is controlled. Including.

【0013】次に、この実施の形態の動作について説明
する。磁気テープ13に記録されたデータを上位装置2
に読み出す場合、制御手段12は上位装置2から受け取
った命令を解釈し、読み出すべきデータがバッファ3に
格納されているかどうか判断する。もし、バッファ3に
データが格納されていなければ、駆動回路8を操作し、
リール9を回転させ、磁気テープ13を動作させる。磁
気テープ13が走行するのに伴い、磁気テープ13に記
録されたデータを再生ヘッド7で再生し、再生回路5で
再生信号を変換して、バッファ3に格納する。そして、
バッファ3に読み出したいブロックのデータが格納され
た時点で上位装置2に転送する。
Next, the operation of this embodiment will be described. The data recorded on the magnetic tape 13 is transferred to the host device 2
When reading the data, the control unit 12 interprets the command received from the host device 2 and determines whether or not the data to be read is stored in the buffer 3. If no data is stored in the buffer 3, the driver 8 operates the drive circuit 8,
The reel 9 is rotated, and the magnetic tape 13 is operated. As the magnetic tape 13 travels, the data recorded on the magnetic tape 13 is reproduced by the reproduction head 7, the reproduction circuit 5 converts the reproduction signal, and stores the converted signal in the buffer 3. And
When the data of the block to be read is stored in the buffer 3, the data is transferred to the host device 2.

【0014】特に、次の動作が指定されなければ、磁気
テープ13をそのまま走行させ、バッファ3に入るだけ
再生させて再生したブロックのデータを格納する。次の
ブロックのデータを再生する場合は、バッファ3に記憶
できるまで書き込ませる。次のブロックのデータを読む
場合は、バッファ3内に書き込まれているので、磁気テ
ープ13を再度動作させることなく、データを上位装置
2へ転送する。
In particular, if the next operation is not specified, the magnetic tape 13 is run as it is, reproduced as much as it enters the buffer 3, and the data of the reproduced block is stored. When reproducing the data of the next block, the data is written until it can be stored in the buffer 3. When reading the data of the next block, since the data has been written in the buffer 3, the data is transferred to the host device 2 without operating the magnetic tape 13 again.

【0015】次に、上位装置2から磁気テープ13にデ
ータを書き込む場合の制御手段12の処理について、図
2のフローチャートを図1と併せ参照して詳細に説明す
る。制御手段12は、上位装置2から磁気テープ装置1
がデータ書き込み命令を受領すると(ステップA1)、
バッファ3を使う1つ前のコマンドが書き込み命令であ
ったかどうか判断する(ステップA2)。書き込み命令
でなければ、バッファ3内にこれから書き込むブロック
の先読みデータ(有効な先読みデータ)があるかどうか
判断する(ステップA3)。
Next, the processing of the control means 12 when writing data from the host device 2 to the magnetic tape 13 will be described in detail with reference to the flowchart of FIG. 2 and FIG. The control means 12 transmits the information from the host device 2 to the magnetic tape device 1
Receives the data write command (step A1),
It is determined whether or not the previous command using the buffer 3 was a write command (step A2). If it is not a write command, it is determined whether or not there is prefetch data (valid prefetch data) of the block to be written in the buffer 3 (step A3).

【0016】有効な先読みデータがなければ、テープ位
置が現在の上位装置2に報告している位置と合っている
かどうか判断する(ステップA4)。もし、ずれている
ならば、上位装置2に報告している位置までテープ位置
を補正する(ステップA5)。テープ位置が合っている
とステップA4で判定されたならば、あるいはステップ
A5でテープ位置を補正したならば、バッファ3のある
一定量(例えば、1/2程度)まで、先読みを行う(ス
テップA6)。ステップA6によりバッファ3内に有効
な先読みデータが格納されたならば、あるいはステップ
A3でバッファ3内にこれから書き込む有効な先読みデ
ータがあると判定された時は、先読みした分だけ、テー
プ位置を戻す(ステップA7)。
If there is no valid prefetch data, it is determined whether or not the tape position matches the current position reported to the host device 2 (step A4). If there is a deviation, the tape position is corrected to the position reported to the host device 2 (step A5). If it is determined in step A4 that the tape position is correct, or if the tape position is corrected in step A5, pre-reading is performed up to a certain amount (for example, about 1/2) of the buffer 3 (step A6). ). If valid prefetch data is stored in the buffer 3 in step A6, or if it is determined in step A3 that there is valid prefetch data to be written in the buffer 3, the tape position is returned by the prefetch amount. (Step A7).

【0017】ステップA7でテープ位置を戻した後、あ
るいはステップA2でバッファ3を使う1つ前のコマン
ドが書き込み命令であったと判定されたときは、これか
ら格納する書き込みデータが入るだけ、バッファ3に空
き領域があるかどうか判断する(ステップA8)。空き
領域がないときは、バッファ3内に書き込みデータがあ
るかどうか判断し(ステップA9)、書き込みデータが
無ければ、一番不要な先読みデータを廃棄し(ステップ
A10)、書き込みデータが有れば、バッファ3内のそ
の書き込みデータを磁気テープ13に書き込んでバッフ
ァ3を空ける(ステップA11)。
After the tape position is returned in step A7, or when it is determined in step A2 that the previous command to use the buffer 3 was a write command, the buffer 3 is stored in the buffer 3 as long as the write data to be stored is entered. It is determined whether there is a free area (step A8). If there is no free area, it is determined whether there is write data in the buffer 3 (step A9). If there is no write data, the most unnecessary prefetch data is discarded (step A10). Then, the write data in the buffer 3 is written on the magnetic tape 13 to empty the buffer 3 (step A11).

【0018】ステップA10における「一番不要な先読
みデータ」とは、現在のテープ位置から一番遠いブロッ
クの先読みデータのことである。ステップA10又はA
11の処理により、バッファ3に空き領域が確保される
こととなり、書き込みデータを受領し、バッファ3に書
き込む(ステップA12)。上位側での書き込み処理は
これで完了する(ステップA13)。
The "most unnecessary prefetch data" in step A10 is the prefetch data of the block farthest from the current tape position. Step A10 or A
By the processing of No. 11, an empty area is secured in the buffer 3, and the write data is received and written into the buffer 3 (step A12). This completes the write processing on the upper side (step A13).

【0019】バッファ3に書き込まれたデータは、一定
時間が経過するか、磁気テープ装置1が位置決め命令な
どバッファの吐き出し(バッファフラッシュ)が必要な
命令を受領するかしたならば、磁気テープ13に書き出
される。すなわち、この場合は、制御手段12は、駆動
回路8を操作し、リール9を回転させ、磁気テープ13
を動作させる。バッファ3に格納されたデータは読み出
されて記録回路4で変換された後、記録ヘッド6に供給
される。周知のように、記録ヘッド6は接触して走行し
ている磁気テープ13に対し、記録回路4から入力され
たデータの書き込みを行う。
The data written in the buffer 3 is transferred to the magnetic tape 13 when a certain period of time has elapsed or when the magnetic tape device 1 receives a command such as a positioning command that requires a buffer flush (buffer flush). Is written out. That is, in this case, the control means 12 operates the drive circuit 8 to rotate the reel 9 and
To work. The data stored in the buffer 3 is read and converted by the recording circuit 4 and then supplied to the recording head 6. As is well known, the recording head 6 writes data input from the recording circuit 4 to the magnetic tape 13 running in contact.

【0020】次に、図3のフローチャートを図1と併せ
参照して、書き込み取り消し命令の動作について詳細に
説明する。上位装置2は直前の書き込み命令を取り消し
たいとき、磁気テープ装置1に対し、取り消し命令を出
す。磁気テープ装置1内の制御手段12は上位装置2か
ら取り消し命令を受け取ると(ステップB1)、まず、
書き込みデータのうち最初に受け取ったブロックのデー
タがバッファ3に残っているかどうか調べる(ステップ
B2)。
Next, the operation of the write cancel instruction will be described in detail with reference to the flowchart of FIG. 3 and FIG. When the host device 2 wants to cancel the immediately preceding write command, it issues a cancel command to the magnetic tape device 1. When the control means 12 in the magnetic tape device 1 receives the cancel command from the host device 2 (step B1), first,
It is checked whether the data of the block received first among the write data remains in the buffer 3 (step B2).

【0021】バッファ3に残っているならば、まだその
データは磁気テープ13には記録されていないので、磁
気テープ13への書き込み予約をクリアするだけで、書
き込み命令取消し処理は終了する(ステップB11)。
書き込みデータのうち最初に受け取ったデータがバッフ
ァ3に残っていない場合、そのブロックのデータは既に
磁気テープ13に記録されているので、バッファ3内に
ある先読みデータは保持したまま、磁気テープ13の記
録信号を再生して書き込んだブロックのデータの先を読
む。正常に読めた最初のブロックをXとし、その場所に
停止する(ステップB3)。
If the data remains in the buffer 3, the data has not yet been recorded on the magnetic tape 13, so that only the write reservation to the magnetic tape 13 is cleared, and the write command canceling process ends (step B11). ).
If the data received first among the write data does not remain in the buffer 3, the data of the block has already been recorded on the magnetic tape 13. The recording signal is reproduced to read the end of the data of the written block. The first block that can be read normally is set to X, and it stops at that location (step B3).

【0022】続いて、バッファ3内に残っている先読み
データと正常に読めた最初のブロックとの間に隙間、す
なわち、ブロック番号に不連続があるかどうか判断し
(ステップB4)、隙間があって(不連続であって)デ
ータがなくなっている場合には復元できないので終了す
る(ステップB5)。一方、バッファ3内に残っている
先読みデータと正常に読めた最初のブロックとの間にブ
ロック番号に連続性があるときは、バッファ3内の先読
みデータで補完が可能であるので、バッファ3内の先読
みデータを保持したまま、ブロックXの先の磁気テープ
13の記録信号を再生しながら、その再生データをバッ
ファ3に書き込んでいく(ステップB6)。
Subsequently, it is determined whether there is a gap between the pre-read data remaining in the buffer 3 and the first normally read block, that is, whether there is a discontinuity in the block number (step B4). If the data is lost (discontinuous), the data cannot be restored and the process is terminated (step B5). On the other hand, when there is continuity in the block number between the prefetched data remaining in the buffer 3 and the first block that can be read normally, the complement can be performed with the prefetched data in the buffer 3. While reproducing the recording signal of the magnetic tape 13 ahead of the block X while holding the pre-read data of the block X, the reproduced data is written to the buffer 3 (step B6).

【0023】再生データでバッファ3が一杯になる前に
データ終端(EOD)を再生したならば、書き込み始め
る位置に、すなわち書き込みデータのうち最初に受け取
ったブロックのデータの先頭(書き込み取消し命令がな
された最初のブロックのデータの直前)からデータを書
き込めるように磁気テープ13を位置付ける(ステップ
B9)。そして、バッファ3内にある先読みデータを読
み出して、上記の位置付けした位置から記録開始するこ
とで復元作業が完了する。一方、ステップB7でEOD
を検出する前にバッファ3が再生データで一杯になった
と判断されたときは、上位装置2に転送して復元処理を
行う(ステップB8)。
If the end of data (EOD) is reproduced before the buffer 3 becomes full with the reproduced data, the write start position, that is, the head of the data of the first received block of the write data (write cancel command is issued) The magnetic tape 13 is positioned so that data can be written from (before the data of the first block) (step B9). Then, the pre-read data in the buffer 3 is read out, and recording is started from the above-mentioned position, thereby completing the restoration work. On the other hand, in step B7, EOD
If it is determined that the buffer 3 is full of the reproduction data before the detection is performed, the buffer 3 is transferred to the host device 2 and the restoration processing is performed (step B8).

【0024】次に、図4のフローチャートと共に上記の
ステップB8の復元処理を説明する。まず、上位装置2
に対し、データの吸い上げ要求を上げる(ステップC
2)。上位装置2で吸い上げる準備ができたならば、上
位装置2は磁気テープ装置1に対し、吸い上げ命令(コ
マンド)を発行する。制御手段12が上位装置2からの
吸い上げ命令(コマンド)を受領すると(ステップC
3)、バッファ3内のブロックのデータをブロックN+
1のデータから現在位置まで上位装置2に転送する(ス
テップC4)。
Next, the restoration processing in the above step B8 will be described with reference to the flowchart of FIG. First, the host device 2
To the data download request (step C
2). When the upper device 2 is ready for copying, the upper device 2 issues a copying command to the magnetic tape device 1. When the control means 12 receives a siphoning command (command) from the host device 2 (step C)
3), the data of the block in the buffer 3 is transferred to the block N +
The data from the data No. 1 to the current position is transferred to the host device 2 (step C4).

【0025】バッファ3に空き領域ができたら、現在位
置から先を読み込みさらに上位装置2に転送する(ステ
ップC5)。読み込んだブロックがEODでなければ、
さらに読み続ける(ステップC6)。もし、EODを検
出したならば、書き込み始める位置に位置付ける(ステ
ップC7)。そして、上位装置2から復元処理のデータ
を受け取り、磁気テープ13に書き込んでいく。すべて
を書き込んだら、復元作業が完了する(ステップC
8)。
When a free area is created in the buffer 3, the data is read from the current position and transferred to the host device 2 (step C5). If the read block is not EOD,
Further reading is continued (step C6). If EOD is detected, it is positioned at the writing start position (step C7). Then, the data of the restoration processing is received from the host device 2 and written to the magnetic tape 13. After writing everything, the restoration work is completed (step C
8).

【0026】次に、図5と図6を用いて更に具体的に動
作を説明する。図5は磁気テープの記録状態をブロック
単位で模式的に示した図であり、図6はそれぞれの時点
でのバッファ3の記憶状態を模式的に示した図である。
ここで、バッファ3の容量を512KB、1ブロックあ
たり50KBであると仮定する。
Next, the operation will be described more specifically with reference to FIGS. FIG. 5 is a diagram schematically showing the recording state of the magnetic tape in block units, and FIG. 6 is a diagram schematically showing the storage state of the buffer 3 at each time.
Here, it is assumed that the capacity of the buffer 3 is 512 KB, and 50 KB per block.

【0027】上位装置2からの読み出し命令に従ってブ
ロックNを読み出して上位装置2へ転送する場合、ブロ
ックNだけでなくバッファ3に入るだけ磁気テープ13
の先読みを行うため、図6(a)に示すようにアドレス
0からアドレス500までに、ブロックNからブロック
N+9までのデータが磁気テープ13から再生されてバ
ッファ3に格納される。
When the block N is read in accordance with a read command from the host device 2 and transferred to the host device 2, not only the block N but also the magnetic tape 13
6A, the data from block N to block N + 9 is reproduced from the magnetic tape 13 and stored in the buffer 3 from address 0 to address 500 as shown in FIG.

【0028】ブロックNのデータはバッファ3に格納さ
れるが、上位装置2に転送し終わるとクリアされる。こ
の状態で、上位装置2から磁気テープ装置1が磁気テー
プ13への書き込み命令を受けると、従来装置ではバッ
ファ3を全てクリアしてしまっていたが、この実施の形
態では全てをクリアするのではなく、一部だけをクリア
するようにする。すなわち、バッファが逆方向の格納に
対応しているならば、最後に必要となるデータ、この場
合ではブロックN+9のデータから順にクリアし、その
空いた領域に格納していく。また、従来装置と同様であ
れば、バッファ3を逆方向には使えないので、バッファ
3のある一定量(書き込み用と下地データの保存用の2
つで使うため、1/2程度が望ましい)をクリアし、そ
の場所から格納する。
The data of the block N is stored in the buffer 3, but is cleared when the data has been transferred to the host device 2. In this state, when the magnetic tape device 1 receives a write command to the magnetic tape 13 from the host device 2, all buffers 3 are cleared in the conventional device, but in this embodiment, all buffers 3 may be cleared. Instead, try to clear only a part. That is, if the buffer supports storage in the reverse direction, the data required last, in this case, the data of block N + 9, is cleared in order, and stored in the empty area. Further, in the same manner as in the conventional apparatus, the buffer 3 cannot be used in the reverse direction.
(Preferably about 1/2, so that it can be used together)) and store it from that location.

【0029】ここでは、後者の例について説明すると、
図6(b)に示すように、バッファ3に格納されていた
先読みデータであるブロックN+1からN+9のうち、
1/2程度の容量であるブロックN+1からブロックN
+5までのデータは保持し、ブロックN+6からブロッ
クN+9のデータは破棄し、ブロックN+6を格納して
いた場所(アドレス300)から、次の書き込みブロッ
クであるブロックN+1’が上位装置2から転送されて
きて格納される。
Here, the latter example will be described.
As shown in FIG. 6B, of the blocks N + 1 to N + 9, which are the pre-read data stored in the buffer 3,
Block N + 1 to block N having a capacity of about 1/2
The data up to +5 is retained, the data in blocks N + 6 to N + 9 are discarded, and the next write block, block N + 1 ′, is transferred from the host device 2 from the location where block N + 6 was stored (address 300). Stored.

【0030】ある一定時間が経過すると、バッファ3内
のブロックN+1’が磁気テープ13に記録され、その
記録が終了すると、図5(b)に模式的に示すように、
ブロックNの次にブロックN+1’のデータと、その直
後にデータ終端マーク(EOD)が記録される。ブロッ
クN+1’のデータの記録が終ると、バッファ3内のブ
ロックN+1’のデータはクリアされる。
After a certain period of time, the block N + 1 'in the buffer 3 is recorded on the magnetic tape 13, and when the recording is completed, as shown schematically in FIG.
Data of block N + 1 'is recorded after block N, and a data end mark (EOD) is recorded immediately after that. When the recording of the data of the block N + 1 'is completed, the data of the block N + 1' in the buffer 3 is cleared.

【0031】ここで、上位装置2がブロックN+1’の
書き込みを取り消したい場合、書き込み取消し命令を磁
気テープ装置1へ出力し、制御手段12がこの書き込み
取消し命令を受けることにより、どこまでのブロックが
テープ上に残っているか確認するために、前述したよう
に、ブロックN+1’の先の磁気テープ13の記録情報
を再生する。このときの磁気テープ13の記録状態は図
5(b)に模式的に示すようになっており、上記の再生
によりブロックN+1’に続いてデータ終端マーク(E
OD)があり、そのあとに上書きされて一部だけ残った
ブロックがあり、その先にブロックN+4があることが
わかる。従って、このブロックN+4が前述したステッ
プB3のブロックXということになる。
Here, when the host device 2 wants to cancel the writing of the block N + 1 ', it outputs a write cancel command to the magnetic tape device 1, and the control means 12 receives this write cancel command, so that how many blocks can As described above, the recorded information on the magnetic tape 13 ahead of the block N + 1 'is reproduced in order to check whether it remains on the upper side. The recording state of the magnetic tape 13 at this time is schematically shown in FIG. 5B, and by the above-described reproduction, the data end mark (E) follows the block N + 1 ′.
OD), there is a block that has been overwritten and only a part remains, and it can be seen that there is a block N + 4 beyond that. Therefore, this block N + 4 is the block X in step B3 described above.

【0032】このとき、バッファ3の記憶内容は図6
(c)に模式的に示すように、先読みデータであるブロ
ックN+1からブロックN+5までのデータと、ブロッ
クN+1’を格納していた場所(アドレス300)か
ら、磁気テープ13の再生ブロックN+4のデータが格
納される。
At this time, the contents stored in the buffer 3 are as shown in FIG.
As schematically shown in (c), the data of the reproduction block N + 4 of the magnetic tape 13 is obtained from the data from the block N + 1 to the block N + 5 which is the pre-read data and the location (address 300) where the block N + 1 'was stored. Is stored.

【0033】図5(b)から分かるように、磁気テープ
13上ではブロックN+1からブロックN+3の3ブロ
ックのデータが失われてしまっているが、バッファ3内
には図6(c)に示すように、ブロックN+1からブロ
ックN+5のブロックのデータが保持されているので、
補完可能である。ここで、ブロックN+4が磁気テープ
13とバッファ3とで重複しており、またN+5はこれ
から読み込むので、N+5と下地のデータとして読み込
んだN+4をバッファ3内からクリアし、N+1からN
+4のブロックのデータをバッファ3内に保持したま
ま、磁気テープ13上のブロックXであるブロックN+
4から磁気テープ13の再生を開始する(ステップB
4、B6)。
As can be seen from FIG. 5B, three blocks of data from block N + 1 to block N + 3 have been lost on the magnetic tape 13, but as shown in FIG. Since the data of the blocks from block N + 1 to block N + 5 are held,
Can be complemented. Here, since the block N + 4 overlaps between the magnetic tape 13 and the buffer 3 and N + 5 is to be read from now on, N + 5 and N + 4 read as background data are cleared from the buffer 3 and N + 1 to N
The block N + which is the block X on the magnetic tape 13 is held while the data of the block +4 is held in the buffer 3.
4 starts reproduction of the magnetic tape 13 (step B).
4, B6).

【0034】バッファ3が再生データで一杯になる前に
EODを検出したら、例えば、図5(b)とは異なり、
ブロックN+8の直後にEODがあったならば、この装
置内で復元を行う。このときの復元動作は、まず、ブロ
ックNの直後、すなわち、書き込みを取り消したいブロ
ックN+1’の直前位置から磁気記録が可能なように磁
気テープ13と記録ヘッド6との相対位置を位置付ける
(ステップB9)。次に、バッファ3内に保存してあっ
た先読みデータ、ブロックN+1からブロックN+4
と、EODの先を読み込んだデータ、ブロックN+5か
らブロックN+8を書き込む。書き込みが完了すれば、
復元動作は完了する。
If the EOD is detected before the buffer 3 becomes full of the reproduction data, for example, unlike FIG.
If there is an EOD immediately after block N + 8, restoration is performed in this device. In the restoration operation at this time, first, the relative position between the magnetic tape 13 and the recording head 6 is positioned so that magnetic recording can be performed immediately after the block N, that is, immediately before the block N + 1 'where writing is to be canceled (step B9). ). Next, the pre-read data stored in the buffer 3, from block N + 1 to block N + 4
And the data read from the end of the EOD, block N + 5 to block N + 8 are written. When writing is completed,
The restoration operation is completed.

【0035】図5(b)に示したテープ記録状態では、
EODを検出する前にバッファ3が再生ブロックのデー
タで一杯になる。すなわち、図6(d)に示すように、
ブロックN+10のデータの一部を磁気テープ13から
再生してバッファ3に読み込んだところでバッファ3が
一杯になってしまうので、上位装置2に対し、磁気テー
プ装置1はデータの吸い上げ要求をする(ステップC
2)。
In the tape recording state shown in FIG.
Before the EOD is detected, the buffer 3 becomes full with the data of the reproduction block. That is, as shown in FIG.
When a part of the data of the block N + 10 is reproduced from the magnetic tape 13 and read into the buffer 3, the buffer 3 becomes full. Therefore, the magnetic tape device 1 requests the upper device 2 to download the data (step S10). C
2).

【0036】これにより、上位装置2から吸い上げ命令
を受領したら(ステップC3)、バッファ3内のブロッ
クN+1からブロックN+10のデータを上位装置2へ
転送し(ステップC4)、さらに磁気テープ13からE
ODを検出するまでブロックN+11からブロックMま
でのデータを磁気テープ13を再生しながら上位装置2
に転送する(ステップC5、C6)。その後、ブロック
Nの直後に位置付けし直し(ステップC7)、上位装置
2に吸い上げたブロックN+1からブロックMまでのデ
ータを上位装置2から磁気テープ装置1に転送して磁気
テープ13に書き込むことにより、復元処理が完了する
(ステップC8)。
Thus, upon receiving a siphoning instruction from the host device 2 (step C3), the data of the blocks N + 1 to N + 10 in the buffer 3 is transferred to the host device 2 (step C4), and the magnetic tape 13 sends the data from the magnetic tape 13 to the E.
Until the OD is detected, the data from the block N + 11 to the block M is reproduced on the magnetic tape 13 while reproducing the data on the magnetic tape 13.
(Steps C5 and C6). Thereafter, the data is repositioned immediately after the block N (step C7), and the data from the block N + 1 to the block M downloaded to the host device 2 is transferred from the host device 2 to the magnetic tape device 1 and written on the magnetic tape 13, The restoration process is completed (Step C8).

【0037】このように、この実施の形態では、特別な
機構を付加することなし、誤ってブロックN+1’を書
き込んでしまった磁気テープ13を元の記録状態に復元
することができる。
As described above, in this embodiment, the magnetic tape 13 on which the block N + 1 'has been erroneously written can be restored to the original recording state without adding a special mechanism.

【0038】次に、本発明の第2の実施の形態の構成及
び動作について説明する。図5を用いて、第2の実施の
形態の動作について説明する。この第2の実施の形態で
は、図1に示した第1の実施の形態の記録回路4とテー
プドライブ10に、磁気テープ13を逆方向に走行させ
て記録する機能を追加する。それ以外は図1に示した第
1の実施の形態と同じ構成とする。
Next, the configuration and operation of the second embodiment of the present invention will be described. The operation of the second embodiment will be described with reference to FIG. In the second embodiment, a function of running the magnetic tape 13 in the opposite direction and recording is added to the recording circuit 4 and the tape drive 10 of the first embodiment shown in FIG. Otherwise, the configuration is the same as that of the first embodiment shown in FIG.

【0039】第2の実施の形態では、磁気テープ13に
ブロックN+1’のデータを書き込んだ後、この書き込
みを取り消す場合、まずブロックN+1’の先を読み復
元できるか確認する。ここでは、バッファ3内にブロッ
クN+1からブロックN+4のデータがあるため、復元
できる。ブロックN+1からブロックN+4のデータを
保持したまま、バッファ3が一杯になるまで再生ブロッ
クのデータをバッファ3に書き込む。EODを検出する
前にバッファ3が一杯になったら、ブロック1からブロ
ックN+3までがバッファ内に納まるかチェックする。
In the second embodiment, after writing the data of the block N + 1 'on the magnetic tape 13 and then canceling the writing, it is first checked whether the head of the block N + 1' can be read and restored. Here, since the data of the block N + 1 to the block N + 4 exist in the buffer 3, the data can be restored. The data of the reproduction block is written to the buffer 3 while the data of the blocks N + 1 to N + 4 are held, until the buffer 3 becomes full. If the buffer 3 is full before EOD is detected, it is checked whether blocks 1 to N + 3 fit in the buffer.

【0040】チェック方法には、(1)1つ前のブロッ
クのブロック長×ブロック数で推測する方法、(2)読
み書きするたびにバッファ内でのブロック長を計算して
いき、テープの先頭からの累積の長さを記憶しておく方
法、(3)実際に読み込んでブロック長を調べる方法の
3通りが考えられる。このうち、累積の長さを記憶して
おく第2の方法が望ましい。その理由は、誤差がなく、
また、事前の磁気テープの動作で長さを調べてあるの
で、チェックするときには磁気テープの動作が不要だか
らである。
The checking method includes (1) a method of estimating the length by the block length of the immediately preceding block × the number of blocks, and (2) calculating the block length in the buffer each time reading or writing is performed, and starting from the beginning of the tape. And (3) a method of actually reading and checking the block length. Of these, the second method of storing the cumulative length is desirable. The reason is that there is no error,
Also, since the length is checked by the operation of the magnetic tape in advance, the operation of the magnetic tape is unnecessary when checking.

【0041】例えば、バッファ容量を512KB、ブロ
ック長を50KBとすると(1)の方法ではNが7より
小さければ、バッファ内に納まると推測できるので、バ
ッファに納まるならば、一度テープの先頭に位置決め
し、ブロック1からブロックNまで読み込む。実際に読
み込んで、入りきらなかった場合は、第1の実施の形態
と同様の方法で上位装置2に転送して復元する。バッフ
ァ内に残っていたデータと合せるとブロック1からブロ
ックN+3までのデータがバッファ内に存在する。N+
4の手前に位置付けをし、そこからテープの先頭に向か
って逆方向に書き込む。ブロック1を書き込み、媒体先
頭部分にある媒体識別のための領域まで書き込めぱ、復
元動作は完了する。媒体識別のための領域は同じパター
ンが書き込まれている領域なので、書き直したときのず
れが問題にならない。
For example, if the buffer capacity is 512 KB and the block length is 50 KB, it is assumed that if N is smaller than 7 in the method (1), it can be estimated that the buffer will fit in the buffer. Then, blocks 1 to N are read. If the data cannot be completely read out and transferred, the data is transferred to the host device 2 and restored by the same method as in the first embodiment. When combined with the data remaining in the buffer, data from block 1 to block N + 3 exists in the buffer. N +
Positioning before 4, and writing in the reverse direction from there toward the beginning of the tape. Block 1 is written, and an area for medium identification at the head of the medium can be written. Thus, the restoring operation is completed. Since the area for medium identification is an area in which the same pattern has been written, there is no problem in rewriting when rewriting.

【0042】ほとんどテープの終わりまで書き込まれて
いるテープの先頭を誤って上書きしてしまった場合、第
1の実施の形態では上書きしたところから最後まで、一
回読み出してもう一度書き込まなければならないため、
(媒体の長さ/読み込み時のテープの速さ)+巻き戻し
時間+(媒体の長さ/書き込み時のテープの速さ)、程
度の時間がかかってしまう。従って、媒体の長さを15
0m、読み込み・書き込みのテープの速さを2m/秒、
巻き戻し時間を30秒とすると、約180秒かかってし
まう。一方、本実施の形態のように逆向きにテープの先
頭だけ書き換えれば、数秒で処理することができる。
In the first embodiment, if the head of the tape written almost to the end of the tape is erroneously overwritten, it is necessary to read and write again from the overwritten point to the end in the first embodiment.
(The length of the medium / the speed of the tape at the time of reading) + the rewinding time + (the length of the medium / the speed of the tape at the time of writing). Therefore, the length of the medium is 15
0m, read / write tape speed 2m / sec,
If the rewinding time is 30 seconds, it takes about 180 seconds. On the other hand, if only the head of the tape is rewritten in the opposite direction as in the present embodiment, processing can be performed in a few seconds.

【0043】次に、本発明の第3の実施の形態の構成に
ついて説明する。図7は本発明になる磁気テープ装置の
第3の実施の形態のブロック図を示す。同図中、図1と
同一構成部分には同一符号を付し、その説明を省略す
る。図7の第3の実施の形態の磁気テープ装置20は、
図1の第1の実施の形態にテープドライブ21に再生ヘ
ッド14を追加し、更にこの再生ヘッド14からの再生
信号を受ける再生回路15を追加したものである。再生
ヘッド14は、記録ヘッド6に対して、再生ヘッド7の
反対側(記録時のテープ上流側)で磁気テープ13に接
触する位置に設けられる。再生回路5とは別に再生回路
15を追加する。再生ヘッド14で再生した信号を再生
回路15でデータに変換し、バッファ3に格納する。
Next, the configuration of the third embodiment of the present invention will be described. FIG. 7 is a block diagram showing a third embodiment of the magnetic tape device according to the present invention. In the figure, the same components as those of FIG. 1 are denoted by the same reference numerals, and description thereof will be omitted. The magnetic tape device 20 according to the third embodiment shown in FIG.
In this embodiment, a reproducing head 14 is added to the tape drive 21 in the first embodiment shown in FIG. 1, and a reproducing circuit 15 for receiving a reproducing signal from the reproducing head 14 is added. The reproducing head 14 is provided at a position opposite to the recording head 6 and at a position opposite to the reproducing head 7 (upstream of the tape during recording) and in contact with the magnetic tape 13. A reproduction circuit 15 is added separately from the reproduction circuit 5. The signal reproduced by the reproducing head 14 is converted into data by the reproducing circuit 15 and stored in the buffer 3.

【0044】次に、この図7の第3の実施の形態におけ
る書き込み動作を、図8のフローチャートを用いて説明
する。図8中、図2と同一処理ステップには同一符号を
付してある。図7の制御手段12は上位装置2から書き
込み命令を受領すると、バッファ3を使う1つ前のコマ
ンドが書き込み命令であったかどうか判断する(ステッ
プA2)。1つ前のコマンドが書き込み命令でなけれ
ば、バッファ3内の先読みデータをクリアし(ステップ
D1)、テープ位置が現在の上位装置2に報告している
位置と合っているかどうか判断する(ステップA4)。
もし、ずれているならば、上位装置2に報告している位
置までテープ位置を補正する(ステップA5)。
Next, a write operation in the third embodiment of FIG. 7 will be described with reference to a flowchart of FIG. 8, the same processing steps as those in FIG. 2 are denoted by the same reference numerals. When the control means 12 of FIG. 7 receives the write command from the host device 2, it determines whether the previous command using the buffer 3 was a write command (step A2). If the previous command is not a write command, the pre-read data in the buffer 3 is cleared (step D1), and it is determined whether or not the tape position matches the current position reported to the host device 2 (step A4). ).
If there is a deviation, the tape position is corrected to the position reported to the host device 2 (step A5).

【0045】ステップA2で1つ前のコマンドが書き込
み命令であると判定されたとき、あるいはステップA4
でテープ位置が合っていると判定された場合、あるいは
ステップA5でテープ位置を補正したならば、これから
格納する書き込みデータが入るだけ、バッファ3に空き
領域があるかどうか判断する(ステップA8)。空き領
域がなければ、バッファ3に溜まっている書き込みデー
タを磁気テープ13に書き出してバッファ3を空ける
(ステップA11)。これから格納する書き込みデータ
が入るだけ、バッファ3に空き領域が元々あるか、ある
いはステップA11によりバッファ3に溜まっている書
き込みデータを磁気テープ13に書き出してバッファ3
をクリアしたならば、上位装置2から受領した書き込み
データをバッファ3内に格納する(ステップA12)。
上位側での書き込み処理はこれで完了する。
When it is determined in step A2 that the previous command is a write command, or in step A4
If it is determined in step A5 that the tape position is correct, or if the tape position has been corrected in step A5, it is determined whether or not there is free space in the buffer 3 just enough to receive the write data to be stored (step A8). If there is no free area, the write data stored in the buffer 3 is written out to the magnetic tape 13 to empty the buffer 3 (step A11). As long as the write data to be stored is to be entered, the buffer 3 originally has an empty area, or the write data stored in the buffer 3 is written out to the magnetic tape 13 by the
Is cleared, the write data received from the host device 2 is stored in the buffer 3 (step A12).
This completes the write processing on the upper side.

【0046】バッファ3に格納された書き込みデータは
一定時間が経過するか、位置決め命令などバッファの吐
き出し(バッファフラッシュ)が必要な命令を受領する
と、制御手段12は、駆動回路8を操作し、リール9を
回転させ、磁気テープ13を記録時の所定の方向に走行
させると共に、バッファ3に格納されたデータを読み出
して記録回路4で変換し、記録ヘッド6に供給し、接触
して走行している磁気テープ13に対し書き込みを行
う。これと同時に、再生ヘッド15は記録ヘッド6で書
き込まれる前の磁気テープ13の記録データを再生し、
再生回路15でデータを変換し、バッファ3に格納す
る。
When the write data stored in the buffer 3 has passed for a certain period of time or has received a command such as a positioning command which requires the buffer to be flushed (buffer flush), the control means 12 operates the drive circuit 8 to control the reels. 9 to rotate the magnetic tape 13 in a predetermined direction at the time of recording, read out the data stored in the buffer 3, convert it by the recording circuit 4, supply it to the recording head 6, and contact it to run. To the existing magnetic tape 13. At the same time, the reproducing head 15 reproduces the recording data of the magnetic tape 13 before being written by the recording head 6,
The data is converted by the reproduction circuit 15 and stored in the buffer 3.

【0047】書き込み取り消し命令を受領したら、第1
の実施の実施の形態と同様に、磁気テープ13に残って
いるデータとバッファ3に格納されているデータで復元
できるか調べ、復元できるならば復元処理を行う。
When a write cancel command is received, the first
In the same manner as in the first embodiment, it is checked whether the data can be restored using the data remaining on the magnetic tape 13 and the data stored in the buffer 3, and if the data can be restored, a restoration process is performed.

【0048】具体的な動作について、図5および図9を
用いて説明する。前述したように、上位装置2からの読
み出し命令に従ってブロックNを読み出して上位装置2
へ転送する場合、ブロックNだけでなくバッファ3に入
るだけ磁気テープ13の先読みを行うため、図9(a)
に示すようにアドレス0からアドレス500までに、ブ
ロックNからブロックN+9までのデータが磁気テープ
13から再生されてバッファ3に格納される。
The specific operation will be described with reference to FIGS. As described above, the block N is read out according to the read command from the host
9A, since the magnetic tape 13 is pre-read not only in the block N but also in the buffer 3 as shown in FIG.
As shown in (2), from address 0 to address 500, data from block N to block N + 9 is reproduced from the magnetic tape 13 and stored in the buffer 3.

【0049】ブロックNのデータはバッファ3に格納さ
れるが、上位装置2に転送し終わるとクリアされる。こ
の状態で、上位装置2から磁気テープ装置1が磁気テー
プ13への書き込み命令を受けると、この実施の形態で
はバッファ3内の先読みデータをクリアし(ステップD
1)、書き込みデータであるブロックN+1’のデータ
から順次ブロックN+4’のデータまでをバッファ3内
に格納していく(ステップA11)。このときのバッフ
ァ3の記憶状態は図9(b)に模式的に示すようにな
る。
The data of the block N is stored in the buffer 3, but is cleared when the data has been transferred to the host device 2. In this state, when the magnetic tape device 1 receives a write command to the magnetic tape 13 from the host device 2, in this embodiment, the pre-read data in the buffer 3 is cleared (step D).
1) The data from the block N + 1 ', which is the write data, to the data of the block N + 4' are sequentially stored in the buffer 3 (step A11). The storage state of the buffer 3 at this time is as schematically shown in FIG.

【0050】ここで、バッファ3の空き領域は書き込み
用と下地データの保存用の2つで使うため、全記憶容量
の1/2程度とすると、続いて、バッファ3にブロック
N+5’のデータが書き込まれると、バッファ3には空
き領域がなくなるので、空き領域を作るために、バッフ
ァ3内のデータを磁気テープ13へ書き込むために、書
き込み開始位置に位置付けを行う。このとき、記録ヘッ
ド6が図5(a)のブロックNの最後の記録位置とブロ
ックN+1の最初の記録位置の間の書き込み開始位置に
くるように、再生ヘッド7と14で磁気テープ13の記
録ブロックを再生しながら磁気テープ13が記録時と逆
方向に走行されるが、再生ヘッド14がブロックN+1
を再生するまで磁気テープ13が巻き戻されるので、記
録ヘッド6が一旦上記の書き込み開始位置を通過してブ
ロックN−1方向まで至り、その後記録ヘッド6が上記
の書き込み開始位置に至るように磁気テープ13が記録
時と同じ順方向に走行制御されて停止する。このとき、
再生ヘッド14はブロックN+3の先頭記録位置にく
る。
Here, since the free space of the buffer 3 is used for two, one for writing and the other for storing background data, if the total storage capacity is set to about デ ー タ of the total storage capacity, the data of the block N + 5 ′ is subsequently stored in the buffer 3. When the data is written, there is no free space in the buffer 3. Therefore, in order to create a free space, the data in the buffer 3 is written to the magnetic tape 13 at the write start position. At this time, the recording of the magnetic tape 13 is performed by the reproducing heads 7 and 14 so that the recording head 6 is at the write start position between the last recording position of the block N and the first recording position of the block N + 1 in FIG. While the block is being reproduced, the magnetic tape 13 runs in the direction opposite to the recording direction.
Since the magnetic tape 13 is rewound until the data is reproduced, the recording head 6 passes through the write start position to reach the block N-1 direction, and then the magnetic head 13 reaches the write start position. The tape 13 is controlled to run in the same forward direction as during recording, and stops. At this time,
The reproducing head 14 comes to the head recording position of the block N + 3.

【0051】この記録開始位置への位置付けの際に、再
生ヘッド14により再生された、記録開始位置直後の所
定数のブロックのデータが再生回路15を経由してバッ
ファ3に書き込まれる。この所定数のブロックは、記録
ヘッド6と再生ヘッド14との間に存在するブロックの
数であり、ここでは2ブロックである。従って、ここで
は磁気テープ13から再生ヘッド14により順方向に再
生された、ブロックN+1とN+2のデータがバッファ
3に格納される。
At the time of positioning to the recording start position, data of a predetermined number of blocks immediately after the recording start position reproduced by the reproduction head 14 are written to the buffer 3 via the reproduction circuit 15. The predetermined number of blocks is the number of blocks existing between the recording head 6 and the reproducing head 14, and is two blocks here. Therefore, here, the data of the blocks N + 1 and N + 2 reproduced from the magnetic tape 13 by the reproducing head 14 in the forward direction are stored in the buffer 3.

【0052】上記の記録開始位置への位置付け後、記録
ヘッド6により磁気テープ13にバッファ3内の書き込
みデータであるブロックN+1’およびブロックN+
2’の各データを順次に書き込み、これにより、バッフ
ァ3内のブロックN+1’およびブロックN+2’の各
データがクリアされ、また、これと同時に、再生ヘッド
14からブロックN+3およびブロックN+4が再生さ
れるので、これらのブロックのデータがバッファ3内に
書き込まれる。この結果、バッファ3の記憶状態は図9
(c)に模式的に示すように、書き込みブロックN+
3’〜N+5’と、位置決め時に再生ヘッド14により
再生された先読みブロックN+1及びN+2と、記録ヘ
ッド6のブロックN+1’およびブロックN+2’の各
データ記録時に再生ヘッド14により磁気テープ13か
ら再生されたブロックN+3及びN+4の各データが記
憶されたものとなる。
After the positioning to the recording start position, the recording head 6 writes the blocks N + 1 ′ and N +, which are the write data in the buffer 3, on the magnetic tape 13.
2 'are sequentially written, whereby the data of the blocks N + 1' and N + 2 'in the buffer 3 are cleared, and at the same time, the reproduction head 14 reproduces the blocks N + 3 and N + 4. Therefore, the data of these blocks is written into the buffer 3. As a result, the storage state of the buffer 3 is as shown in FIG.
As schematically shown in (c), the write block N +
3 ′ to N + 5 ′, read-ahead blocks N + 1 and N + 2 reproduced by the reproducing head 14 at the time of positioning, and data reproduced from the magnetic tape 13 by the reproducing head 14 at the time of recording each data of the blocks N + 1 ′ and N + 2 ′ of the recording head 6. Each data of the blocks N + 3 and N + 4 is stored.

【0053】更に、バッファ3内のブロックN+3’が
磁気テープ13に記録ヘッド6により記録され、再生ヘ
ッド14からブロックN+5が再生されると、バッファ
3内ではブロックN+3’のデータ領域はクリアされる
が、再生されたブロックN+3のデータが書き込まれる
ので、上位装置2から入力されてくる次の書き込みデー
タを入れる場所がなくなる。そこで、バッファ3内の先
読みブロックを一部クリアし(ここではブロックN+1
のデータをクリアし)、そのクリアした領域に次の書き
込みブロックであるブロックN+6’のデータを格納す
る。この結果、バッファ3の記憶状態は図9(d)に模
式的に示すようになる。これにより、この例では、書き
込み動作中に常に4ブロック程度の先読みデータをバッ
ファ3に保持しておくことができる。
Further, when the block N + 3 'in the buffer 3 is recorded on the magnetic tape 13 by the recording head 6 and the block N + 5 is reproduced from the reproducing head 14, the data area of the block N + 3' is cleared in the buffer 3. However, since the data of the reproduced block N + 3 is written, there is no place to put the next write data input from the host device 2. Therefore, the prefetch block in the buffer 3 is partially cleared (here, block N + 1).
Is cleared), and the data of the next write block, block N + 6 ′, is stored in the cleared area. As a result, the storage state of the buffer 3 is schematically shown in FIG. As a result, in this example, it is possible to always hold the pre-read data of about four blocks in the buffer 3 during the write operation.

【0054】この実施の形態では、新たなデータを磁気
テープ13に記録する直前の磁気テープ13の位置から
再生した先読みブロックのデータをバッファ3内に書き
込めるので、先読みデータがないときに記録しても、下
地のデータを採取するために先読みさせる必要がなくな
る。最後に書き込んだところから、バッファの下地デー
タの読み込み用の領域分のデータが常に残っているの
で、すなわち、上記の実施の形態では、書き込み動作中
に常に4ブロック程度の先読みデータをバッファ3に保
持しておくことができるので、その範囲では常に復元で
きる。
In this embodiment, since the data of the pre-read block reproduced from the position of the magnetic tape 13 immediately before the new data is recorded on the magnetic tape 13 can be written in the buffer 3, the data is recorded when there is no pre-read data. Also, there is no need to pre-read the data to collect background data. Since the data for the area for reading the base data of the buffer always remains after the last writing, that is, in the above-described embodiment, about four blocks of read-ahead data are always stored in the buffer 3 during the writing operation. Since it can be retained, it can always be restored in that range.

【0055】次に、本発明の第4の実施の形態について
説明する。この第4の実施の形態は、第1の実施の形態
において、復元処理の方法を変更し、内部で復元処理を
行う構成としたものである。すなわち、第1の実施の形
態における復元処理で、磁気テープ13に記録されてい
る情報をバッファ3内に読み込むとき、バッファ3内に
入りきらなければ、書き込み開始位置に記録ヘッド6の
位置付けをし、バッファ3内のある一定量のブロックの
データを位置付けした位置から磁気テープ13に書き込
む(記録する)。この記録により、上記一定量の空き領
域がバッファ3内にできるので、続いて先程読み込みを
中止した場所に再生ヘッド7を位置付けをし直し、その
場所から再度磁気テープ13の再生を開始してその再生
ブロックのデータをバッファ3に読み込む。これを繰り
返す。再生動作の動作の中でEODを再生検出したら、
そのデータをバッファ3に書き込んで復元処理は完了す
る。
Next, a fourth embodiment of the present invention will be described. The fourth embodiment is different from the first embodiment in that the method of the restoration processing is changed and the restoration processing is performed internally. That is, when the information recorded on the magnetic tape 13 is read into the buffer 3 in the restoration processing in the first embodiment, if the information cannot be accommodated in the buffer 3, the recording head 6 is positioned at the write start position. Then, the data of a certain amount of blocks in the buffer 3 is written (recorded) on the magnetic tape 13 from the position where the data is positioned. By this recording, the fixed amount of free space is created in the buffer 3. Then, the reproducing head 7 is repositioned at the place where the reading was stopped, and the reproduction of the magnetic tape 13 is started again from that position. The data of the reproduction block is read into the buffer 3. Repeat this. If EOD is detected during playback operation,
The data is written to the buffer 3 and the restoration process is completed.

【0056】次に図5、図6を用いて、この第4の実施
の形態の動作を具体的に説明する。磁気テープに書き込
むことのできる最大ブロック長(図5(b)のL2を2
00KB、EODを書き込むのに必要な長さ(図5
(b)L1)を100KBのデータの長さに相当すると
仮定すれば、バッファ3内に300KB以上保持すれ
ば、上位装置2に転送することなく、内部で処理でき
る。バッファ3の記憶容量を512KB、現在テープに
書かれているブロック長およびこれから書き込むブロッ
ク長を50KBと仮定する。
Next, the operation of the fourth embodiment will be specifically described with reference to FIGS. The maximum block length that can be written on the magnetic tape (L2 in FIG.
00KB, the length required to write EOD (Fig. 5
Assuming that (b) L1) corresponds to a data length of 100 KB, if the data is stored in the buffer 3 at 300 KB or more, the data can be processed internally without being transferred to the host device 2. Assume that the storage capacity of the buffer 3 is 512 KB, the block length currently written on the tape and the block length to be written from now on are 50 KB.

【0057】復元処理でバッファ3の容量が一杯になる
と、図6(d)のようになる。この状態で、バッファ3
にはデータを入れずに、磁気テープ13上のブロックN
の直後の位置に記録ヘッド6を位置付ける。EODで上
書きされてしまう領域を考慮し、バッファ3内に格納さ
れているブロックN+5からブロックN+10のデータ
はそのまま保持し、バッファ3内に格納されているブロ
ックN+1からブロックN+4のデータは上記のブロッ
クNの直後の位置から記録ヘッド6により磁気テープ1
3に書き込む。その後、バッファ3内からブロックN+
1からブロックN+4のデータがクリアされる。
When the capacity of the buffer 3 becomes full in the restoration processing, the state becomes as shown in FIG. In this state, buffer 3
To the block N on the magnetic tape 13 without data.
The recording head 6 is positioned at a position immediately after the above. In consideration of the area overwritten by EOD, the data of blocks N + 5 to N + 10 stored in the buffer 3 is kept as it is, and the data of blocks N + 1 to N + 4 stored in the buffer 3 is the data of the above block. N to the magnetic tape 1
Write to 3. After that, the block N +
Data from block 1 to block N + 4 is cleared.

【0058】次に、バッファ3内の最後のブロックであ
るブロックN+10の直後の磁気テープ13上の位置に
再生ヘッド7を位置付けし、その位置から磁気テープ1
3の再生を開始し、再生ブロックのデータをバッファ3
が一杯になるまで格納する。212KBの空き領域があ
ったので、ブロックN+11からブロックN+14まで
の再生データがバッファ3に格納される。次に、前回記
録した最後のブロックN+4の記録位置の直後の磁気テ
ープ13上の位置に記録ヘッド6を位置付けて、バッフ
ァ3内に格納されているブロックN+5からブロックN
+8までの4ブロック分のデータを、上記のブロックN
+4の直後の位置から記録ヘッド6により磁気テープ1
3に書き込む。このような処理を繰り返し、読み込み動
作の動作の中でEODを検出したら、そのデータを書き
込んで復元処理は完了する。
Next, the reproducing head 7 is positioned at a position on the magnetic tape 13 immediately after the last block N + 10 in the buffer 3, and the magnetic tape 1 is moved from that position.
3 is started and the data of the reproduced block is stored in the buffer 3.
Store until is full. Since there is a free space of 212 KB, the reproduction data from block N + 11 to block N + 14 is stored in the buffer 3. Next, the recording head 6 is positioned at a position on the magnetic tape 13 immediately after the recording position of the last block N + 4 recorded last time, and the blocks N + 5 to N are stored in the buffer 3.
The data of four blocks up to +8 is stored in the block N
+4 from the position immediately after +4 by the recording head 6
Write to 3. Such processing is repeated, and when the EOD is detected in the reading operation, the data is written to complete the restoration processing.

【0059】上位装置に転送して復元する場合、大容量
のテープでは、上位装置で受けきれないおそれがあっ
た。この第4の実施の形態では内部で処理することによ
り、時間はかかるが、上位装置に影響を与えずに復元処
理を行うことができる。
When transferring and restoring to a higher-level device, there is a possibility that a high-capacity tape cannot be received by the higher-level device. In the fourth embodiment, although the processing is performed internally, it takes time, but the restoration processing can be performed without affecting the host device.

【0060】[0060]

【発明の効果】以上説明したように、本発明によれば、
所望のブロックデータを磁気テープに記録あるいは再生
するときには、所望のブロックデータだけではなく、そ
の先の複数のブロックデータもバッファに書き込み保持
しておくようにバッファの制御方法を変更したので、上
位装置から書き込み取消し命令を受領したときは、バッ
ファ内のブロックデータを用いて上書きされた部分のブ
ロックデータに置き換えることができ、よって、特別な
機構を追加することなしに、誤って書き込んでしまった
磁気テープを復元することができる。
As described above, according to the present invention,
When recording or reproducing the desired block data on the magnetic tape, the control method of the buffer was changed so that not only the desired block data but also a plurality of subsequent block data were written and held in the buffer. When a write undo command is received from the controller, the block data in the buffer can be used to replace the overwritten portion of the block data, and thus the magnetic data that has been erroneously written can be used without adding a special mechanism. The tape can be restored.

【図面の簡単な説明】[Brief description of the drawings]

【図1】本発明の第1の実施の形態の磁気テープ装置の
ブロック図である。
FIG. 1 is a block diagram of a magnetic tape device according to a first embodiment of the present invention.

【図2】本発明の第1の実施の形態における、書き込み
動作でのフローチャートである。
FIG. 2 is a flowchart of a write operation according to the first embodiment of the present invention.

【図3】本発明の第1の実施の形態における、書き込み
取り消し動作でのフローチャートである。
FIG. 3 is a flowchart of a write cancel operation according to the first embodiment of the present invention.

【図4】 本発明の第1の実施の形態における、書き込
み取り消し動作の中での上位装置へ転送する復元動作の
フローチャートである。
FIG. 4 is a flowchart of a restoring operation of transferring to a higher-level device during a write cancel operation according to the first embodiment of the present invention.

【図5】本発明の第1の実施の形態における、テープの
記録状態を示す模式図である。
FIG. 5 is a schematic diagram illustrating a recording state of a tape according to the first embodiment of the present invention.

【図6】本発明の第1の実施の形態における、バッファ
の記憶状態を示す模式図である。
FIG. 6 is a schematic diagram showing a storage state of a buffer according to the first embodiment of the present invention.

【図7】本発明の第3の実施の形態の磁気テープ装置の
ブロック図である。
FIG. 7 is a block diagram of a magnetic tape device according to a third embodiment of the present invention.

【図8】本発明の第3の実施の形態における、書き込み
動作でのフローチャートである。
FIG. 8 is a flowchart of a write operation according to the third embodiment of the present invention.

【図9】本発明の第3の実施の形態における、バッファ
の記憶状態を示す模式図である。
FIG. 9 is a schematic diagram illustrating a storage state of a buffer according to a third embodiment of the present invention.

【符号の説明】[Explanation of symbols]

1、20 磁気テープ装置 2 上位装置 3 バッファ 4 記録回路 5 再生回路 6 記録ヘッド 7、14 再生ヘッド 8 駆動回路 9 リール 10、21 テープドライブ 11 制御部 12 制御手段 13 磁気テープ 14 再生ヘッド 15 再生回路 16 記憶部 DESCRIPTION OF SYMBOLS 1, 20 Magnetic tape apparatus 2 Host apparatus 3 Buffer 4 Recording circuit 5 Reproduction circuit 6 Recording head 7, 14 Reproduction head 8 Drive circuit 9 Reel 10, 21 Tape drive 11 Control unit 12 Control means 13 Magnetic tape 14 Reproduction head 15 Reproduction circuit 16 Storage unit

Claims (6)

【特許請求の範囲】[Claims] 【請求項1】 記録時は上位装置から入力された複数の
ブロックデータを一時格納し、再生時は格納されている
ブロックデータを上位装置へ転送するバッファと、 ブロックデータを記録ヘッドにより磁気テープに記録
し、記録されたブロックデータを前記磁気テープから再
生ヘッドにより読み出すテープドライブと、 前記上位装置から所望のブロックデータの読み出し命令
を受けたときは、前記バッファ内に前記所望のブロック
データが格納されているかどうか判別し、格納されてい
るときは該所望のブロックデータを前記上位装置へ転送
し、格納されていないときは前記テープドライブを制御
して前記磁気テープから前記所望のブロックデータを再
生して前記バッファに格納した時点で前記上位装置へ該
所望のブロックデータを転送した後、該所望のブロック
データに後続する一又は二以上のブロックデータを再生
して前記バッファに順次格納し、前記上位装置から書き
込み命令を受けたときは、前記バッファ内に書き込むべ
きブロックデータが格納されているかどうか判断し、格
納されていないときは前記テープドライブを制御して前
記書き込むべきブロックデータとそれに後続する一又は
二以上のブロックデータからなる前記バッファの一定量
分のデータを前記磁気テープから再生して前記バッファ
に順次格納した後で一定時間が経過するか、前記バッフ
ァの吐き出しが必要な命令を受領するかしたときに読み
出し、前記テープドライブに入力して前記磁気テープに
記録すると共に記録ブロックデータを前記バッファ内か
らクリアする制御手段とを有する磁気テープ装置であっ
て、前記制御手段は、前記上位装置から書き込み取消し
命令を受領したときは、書き込みブロックデータのうち
最初に受け取ったブロックデータが前記バッファに残っ
ているときは該書き込みブロックデータの前記磁気テー
プへの書き込み予約をクリアし、前記最初に受け取った
ブロックデータが前記バッファに残っていないときは、
前記磁気テープ上の前記書き込みブロックデータの先の
記録ブロックデータを再生して正常に再生された最初の
ブロックデータと前記バッファ内に保持されているブロ
ックデータとが連続しているかどうか判断し、連続して
いるときは前記磁気テープ上の前記正常に再生された最
初のブロックデータの先の記録ブロックデータを、デー
タ終端信号を検出するまで再生して、前記バッファ内に
書き込んだ後、前記テープドライブを制御して前記記録
ヘッドを前記磁気テープ上の前記書き込みデータのうち
最初に受け取ったブロックデータの直前の記録位置に位
置付けた後、該記録位置から前記最初に受け取ったブロ
ックデータの直前の記録ブロックに続く順番の前記バッ
ファ内に保持されているブロックデータと前記再生され
て格納されたブロックデータとを順番に該バッファから
読み出して前記磁気テープに記録することを特徴とする
磁気テープ装置。
1. A buffer for temporarily storing a plurality of block data input from a host device during recording, and a buffer for transferring the stored block data to a host device during reproduction, and a block head for transferring the block data to a magnetic tape by a recording head. A tape drive for recording and reading the recorded block data from the magnetic tape by a reproducing head; and when receiving a command to read desired block data from the host device, the desired block data is stored in the buffer. Discriminates whether the block data is stored, and transfers the desired block data from the magnetic tape by controlling the tape drive when the block data is not stored. After transferring the desired block data to the higher-level device at the time when the block data is stored in the buffer, One or two or more block data subsequent to the desired block data are reproduced and sequentially stored in the buffer, and when a write command is received from the host device, the block data to be written is stored in the buffer. It is determined whether or not the data is stored, and the tape drive is controlled to reproduce a certain amount of data from the magnetic tape in the buffer including the block data to be written and one or more subsequent block data. Then, when a predetermined time has elapsed after the data is sequentially stored in the buffer or when a command that requires the buffer to be ejected is received, the data is read out, input to the tape drive and recorded on the magnetic tape, and the recording block is recorded. Control means for clearing data from the buffer. The control means, when receiving a write cancel command from the host device, when the first received block data of the write block data remains in the buffer, transfers the write block data to the magnetic tape. When the write reservation is cleared and the first received block data is not left in the buffer,
It is determined whether or not the first block data normally reproduced by reproducing the recording block data ahead of the write block data on the magnetic tape and the block data held in the buffer are continuous. When the data is read, the recording block data preceding the normally reproduced first block data on the magnetic tape is reproduced until a data end signal is detected, and written in the buffer. To position the recording head at the recording position immediately before the first received block data of the write data on the magnetic tape, and then record the recording block immediately before the first received block data from the recording position. And the reproduced and stored block data stored in the buffer in the order following the block data. Magnetic tape unit, characterized in that sequentially and Kudeta read from the buffer is recorded on the magnetic tape.
【請求項2】 前記制御手段は、前記磁気テープ上の前
記正常に再生された最初のブロックデータの先の記録ブ
ロックデータを再生して、その再生データを前記バッフ
ァ内に書き込み、前記データ終端信号を検出することな
く該バッファの容量一杯まで前記再生データが書き込ま
れたときは、該バッファ内のブロックデータを転送した
後、該データ終端信号を検出するまで前記磁気テープの
再生を継続して、その再生データを前記上位装置に転送
して該上位装置により復元処理を行わせた後、前記テー
プドライブを制御して前記記録ヘッドを前記磁気テープ
上の前記書き込みデータのうち最初に受け取ったブロッ
クデータの直前の記録位置に位置付けた後、前記上位装
置から復元処理されたブロックデータを受領して前記位
置付けた記録位置から順番にブロックデータを前記磁気
テープに記録することを特徴とする請求項1記載の磁気
テープ装置。
2. The control means reproduces recording block data preceding the normally reproduced first block data on the magnetic tape, writes the reproduced data in the buffer, and outputs the data end signal. When the reproduction data is written to the full capacity of the buffer without detecting the data, after transferring the block data in the buffer, the reproduction of the magnetic tape is continued until the data end signal is detected. After transferring the reproduced data to the higher-level device and allowing the higher-level device to perform a restoration process, the tape drive is controlled to cause the recording head to move the recording data to the first block data of the write data on the magnetic tape. After receiving the block data restored from the higher-level device after positioning at the recording position immediately before 2. The magnetic tape device according to claim 1, wherein the block data is recorded on the magnetic tape in order from the beginning.
【請求項3】 記録時は上位装置から入力された複数の
ブロックデータを一時格納し、再生時は格納されている
ブロックデータを上位装置へ転送するバッファと、 磁気テープにブロックデータを記録ヘッドにより記録
し、記録されたブロックデータを前記磁気テープから再
生ヘッドにより読み出すテープドライブと、 前記上位装置から所望のブロックデータの読み出し命令
を受けたときは、前記バッファ内に前記所望のブロック
データが格納されているかどうか判別し、格納されてい
るときは該所望のブロックデータを前記上位装置へ転送
し、格納されていないときは前記テープドライブを制御
して前記磁気テープから前記所望のブロックデータを再
生して前記バッファに格納した時点で前記上位装置へ該
所望のブロックデータを転送した後、該所望のブロック
データに後続する一又は二以上のブロックデータを再生
して前記バッファに順次格納し、前記上位装置から書き
込み命令を受けたときは、前記バッファ内に書き込むべ
きブロックデータが格納されているかどうか判断し、格
納されていないときは前記テープドライブを制御して前
記書き込むべきブロックデータとそれに後続する一又は
二以上のブロックデータからなる前記バッファの一定量
分のデータを前記磁気テープから再生して前記バッファ
に順次格納した後で一定時間が経過するか、前記バッフ
ァの吐き出しが必要な命令を受領するかしたときに読み
出し、前記テープドライブに入力して前記磁気テープに
記録すると共に記録ブロックデータを前記バッファ内か
らクリアする制御手段とを有する磁気テープ装置であっ
て、前記制御手段は、前記上位装置から書き込み取消し
命令を受領したときは、書き込みブロックデータにより
上書きされる前の前記磁気テープ記録ブロックデータが
前記バッファに残っているかどうか調べ、残っていると
きは該バッファ内のブロックデータを保持したまま、前
記磁気テープの先頭から前記書き込みブロックデータの
うち最初に受け取ったブロックデータの直前までのブロ
ックデータを再生して前記バッファ内に書き込んだ後、
前記テープドライブを制御して前記記録ヘッドを前記磁
気テープ上の前記バッファ内の最後の順番のブロックデ
ータの直後の記録位置に位置付け、該バッファ内のブロ
ックデータを逆順でテープ始端に向かって走行する磁気
テープに記録することを特徴とする磁気テープ装置。
3. A buffer for temporarily storing a plurality of block data input from a higher-level device during recording, and a buffer for transferring the stored block data to a higher-level device during reproduction, and a recording head for recording the block data on a magnetic tape. A tape drive for recording and reading the recorded block data from the magnetic tape by a reproducing head; and when receiving a command to read desired block data from the host device, the desired block data is stored in the buffer. Discriminates whether the block data is stored, and transfers the desired block data from the magnetic tape by controlling the tape drive when the block data is not stored. After transferring the desired block data to the higher-level device at the time when the block data is stored in the buffer, One or two or more block data subsequent to the desired block data are reproduced and sequentially stored in the buffer, and when a write command is received from the host device, the block data to be written is stored in the buffer. It is determined whether or not the data is stored, and the tape drive is controlled to reproduce a certain amount of data from the magnetic tape in the buffer including the block data to be written and one or more subsequent block data. Then, when a predetermined time has elapsed after the data is sequentially stored in the buffer or when a command that requires the buffer to be ejected is received, the data is read out, input to the tape drive and recorded on the magnetic tape, and the recording block is recorded. Control means for clearing data from the buffer. When receiving the write cancel command from the host device, the control unit checks whether the magnetic tape recording block data before being overwritten by the write block data remains in the buffer. While holding the block data in the buffer, after reproducing the block data from the beginning of the magnetic tape to immediately before the first received block data of the write block data and writing it in the buffer,
By controlling the tape drive, the recording head is positioned at a recording position on the magnetic tape immediately after the last-ordered block data in the buffer, and the block data in the buffer runs in the reverse order toward the beginning of the tape. A magnetic tape device for recording on a magnetic tape.
【請求項4】 前記制御手段は、前記バッファ内のブロ
ックデータを保持したまま、前記磁気テープの先頭から
ブロックデータを再生し、データ終端信号を検出するこ
となく該バッファの容量一杯まで前記再生データが書き
込まれたときは、前記磁気テープの先頭から前記書き込
みブロックデータのうち最初に受け取ったブロックデー
タの直前までのブロックデータが前記バッファ内に納ま
るかチェックし、該バッファ内に納まるときには前記磁
気テープの先頭から前記書き込みブロックデータのうち
最初に受け取ったブロックデータの直前までのブロック
データを再生して該バッファ内に書き込むことを特徴と
する請求項3記載の磁気テープ装置。
4. The control means reproduces block data from the beginning of the magnetic tape while retaining the block data in the buffer, and detects the reproduced data until the buffer capacity is full without detecting a data end signal. Is written, it is checked whether block data from the beginning of the magnetic tape to immediately before the first received block data of the write block data fits in the buffer, and if the block data fits in the buffer, the magnetic tape 4. The magnetic tape apparatus according to claim 3, wherein the block data from the beginning of the block data to the block data immediately before the first received block data among the write block data is reproduced and written in the buffer.
【請求項5】 記録時は上位装置から入力された複数の
ブロックデータを一時格納し、再生時は格納されている
ブロックデータを上位装置へ転送するバッファと、 磁気テープにブロックデータを記録ヘッドにより記録
し、記録されたブロックデータを前記磁気テープから第
1の再生ヘッドにより読み出すと共に、前記記録ヘッド
に対し前記第1の再生ヘッドと反対側のテープ上流側に
所定距離離れて設置された第2の再生ヘッドを有するテ
ープドライブと、 前記上位装置から所望のブロックデータの読み出し命令
を受けたときは、前記バッファ内に前記所望のブロック
データが格納されているかどうか判別し、格納されてい
るときは該所望のブロックデータを前記上位装置へ転送
し、格納されていないときは前記テープドライブを制御
して前記磁気テープから前記所望のブロックデータを再
生して前記バッファに格納した時点で前記上位装置へ該
所望のブロックデータを転送した後、該所望のブロック
データに後続する一又は二以上のブロックデータを再生
して前記バッファに順次格納し、前記上位装置から書き
込み命令を受けたときは、前記バッファ内のブロックデ
ータをクリアした後書き込むべきブロックデータを順次
に、前記バッファの一定量分だけ該バッファに格納した
後で一定時間が経過するか、前記バッファの吐き出しが
必要な命令を受領するかしたときに読み出して前記テー
プドライブに入力して前記磁気テープに記録すると共に
記録ブロックデータを前記バッファ内からクリアし、前
記バッファに空き容量がなくなったときは前記記録ヘッ
ドを該バッファ内の最も先に書き込まれる順番のブロッ
クデータのテープ記録開始位置に位置付ける際に、前記
第2の再生ヘッドにより該記録開始位置付近の記録ブロ
ックデータを再生して該バッファに書き込んだ後、該記
録ヘッドにより前記最も先に書き込まれる順番のブロッ
クデータから順番に該バッファより読み出した一定量の
ブロックデータを該磁気テープに記録すると同時に、前
記第2の再生ヘッドにより該磁気テープから再生したブ
ロックデータを前記バッファに書き込む制御手段とを有
する磁気テープ装置であって、前記制御手段は、前記上
位装置から書き込み取消し命令を受領したときは、書き
込みブロックデータのうち最初に受け取ったブロックデ
ータが前記バッファに残っているときは該書き込みブロ
ックデータの前記磁気テープへの書き込み予約をクリア
し、前記最初に受け取ったブロックデータが前記バッフ
ァに残っていないときは、前記磁気テープ上の前記書き
込みブロックデータの先の記録ブロックデータを再生し
て正常に再生された最初のブロックデータと前記バッフ
ァ内に保持されているブロックデータとが連続している
かどうか判断し、連続しているときは前記磁気テープ上
の前記正常に再生された最初のブロックデータの先の記
録ブロックデータを、データ終端信号を検出するまで再
生して、前記バッファ内に書き込んだ後、前記テープド
ライブを制御して前記記録ヘッドを前記磁気テープ上の
前記書き込みデータのうち最初に受け取ったブロックデ
ータの直前の記録位置に位置付けた後、該記録位置から
前記最初に受け取ったブロックデータの直前の記録ブロ
ックに続く順番の前記バッファ内に保持されているブロ
ックデータと前記再生されて格納されたブロックデータ
とを順番に該バッファから読み出して前記磁気テープに
記録することを特徴とする磁気テープ装置。
5. A buffer for temporarily storing a plurality of block data input from a host device during recording, and a buffer for transferring the stored block data to the host device during reproduction, and a recording head for recording the block data on a magnetic tape. A first read head reads and records the recorded block data from the magnetic tape, and a second read head disposed at a predetermined distance from the recording head upstream of the tape opposite to the first read head. A tape drive having a reproducing head of: when receiving a command to read desired block data from the higher-level device, determining whether or not the desired block data is stored in the buffer; The desired block data is transferred to the higher-level device, and when it is not stored, the tape drive is controlled to When the desired block data is reproduced from the magnetic tape and stored in the buffer, the desired block data is transferred to the host device, and then one or more block data subsequent to the desired block data is reproduced. Then, when a write command is received from the higher-level device, the block data in the buffer is cleared, and then the block data to be written is sequentially stored in the buffer for a fixed amount of the buffer. When a certain time has elapsed after the completion of the operation, or when a command that requires the buffer to be ejected is received, the data is read out, input to the tape drive and recorded on the magnetic tape, and the recording block data is cleared from the buffer. When the buffer runs out of free space, the recording head is moved to the highest position in the buffer. When positioning the block data in the order of writing to the tape recording start position, the second reproduction head reproduces the recording block data near the recording start position and writes it to the buffer, and then the recording head records the most At the same time, a fixed amount of block data read from the buffer is sequentially recorded on the magnetic tape from the block data in the order of writing first, and at the same time, the block data reproduced from the magnetic tape by the second reproducing head is written to the buffer. A magnetic tape device having control means, wherein the control means, when receiving a write cancel command from the higher-level device, when the first received block data of the write block data remains in the buffer. Write of the write block data to the magnetic tape If the first block data that has been received is cleared and the first received block data does not remain in the buffer, the first block data that has been normally reproduced by reproducing the recording block data preceding the write block data on the magnetic tape. And whether the block data held in the buffer is continuous or not, and when continuous, the recording block data ahead of the first block data normally reproduced on the magnetic tape, After the data is reproduced until the data end signal is detected and written into the buffer, the tape drive is controlled to control the recording head to record the data immediately before the first received block data among the write data on the magnetic tape. After positioning at the position, the recording block immediately before the first received block data from the recording position Ku magnetic tape unit, characterized in that the order the reading of the block data stored is the reproduction block data held in the buffer from the buffer in the order of recording on the magnetic tape.
【請求項6】 前記制御手段は、前記磁気テープ上の前
記正常に再生された最初のブロックデータの先の記録ブ
ロックデータを再生して、その再生データを前記バッフ
ァ内に書き込み、前記データ終端信号を検出することな
く該バッファの容量一杯まで前記再生データが書き込ま
れたときは、前記テープドライブを制御して前記記録ヘ
ッドを前記磁気テープ上の前記書き込みデータのうち最
初に受け取ったブロックデータの直前の記録位置に位置
付けた後、前記バッファ内のブロックデータを順番に所
定量だけ前記磁気テープに記録した後、前記再生ヘッド
を前記バッファ内の最後の順番のブロックデータのテー
プ記録位置の直後に位置付けて該磁気テープの再生を所
定量のブロックデータが再生されるまで行うと共に、そ
の再生ブロックデータを前記バッファに書き込むこと
を、前記データ終端信号を検出するまで繰り返すことを
特徴とする請求項1記載の磁気テープ装置。
6. The control means reproduces recording block data preceding the normally reproduced first block data on the magnetic tape, writes the reproduced data in the buffer, and outputs the data end signal. When the reproduced data is written to the full capacity of the buffer without detecting the data, the tape drive is controlled to move the recording head immediately before the first received block data of the write data on the magnetic tape. Then, after the block data in the buffer is sequentially recorded on the magnetic tape by a predetermined amount, the reproducing head is positioned immediately after the tape recording position of the last-ordered block data in the buffer. The magnetic tape is reproduced until a predetermined amount of block data is reproduced, and the reproduced block data is reproduced. 2. The magnetic tape device according to claim 1, wherein writing data to the buffer is repeated until the data end signal is detected.
JP11954899A 1999-04-27 1999-04-27 Magnetic tape unit Expired - Fee Related JP3451978B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP11954899A JP3451978B2 (en) 1999-04-27 1999-04-27 Magnetic tape unit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP11954899A JP3451978B2 (en) 1999-04-27 1999-04-27 Magnetic tape unit

Publications (2)

Publication Number Publication Date
JP2000311470A true JP2000311470A (en) 2000-11-07
JP3451978B2 JP3451978B2 (en) 2003-09-29

Family

ID=14764044

Family Applications (1)

Application Number Title Priority Date Filing Date
JP11954899A Expired - Fee Related JP3451978B2 (en) 1999-04-27 1999-04-27 Magnetic tape unit

Country Status (1)

Country Link
JP (1) JP3451978B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11437070B1 (en) 2021-09-10 2022-09-06 International Business Machines Corporation Repositioning using cut and paste segments

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11437070B1 (en) 2021-09-10 2022-09-06 International Business Machines Corporation Repositioning using cut and paste segments

Also Published As

Publication number Publication date
JP3451978B2 (en) 2003-09-29

Similar Documents

Publication Publication Date Title
JP3870215B1 (en) Data writing / reading control method for tape recorder
JP5506926B2 (en) Tape storage device and writing method thereof
JP5567260B2 (en) Apparatus and method for writing data to tape medium
JP2002170342A (en) Method for recording write-once type optical disk
EP1684288B1 (en) Information recorder, information recording method, and recording medium containing program
JP3451978B2 (en) Magnetic tape unit
US6108289A (en) Optical disc recording apparatus for overwriting information on a previously recorded packet of an optical disc
EP1035545A1 (en) Recording device and method, reproducing device and method, and recording medium
JPH0876989A (en) Electronic apparatus driven by program and rewriting method for program
US5886841A (en) Apparatus and method for copying data between tape streamers which provides an indication of a difference in the amount of data requested to be copied and the amount of data sent
JP2722744B2 (en) Digital data recording / reproducing device
JPH0782708B2 (en) Additional data writing method
JPH0721070A (en) Signal processor
KR20010099983A (en) Method of and device for recording information
JP5044822B2 (en) Apparatus and method for writing data to tape medium
US6735156B2 (en) Recording method for rewritable optical disk
JPH04285783A (en) System for managing magnetic tape storage device
JP2673466B2 (en) Data processing device
JP2719975B2 (en) Data recording method in magnetic recording / reproducing device
JP4053244B2 (en) Information recording / reproducing system and information recording / reproducing method
JP2001312376A (en) Rotary medium storage device and rotary medium recording control method
JPH08180603A (en) Magnetic tape processing device
JP3871839B2 (en) Information recording / reproducing device
JP2904077B2 (en) Magnetic disk drive
JPH09251757A (en) Data recording method

Legal Events

Date Code Title Description
FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20070718

Year of fee payment: 4

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20080718

Year of fee payment: 5

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20090718

Year of fee payment: 6

LAPS Cancellation because of no payment of annual fees