A detachable storage unit is connected to host equipment in a computer system
and
holds an ejectable storage medium. The storage unit has a connection detector that
detects whether or not the storage unit is connected to the host equipment, and
a storage medium detector that detects the presence of a storage medium within
the storage unit. A medium ejection instructor sends a medium ejection instruction
to an automatic medium ejection mechanism upon receiving information that indicates
that the storage medium might be moved. The storage medium is then ejected from
the storage unit which prevents damage caused by the storage medium colliding with
internal components of the storage unit while the storage unit is being moved.