mt -f command

have You noticed that mt command doesn´t work anymore on 11.4?

We try to install new version to hadle robotic library, but someone has written mt command as a new, and it doesn´t accept mt -f command anymore.

cpio based mt command it´s not reliable as old one. Can anyone tell where to get old mt command which is compatrible new 11.4 x64 bit version?

Thanks to eweryone.

I have 11.2 here and the man page explains that in

mt -f <device> ....

you specify the device to be used. I can not believe that an eventual new mt tool does not support choosing the device. Did you check the man page for 11.4?

An alternative in my man page is the long option

mt --file=<device> ....

Isn’t that in your man page and did you try that?

Sorry, my mistake !!

I was going to say, it does not support mt -t command anymore. Mt -f is normal Linux command and mt- f is comming from HP-UX. So, old mt works more reliable with tape libraries, and that is what I´m missing.

Old mt command was version 2.2.5 and this new one with 11.4 is version 0.95b-105.1.

And it´s this old one I´m searching.

Mt -f is normal Linux command and mt- f is comming from HP-UX

Are you not making typos again? you probably mean to say:

mt -f is normal Linux command and mt- t is comming from HP-UX

And yes, I have an HP-UX 10.0 manual with has the -t (and not the* -f*) option for mt.
Do you mean you had the -t option on HP-UX? I suppose then that it was never on Linux.
Was that version 2.2.5 on HP-UX?

In other words, when you say:

have You noticed that mt command doesn´t work anymore on 11.4?

with wich are you comparing? when/where did it work as you state? openSUSE 11.3, 11.2, earlier?

BTW on my 11.2 mt comes with the cpio package and the package has the version 2.10-4.3.1. And mt itself says:

henk@boven:~> mt -V
mt (GNU cpio 2.10)
henk@boven:~>

petri50 wrote:
> Old mt command was version 2.2.5 and this new one with 11.4 is version
> 0.95b-105.1.
>
on my 11.4 “mt -V” shows
mt (GNU cpio) 2.11

not 0.95b-105.1


PC: oS 11.3 64 bit | Intel Core2 Quad Q8300@2.50GHz | KDE 4.6.3 | GeForce
9600 GT | 4GB Ram
Eee PC 1201n: oS 11.4 64 bit | Intel Atom 330@1.60GHz | KDE 4.6.0 | nVidia
ION | 3GB Ram

Hello !!

The old servers are 10.3 and 9.3. But as time runs, I try today install 11.4. Unfortunately tape didn´t mounted to drive.
When we search and discover problem, we found problem which comes from software using “mt -t” command. And wondering
why doesn´t command work, we found there is no “-t” switch in mt command.

Comparing side by side with servers, old server version gives five line of information when using -V switch. And version was
2.2.5 and it accepted “mt -t” switch. New server gives only one line information and it says 0.95b for version, and it doens´t
accept “mt -t” command. Using help, we found only “mt -f”.

The old server is 32-bit and new is 64-bit, but not IA. And I suppose this mt command comes with module “mt_st”, am
I right?

Did you see how I posted what my system says when I use* mt -V*? I showed the prompt, the command and the output copied and pasted from the terminal window into the post and put it between CODE tags. That is how you can show in the best way what happens on your system Much better then saying “New server gives only one line information and it says 0.95b for version”. In other words we want to see computer text and no stories. This is especialy important as @martin_helm shows what he has on 11.4 64 bit and that is NOT what you show.

BTW, a script called mt and to be found earlier in the PATH then /usr/bin/mt with a code like


#!/bin/bash
/usr/bin/mt -f ${2} ${3} ${4} ${5} ${6}

would translate one call into the other imho.

I do not know what module mt_st has to do with this problem. mt is part of the cpio package that contains /bin/cpio,* /usr/bin/cpio*, */usr/bin/mt *and some info and man pages.

Sorry !!

Just now I´m 150km away from servers, so I´m sorry I cant take print screens to You right now. Next possibility to me is next wednesday evening.

My question about mt_st module was:“Have I chosen right package?”. After installation there were no mt command in new server. But after I
install mt_st module, there was mt command. And typing “which mt” we got answer “/usr/bin/mt”. So at least path is right.

petri50 wrote:
> The old server is 32-bit and new is 64-bit, but not IA. And I suppose
> this mt command comes with module “mt_st”, am
> I right?
>
This is the full output mt from cpio


LANG=C mt -V
mt (GNU cpio) 2.11
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
<http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by David MacKenzie and Sergey Poznyakoff.

The package mt_st does not contain any mt command


