Coder Social home page Coder Social logo

tapeimgr's People

Contributors

bitsgalore avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

tapeimgr's Issues

Add tool that creates summary CSV file of dir that contains multiple tapes

This utility should traverse all 1st-order subdirs, look for a tapeimgr metadata file (naming based on config file, with option to override to user-defined name), and create a summary file in CSV format that lists, for each tape:

  • tape directory file path (relative to parent dir)
  • identifier
  • description
  • acquisitionStart
  • acquisitionEnd
  • successFlag

Support for tapes that were written in variable-block mode?

Apparently block size can be variable within a file that's written to tape, see:

https://github.com/torvalds/linux/blob/master/Documentation/scsi/st.rst

In variable block mode, the byte count in write() determines the size
of the physical block on tape. When reading, the drive reads the next
tape block and returns to the user the data if the read() byte count
is at least the block size. Otherwise, error ENOMEM is returned.

Don't know how common this is, but this is something to keep in mind if tapeimgr fails on a tape. In theory support for variable-block tapes could be added by reading 1-block at a time, and then do a new blockSize estimation once a block results in read errors.

TODO: see if variable-block tapes can be emulated with mhvtl, and use that for testing.

It also implies that the 'filll failed blocks' option is likely to yield corrupted content for variable-block tapes.

See also:

https://unix.stackexchange.com/a/366217/187090

and:

https://www.mkssoftware.com/docs/man4/tape.4.asp

which says:

SCSI tape drives can support variable block mode, fixed block mode, or both. Older drives typically support only fixed block mode. Newer drives often either support variable block mode only, or both variable block and fixed block modes.

So if true this means older tapes are unlikely to be affected.

Move getConfiguration() in gui.py and cli.py to Tape class

The exact same function is now replicated in both cli.py and gui.py:

def getConfiguration(self):

def getConfiguration(self):

It would be better to move it to the Tape class. This would require some changes to the Tape class and how it is called by gui.py and cli.py. In particular:

  • Define default values for all Tape class arguments
  • Create a Tape class instance before Submit function is called
  • Then use additional function calls to update the Tape instance variables.

Update documentation

  • New annotation options / interface
  • Metadata output file
  • New items in configuration file
  • Default dir in config file

Running tapeimgr in GUI mode on BitCurator / Ubuntu 18.04LTS (Bionic)

The current launcher uses gksudo to run tapeimgr as root. But gksudo is not installed by default on BitCurator / Ubuntu 18.04LTS (Bionic). BitCurator does have the pkexec tool (which it uses to launch Guymager as root), but running the command:

pkexec tapeimgr

Results in this error:

_tkinter.TclError: no display name and no $DISPLAY environment variable

It seems that this not a bug, but a result of the pkexec/PolicyKit policy settings. See also:

https://groups.google.com/forum/#!topic/comp.lang.python/s4WMWIdkXMY

More on differences between pkexec and gksudo:

https://askubuntu.com/questions/78352/when-to-use-pkexec-vs-gksu-gksudo

And specifically on Python:

https://askubuntu.com/questions/288087/can-i-use-pkexec-in-a-python-script-or-a-desktop-file

Add I/O checks

IOError, PermissionError for log file; check if dirOut already contains files, etc.

ERROR - 'int' object is not callable at end of run

Sometime the following error occurs at the end of a tapeimgr run:

2018-12-04 14:34:48,206 - ERROR - 'int' object is not callable
Traceback (most recent call last):
  File "/home/johan/.local/lib/python3.5/site-packages/tapeimgr/gui.py", line 341, in main
    time.sleep(0.1)
TypeError: 'int' object is not callable

Ther error refers to the following line (sleep value for main loop in GUI):

 time.sleep(0.1)

Repeatedly reads only first block

Trying to recover old DDS-90 tapes on a Sony DAT drive. Keeps reading only the first 32K block. I let it run on a tape and stopped it when the first 40+ .dd files were identical. Tried a couple others and get either this or it just keeps increasing the test size and never reads a block.

Installed fresh Ubuntu 20.x and kept using apt-get until it ran.

Verify code for Fill Failed blocks data entry + reset_gui

Current code:

self.fillblocks_entry = tk.Checkbutton(self, variable=self.tape.fillBlocks)

Shouldn't this be:

self.fillblocks_entry = tk.Checkbutton(self, variable=self.tape.fBlocks)

Also code in reset_gui doesn't look quit right. See also omimgr.

Additional check on dd exit status after each file/session?

For DDS-3 tape, fsr exit status after 3 sessions is 0, but subsequent reads with dd result in:

dd: error reading '/dev/nst0': Input/output error
0+0 records in
0+0 records out
0 bytes copied, 0.0206987 s, 0.0 kB/s

Result is that tapeimgr get stuck in an infinite loop, producing 0-byte files for each iteration. Unclear if cause is tape, reader or something else. A possible fix is to do a check on dd's exit status, and quit if it isn't 0 (but this could have some unintended side-effects).

Support user installs

In that case:

Global install goes to:

/usr/local/lib/python3.5/dist-packages/

User install goes to:

/home/johan/.local/lib/python3.5/site-packages/

So rule, sth like:

  • If packageDir in $HOME :

    • configuration to ~/.config/tapeimgr directory
    • menu entry in ~/.local/share/applications
    • desktop launcher to ~/Desktop
  • Else:

    • configuration to /etc/tapeimgr directory
    • menu entry in /usr/share/applications
    • desktop launcher to ~/Desktop

Packages do not match the hashes from the requirements file.

When attempting to install this tape imager using the command
sudo install pip3 tapeimgr
I encounter this error.
Screenshot_14
I'm running Mint 19.3 64-bit MATE.
I copied the error into a note because it shows up as red text in the terminal and is difficult to read.
I'm not sure how to continue.

Report imaging status at end of each run

Would need an overall success/fail flag, based on the dd / mt exit codes. If fail, notify user via pop-up at end of imaging run (and refer to log file for details)

Package with Pypi

Note: tapeimgr needs root access, so menu/desktop launcher command should be sth like gksudo tapeimgr. This might need some kind of post-install hook.

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.