A magnetic tape drive controller ✨🍰✨
A Python module for controlling magnetic tape drives under Linux. The module can perform tape drive operation, just like mt variants (mt-st, mt-gnu, etc.) under Unix-like OSs. For example, a user can rewind, forward/backward space, erase the cartridge, and so on. The current implementation is just a wrapper of mt-gnu. In the future, we will move to communicate with Linux st driver directly via ioctl instead.
Usage
[TODO]
Prerequisites
- Linux/Python 3
- The current version is wrapping GNU tools. Make sure mt-gnu/mt-st/sg_logs is in your execution path.
- Root privilege is necessary for operating a magnetic tape drive.
- You will need either a real tape drive or use mhvtl as a simulate tape drive.
Install
$ cd [project_home]
$ pip install .
Tape Drive Configuration
- You can find out what tape devices you have by this guide.
- Ensuring that the tape modes are properly set by following commands: (Assume your tape drive is in /dev/nst0)
- mt -f /dev/nst0 stoptions buffer-writes async-writes read-ahead
- mt -f /dev/nst0 defblksize 0
Testing
- You need either a real tape drive or mhvtl for simulation.
- After tape drive is ready, update tape drive information in
test/tape_conf.py
- run test cases by
$ make test