rpm -ql mt_st
/usr/bin/mtst
/usr/sbin/stinit
/usr/share/doc/packages/mt_st
/usr/share/doc/packages/mt_st/README
/usr/share/doc/packages/mt_st/README.stinit
/usr/share/doc/packages/mt_st/stinit.def.examples
/usr/share/man/man1/mtst.1.gz
/usr/share/man/man8/stinit.8.gz

I wonder where your mt comes from, what happens if you try


which mt


PC: oS 11.3 64 bit | Intel Core2 Quad Q8300@2.50GHz | KDE 4.6.3 | GeForce
9600 GT | 4GB Ram
Eee PC 1201n: oS 11.4 64 bit | Intel Atom 330@1.60GHz | KDE 4.6.0 | nVidia
ION | 3GB Ram

Morning again !!

Here is some information:

Linux_old:~ # uname -a
Linux Linux_old 2.6.11.4-20a-smp #1 SMP Wed Mar 23 21:52:37 UTC 2005 i686 i686 i386 GNU/Linux

Linux_old:~ # which mt
/usr/bin/mt

Linux_old:~ # file /usr/bin/mt
/usr/bin/mt: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for GNU/Linux 2.2.5, dynamically linked (uses shared libs), stripped

Linux_old:~ # mt -V
GNU mt version 2.5

Linux_old:~ # mt -t /dev/st4 status
drive type = Generic SCSI-2 tape
drive status = 1258291200
sense key error = 0
residue count = 0
file number = 0
block number = 0
Tape block size 0 bytes. Density code 0x4b (unknown).
Soft error count since last status=0
General status bits on (41010000):
BOT ONLINE IM_REP_EN


Linux_New:~ # uname -a
Linux Linux_New 2.6.37.1-1.2-desktop #1 SMP PREEMPT 2011-02-21 10:34:10 +0100 x86_64 x86_64 x86_64 GNU/Linux

Linux_New:~ # which mt
/usr/bin/mt

Linux_New:~ # file /usr/bin/mt
/usr/bin/mt: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.4, stripped

Linux_New:~ # mt -V
mt (GNU cpio) 2.11
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Written by David MacKenzie and Sergey Poznyakoff.

Linux_New:~ # mt -t /dev/st0 status
mt: invalid option – ‘t’
Try mt --help' or mt --usage’ for more information.


All servers are installed from installation media´s. There is no internet
connections or service networks where to load upgrades. So, they are
working with installation media packages.

Some person has found workaround to this problem. Using GNU cpio
version 2.9 from SLES11, will understand -t option. So it seems this
problem is solved, and from my view case is closed.

Thanks to all who give thoughts for this problem.

Looks like the -t option was changed to -f in more recent releases of mt.

Hi,

AFAIK, mt -t status and mt -f status are indentical.

Just replace your mt -t with an mt -f

HTH

Lenwolf

Nice you have a solution, but I must say that when these are systems you run in a professional environment, you have build-in some booby traps.

And to add to the info you allready have. I have a 10.3 system and it has:


mgi@backup:~> mt -V
mt (GNU cpio 2.9)

and from it’s man page:

 mt -V] -f device] --file=device] --rsh-command=command] --version] operation [count]

Also, to see the openSUSE level:

mgi@backup:/etc> cat SuSE-release
openSUSE 10.3 (i586)
VERSION = 10.3
mgi@backup:/etc>

…not to stretch this topic too long, couple things…

Changing -t switch to -f is good advise, but make it inside binary code, it´s nearly impossible. I can change every bit one step
upper or downer keeping check sum as same. But jumping from t to f, it´s too much. And waiting when get new version of software,
I woudn´t keep my breath.

And about booty traps, from my view SuSE is one of the most working distro´s. Since 7.3 when I start install it as an main system,
I have haven´t problems. This is one of the first one. SuSE found nicely HBA-cards, NIC´s and disks. It does not need any special
drivers for disk storage systems or tape libraries. It runs nice and smooth with ACSLS and archive softwares. Just install it and run.
And when other distros has some problems, I have always just smiled. With Suse has haven´t problems. So why should I choose
another product?

I understand why the -t switch was in Linux and why they use it in software. But that generate problem to me, and perhaps some
other people in near future. Future will tell us. But lets do some work meanwhile.

This is the command line for backup solution.

Sample#
Restart data from tape device
#track1
$ tar zxvf /dev/nst0

#next track
$ mt -f /dev/nst0 fsf 1

More…

So if you have to work with broken binary only software, write a wrapper shell script or program that converts -t to -f and calls the real mt program which you have renamed to mt.bin or something like that. There is always a way around the problem.

This is about t he same as my suggestion in post #5 above. As @ken_yap says, much better solution then fumbling around in a binary executable.