Giter VIP home page Giter VIP logo

twonote / python-mt-st Goto Github PK

View Code? Open in Web Editor NEW
16.0 3.0 5.0 26 KB

(Anyone use tape drive today? Expect no star for this lol) Controlling magnetic tape drives under Linux from Python ✨🍰✨

Home Page: https://twonote.github.io/python-mt-st/

License: GNU Lesser General Public License v2.1

Makefile 2.81% Python 97.19%
python storage magnetic-tape archiving hardware utilities system-administration mt-st mt-gnu linux

python-mt-st's Introduction

PyPI version

A magnetic tape drive controller ✨🍰✨

Screenshot

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

  1. Linux/Python 3
  2. The current version is wrapping GNU tools. Make sure mt-gnu/mt-st/sg_logs is in your execution path.
  3. Root privilege is necessary for operating a magnetic tape drive.
  4. You will need either a real tape drive or use mhvtl as a simulate tape drive.

Install

  1. $ cd [project_home]
  2. $ pip install .

Tape Drive Configuration

  1. You can find out what tape devices you have by this guide.
  2. 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

  1. You need either a real tape drive or mhvtl for simulation.
  2. After tape drive is ready, update tape drive information in test/tape_conf.py
  3. run test cases by $ make test

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.