smc_mount() of rmcd - Mounting a volume in a SCSI compatible library

Find the volume
Move medium

smcmount() called by main() of mounttape - Mounting a volume in a SCSI compatible library

Ask rmcd to mount the volume

While number of retries has not been exceeded loop
  Ask rmcd for the geometry of the library
  Translate drive ordinal into element address
  Read element status of drive
End loop

While tape drive does not report volume loop
  Check drive read
End loop

smc_dismount() of rmcd - Dismounting a volume in a SCSI compatible library

While drive is not unloaded and the maximum number of element reads has not been reached
  Read element status of drive
  Increment number of reads
  If medium is not present then return RBT_OK
  Sleep a moment -- Bad algorithm!
End loop

If drive still not unloaded then return ERROR

If the identifier of the "drive unloaded" volume is not the expected one then return ERROR

Move medium

While volume is not in a slot loop
  Find the volume
  Sleep 2
end loop

main() of rlstape - Dismounting a volume in a SCSI compatible library

Check the SCSI tape-alerts page of the tape drive for alerts
Send MTIOCGET to the st driver and check that the drive contains a volume by testing the result for GMT_ONLINE
Unload the drive by sending MTOFFL to the st driver
Requests rmcd to dismount the volume