Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Seek/tell relies on scsi2logical option #1

Open
immesys opened this issue Aug 27, 2023 · 3 comments
Open

Seek/tell relies on scsi2logical option #1

immesys opened this issue Aug 27, 2023 · 3 comments
Assignees
Labels
documentation Improvements or additions to documentation enhancement New feature or request

Comments

@immesys
Copy link

immesys commented Aug 27, 2023

This is a really great program. I'm busy getting familiar with it, but I really appreciate the thoughtful UI: serving the tape over FTP server is actually extremely handy for me because I need to back up files from a different machine to the one the tape drive is attached to.

On my drive, however, stfs operation initialize or stfs operation archive panics with input/output error. I traced this down to the fact that seek/tell do not work on the drive (even using the mt command from mt-st package) until I run sudo mt -f /dev/nst0 stsetoptions scsi2logical. This seems to persist until the machine reboots.

Did you hit this at all? I can try adding in the syscall to set this parameter as part of MagneticTapeIO methods? Based on strace, all the mt command boils down to is an MTIOCTOP ioctl. And the flag seems to be defined here so I could probably work out what the full ioctl needs to be.

But I figured I'd ask, because you are likely a lot more familiar with how to do ioctls to tape drives than I am.

@pojntfx pojntfx self-assigned this Sep 11, 2023
@pojntfx pojntfx added the documentation Improvements or additions to documentation label Sep 11, 2023
@pojntfx
Copy link
Owner

pojntfx commented Sep 11, 2023

Hmm, that is a really good point. I'm not sure if adding it as part of the CLI though is the right idea - after all, this isn't something that should be run with every command or every time stfs is run, only once for the setup. How do you feel about me adding it to the documentation instead? I've been working on a similar project that exposes tapes as block devices recently (https://github.com/pojntfx/tapisk) and there I plan on doing the same :)

@immesys
Copy link
Author

immesys commented Sep 11, 2023

Yeah, adding something to the docs makes sense as an alternative. Perhaps also the app could catch the error and return an augmented error that says something like "error ... (you might need to enable ... see docs)"

@pojntfx pojntfx added the enhancement New feature or request label Sep 12, 2023
@pojntfx
Copy link
Owner

pojntfx commented Sep 12, 2023

That def. sounds like a good idea! I'm sure that we can add a "check" before we mount the FS and exit earlier!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants