You are not logged in.

#1 2014-01-06 01:21:48

lateo
Member
Registered: 2014-01-06
Posts: 8

[SOLVED] magnetic tape software

Hi guys,

Got my hands on some nice hardware for my toy-server-at-home : an HP StorageWorks Ultrium 1760.
That's a SCSI magnetic tape backup drive. The hardware is recognized.

My problem is that i just can't find the usual good old magnetic tape management software for unix/linux : mt.
Is it outdated and replaced? If so, what should i use to operate such hardware? Read/Write/Rewind the tape.
Or maybe... i can't use the hardware out of the box with arch and have to look for and compile code from another distro?

Any help appreciated.

Last edited by lateo (2014-01-11 05:30:01)

Offline

#2 2014-01-06 01:27:27

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,808

Re: [SOLVED] magnetic tape software

I always thought tar was the canonical tape manager in *nix


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#3 2014-01-06 01:28:53

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: [SOLVED] magnetic tape software

I always though the same as ewaller since supposedly 'tar' is short for 'tape archive'.  But I have never actually used a magnetic tape drive...

Offline

#4 2014-01-06 01:32:16

HalosGhost
Forum Moderator
From: Twin Cities, MN
Registered: 2012-06-22
Posts: 2,095
Website

Re: [SOLVED] magnetic tape software

Well, I found an RPM for mt-st (which is the package that provides the mt and st binaries). I don't believe it's packaged for Arch yet (either officially or in the ALUR). But it shouldn't be too hard to do so.

Here's the link for you. There are a couple links on that page for the source archive. Here's one of them.

All the best,

-HG

Last edited by HalosGhost (2014-01-06 01:34:33)

Offline

#5 2014-01-06 01:33:01

2ManyDogs
Forum Fellow
Registered: 2012-01-15
Posts: 4,645

Re: [SOLVED] magnetic tape software

Here are the Slackware "mt" packages:
http://packages.slackware.com/?r=slackw … i486-2.txz
http://packages.slackware.com/?r=slackw … 6_64-2.txz

Last edited by 2ManyDogs (2014-01-06 01:35:37)

Offline

#6 2014-01-06 01:59:25

progandy
Member
Registered: 2012-05-17
Posts: 5,209

Re: [SOLVED] magnetic tape software


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Offline

#7 2014-01-06 03:26:10

lateo
Member
Registered: 2014-01-06
Posts: 8

Re: [SOLVED] magnetic tape software

ewaller wrote:

I always thought tar was the canonical tape manager in *nix

nope, it's used in conjonction with mt : prepare stuff with tar, then push it to the tape with mt. and vice versa.
You just can't rewind or find out "where the hell am i" on the tape with tar ;-)
And old guys usually use cpio instead of tar for this kind of task.

WonderWoofy wrote:

I always though the same as ewaller since supposedly 'tar' is short for 'tape archive'.  But I have never actually used a magnetic tape drive...

and mt is short for "magnetic tape" smile

@ others :
yup couldn't find any package related to magnetic tapes, even in AUR.
Guess i'll have to compile.

Thanks for the links.
for reference, this might also be of use : https://github.com/Distrotech/mt-st


Guess Arch isn't used much in production environments where you need to keep archives for years... :'(

Last edited by lateo (2014-01-06 03:29:26)

Offline

#8 2014-01-06 03:28:25

HalosGhost
Forum Moderator
From: Twin Cities, MN
Registered: 2012-06-22
Posts: 2,095
Website

Re: [SOLVED] magnetic tape software

lateo wrote:

for reference, this might also be of use : https://github.com/Distrotech/mt-st

And, the winner is lateo! Anyone who wants could make a very basic PKGBUILD for this and put it on the ALUR in 5 minutes.

All the best,

-HG

Offline

#9 2014-01-06 03:34:00

lateo
Member
Registered: 2014-01-06
Posts: 8

Re: [SOLVED] magnetic tape software

HalosGhost wrote:
lateo wrote:

for reference, this might also be of use : https://github.com/Distrotech/mt-st

And, the winner is lateo! Anyone who wants could make a very basic PKGBUILD for this and put it on the ALUR in 5 minutes.

All the best,

-HG

huh, i may have a look at it, but i'm so new in the arch world that it may take a while for me to achieve anything ^^'
Not much free time here hmm
I'm from RH/Debian schools, just takin' a (serious) liking to Arch after giving it a try on my desktop a few months ago tongue

Offline

#10 2014-01-06 03:41:03

HalosGhost
Forum Moderator
From: Twin Cities, MN
Registered: 2012-06-22
Posts: 2,095
Website

Re: [SOLVED] magnetic tape software

Now's the perfect time to get started. Take a look at the wiki pages for PKGBUILDs, Packaging Standards and the VCS PKGBUILD Guidelines and take your best shot at writing a PKGBUILD.

Now, this thread might be better moved to the PKGBUILD Questions and Requests subforum. And, if you struggle at all, post what you have so far and we'll help you finish the job smile

[Edit]: Looking further into it, the build process is incredibly simple. It only took a minute for me to edit one of my other -git PKGBUILDs to get it building and functioning (so far as I can test; I don't have a tape machine). I believe in you.

All the best,

-HG

Last edited by HalosGhost (2014-01-06 05:33:15)

Offline

#11 2014-01-06 23:14:30

skottish
Forum Fellow
From: Here
Registered: 2006-06-16
Posts: 7,942

Re: [SOLVED] magnetic tape software

This PKGBUILD builds and runs, but I have nothing to test it against. I didn't search too hard, but it looks like that tar is its only runtime dependency outside of glibc:

pkgname=mt-st-git
_gitname=mt-st
pkgver=7676fc4624
pkgrel=1
pkgdesc="Magnetic tape utils"
arch=('i686' 'x86_64')
url="https://github.com/Distrotech/mt-st"
license=('GPLv2')
depends=('tar')
makedepends=('git')
source=("git://github.com/Distrotech/mt-st")
md5sums=('SKIP')

pkgver() {
  cd $_gitname
  git describe | sed 's/-/./g'
}

build() {
  cd $srcdir/$_gitname
  make  
}

package() {
  cd $srcdir/$_gitname
  install -m755 -D mt $pkgdir/usr/bin/mt
  install -m755 -D stinit $pkgdir/usr/bin/stinit
}

***EDIT***

Added to the AUR and orphaned immediately smile

Last edited by skottish (2014-01-06 23:26:25)

Offline

#12 2014-01-06 23:38:58

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,618

Re: [SOLVED] magnetic tape software

You gave it a useless pkgver() function, though. pkgver ends up being random.

Offline

#13 2014-01-06 23:39:19

lateo
Member
Registered: 2014-01-06
Posts: 8

Re: [SOLVED] magnetic tape software

@skottish
wow thanks. smile
I'll give it a try next WE if i can. In the worst case scenario i should be able to give a feedback on this package later this month.

Offline

#14 2014-01-06 23:52:43

HalosGhost
Forum Moderator
From: Twin Cities, MN
Registered: 2012-06-22
Posts: 2,095
Website

Re: [SOLVED] magnetic tape software

Well, if we're just going to give away the PKGBUILD to the user instead of letting them learn about packaging, then the least we can do is give a really well-formed one. tongue This is the one I used:

_name='mt-st'
pkgname="${_name}-git"
pkgver=5.7676fc4
pkgrel=1
pkgdesc='Utilities for managing magnetic tape storage devices'
arch=('i686' 'x86_64')
url="https://github.com/Distrotech/${_name}"
license=('GPLv2')
makedepends=('git')
depends=('tar')
source=("${_name}::${url//https/git}.git")
sha256sums=('SKIP')

pkgver() {
  cd "${_name}"
  echo "$(git rev-list --count HEAD).$(git describe --always )"
}

build() {
  cd "${_name}"
  make
}

package() {
  cd "${_name}"
  make DESTDIR="${pkgdir}" PREFIX=/usr SBINDIR=/usr/bin install
}

# vim:set ts=2 sw=2 et:

All the best,

-HG

Last edited by HalosGhost (2014-01-06 23:56:10)

Offline

#15 2014-01-06 23:57:43

skottish
Forum Fellow
From: Here
Registered: 2006-06-16
Posts: 7,942

Re: [SOLVED] magnetic tape software

Scimmia wrote:

You gave it a useless pkgver() function, though. pkgver ends up being random.

I've never looked that closely on how git pkgver work. This particular PKGBUILD was a modification of the simplest that I have on my system:  cower-git. In this case though, it doesn't look as if the code has been updated in a long time, so I'm not sure that it matters. If you want to fix it, it's up for adoption.

lateo wrote:

@skottish
wow thanks. smile
I'll give it a try next WE if i can. In the worst case scenario i should be able to give a feedback on this package later this month.

You're welcome. It should run as it is, so hopefully it "just works".

@HalosGhost,

I'm having one of those weeks where I just feel like doing it... for better or for worse.

Last edited by skottish (2014-01-07 00:00:02)

Offline

#16 2014-01-07 00:01:04

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: [SOLVED] magnetic tape software

HalosGhost wrote:

Well, if we're just going to give away the PKGBUILD to the user instead of letting them learn about packaging, then the least we can do is give a really well-formed one. tongue This is the one I used:

_name='mt-st'
pkgname="${_name}-git"

The AUR is unable to read the custom variables that start with the underscore.  So instead of using the ${_name} in the pkgname, wouldn't it make more sense to just have pkgname='mt-st-git'.  Then in any instance in which you would have used ${_name}, you could use ${pkgname%-git} instead.

Just a thought...

Offline

#17 2014-01-07 00:11:44

HalosGhost
Forum Moderator
From: Twin Cities, MN
Registered: 2012-06-22
Posts: 2,095
Website

Re: [SOLVED] magnetic tape software

WonderWoofy wrote:

The AUR is unable to read the custom variables that start with the underscore.  So instead of using the ${_name} in the pkgname, wouldn't it make more sense to just have pkgname='mt-st-git'.  Then in any instance in which you would have used ${_name}, you could use ${pkgname%-git} instead.

Just a thought...

That's true and not a terrible idea, but it's not actually true in all cases. For example, see this package I maintain. It's working just fine for these.

All the best,

-HG

Offline

#18 2014-01-07 00:18:08

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: [SOLVED] magnetic tape software

HalosGhost wrote:

That's true and not a terrible idea, but it's not actually true in all cases. For example, see this package I maintain. It's working just fine for these.

So it is!  Thanks for pointing me to a real world example.  I always just took the wiki at its word and didn't fuck with the situation...

Offline

#19 2014-01-07 00:20:26

HalosGhost
Forum Moderator
From: Twin Cities, MN
Registered: 2012-06-22
Posts: 2,095
Website

Re: [SOLVED] magnetic tape software

WonderWoofy wrote:

So it is!  Thanks for pointing me to a real world example.  I always just took the wiki at its word and didn't fuck with the situation...

Anytime. The real reason I do this style is because I maintain a lot of -git packages (and a couple -hg package), and this format makes it so that I can leave a large amount of my PKGBUILD completely untouched (as boilerplate) between all of them. That's really helpful.

All the best,

-HG

Offline

#20 2014-01-07 00:25:40

skottish
Forum Fellow
From: Here
Registered: 2006-06-16
Posts: 7,942

Re: [SOLVED] magnetic tape software

lateo,

Two things. The first is that HalosGhost's PKGBUILD is *way* better than mine, so use that one. The second is that what happened in this thread is one of the things that makes the Arch community so freakin' cool. I posted a functional, but could-be-better PKGBUILD, and the community stepped up. It's a happy learning experience being here.

Last edited by skottish (2014-01-07 00:27:29)

Offline

#21 2014-01-07 00:28:26

HalosGhost
Forum Moderator
From: Twin Cities, MN
Registered: 2012-06-22
Posts: 2,095
Website

Re: [SOLVED] magnetic tape software

skottish wrote:

The first is that HalosGhost PKGBUILD is *way* better than mine, so use that one.

Eh, it just uses some boilerplate to make it a bit cleaner and utilizes upstream's Makefile. Don't sell yourself short smile

The second is that what happened in this thread is one of the things that makes the Arch community so freakin' cool. I posted a functional, but could-be-better PKGBUILD, and the community stepped up. It's a happy learning experience being here.

That, I whole-heartedly agree with! I love this whole community because of this. Life is really a two-way street here. We all learn from one another.

All the best,

-HG

Offline

#22 2014-01-07 00:31:10

skottish
Forum Fellow
From: Here
Registered: 2006-06-16
Posts: 7,942

Re: [SOLVED] magnetic tape software

HalosGhost,

Would you mind if I use your PKGBUILD to replace what I put in the AUR? I have no intention of maintaining it, but I would like to leave something of higher quailty than what I did.

Offline

#23 2014-01-07 00:35:18

HalosGhost
Forum Moderator
From: Twin Cities, MN
Registered: 2012-06-22
Posts: 2,095
Website

Re: [SOLVED] magnetic tape software

skottish wrote:

HalosGhost,

Would you mind if I use your PKGBUILD to replace what I put in the AUR? I have no intention of maintaining it, but I would like to leave something of higher quailty than what I did.

I actually just did a shotgun adoption, uploaded mine and orphaned it. It's there with both our names added on contributor lines. The one I uploaded, along with a copy of a bunch of other ones I've made are available on this repo of mine if anyone is interested in them.

All the best,

-HG

Last edited by HalosGhost (2014-01-07 00:36:38)

Offline

#24 2014-01-07 00:48:19

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,618

Re: [SOLVED] magnetic tape software

Actually HalosGhost, your pkgver() function could be a problem as well. If the author tags a release, everything goes to hell since you used git describe to get the short hash. I suggest git rev-parse --short HEAD instead.

Offline

#25 2014-01-07 00:50:40

HalosGhost
Forum Moderator
From: Twin Cities, MN
Registered: 2012-06-22
Posts: 2,095
Website

Re: [SOLVED] magnetic tape software

Scimmia wrote:

Actually HalosGhost, your pkgver() function could be a problem as well. If the author tags a release, everything goes to hell since you used git describe to get the short hash. I suggest git rev-parse --short HEAD instead.

That's a great point. But, I don't have any tape machines to use or test this with, so I orphaned it in the ALUR. Good to keep that in mind though.

All the best,

-HG

Offline

Board footer

Powered by FluxBB