Module for controlling magnetic tape drives under Linux from Python
Project description
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file python-mt-st-3rdupdate-0.2.0.post20220816.tar.gz.
File metadata
- Download URL: python-mt-st-3rdupdate-0.2.0.post20220816.tar.gz
- Upload date:
- Size: 14.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f7a3d19565103b340f18126125b1179dbc0ee58eb7be6b9f9e7b1a55ea9e2d6c
|
|
| MD5 |
c7b7635f02f9583d51192ce3f175763d
|
|
| BLAKE2b-256 |
72daa79a4a524f6709cb4f10687b674764f47546da41fff0ef2b3d12bcd66a45
|