A medium storage apparatus writes data for stream type commands on a
medium, and improves the reliability of the write data while maintaining
the execution time of the commands. The apparatus has a buffer for
storing the write data of the write stream type commands, a controller
for sequentially writing the data of the buffer to the medium by a head,
and a processing unit for skipping the writing of erred sectors for
continuing the processing which normally ends if an error occurs, and
writing the data to the skipped sector after command execution. By this,
the error is corrected such that the medium is correctly read in the next
and later read processing, while maintaining the write time specified by
the command.