A method and apparatus for handling multi-volume datasets in a tape
storage system are disclosed. In response to a write request for a
multi-volume dataset, the information of the multi-volume dataset are
captured by intercepting and deciphering a set of volume mount commands.
Otherwise, the information of the multi-volume dataset are captured by
snooping header information from a previous volume listed in a header of
the multi-volume dataset. A chain of logical volume names that belongs to
the multi-volume dataset is then built. Finally, the chain of logical
volume names is then stored in a chain database.