Solved

mt command in Solaris 2.6 gives "inappropriate ioctl"

Posted on 1998-10-02
3
1,117 Views
Last Modified: 2013-12-21
I'm a part-time, barely qualified, learn-by-trying sysadmin for my own machine.  This is probably an easy one...

I want to start doing proper backups on my Ultra-1 workstation under Solaris 2.6.  I have a 4 mm cartridge tape drive, and have tried to do what the answerbook says, for instance:

ufsdump 0ucf /dev/rmt/0 /usr

However, the partition was too big for the tape, and it askedfor tape #2.  I didn't have an extra tape, so I aborted the backup.  When I tried to rewind the tape, that's when the fun began.  I said:

mt -f /dev/rmt/0 rewind

and it said:

/dev/rmt/0 rewind 1 failed: inappropriate ioctl for device

I get this response to any mt command, including status and offline.  I ejected the tape manually, and tried another backup of a smaller filesystem.  Now it thinks the tape starts with an EOF and immediately asks for another.

Questions:

1. What is a saner way to back up a Solaris system?
2. Why does the mt command not work?
3. Do I need to overtly mount and unmount the tape?

All assistance or pointers to HOWTOs etc. would be greatly appreciated.
0
Comment
Question by:harlow
3 Comments
 
LVL 1

Accepted Solution

by:
ksb earned 50 total points
ID: 2007176
1) Use "Amanda" which you can get from the Net.  It makes your life much, much better. See

ftp://ftp.amanda.org/pub/amanda

I use 2.4.0.

2) You need to give mt the no rewind device. (0n)

3) mount in UNIX terms is not for tapes.  Tapes are "online" or "offline" and you don't usually need a command to "online" a tape.

I also suggest the DLT tape format over a 4mm format, and the
nifty DLT4700 tape robot will make your life even better.

--ksb
0
 

Expert Comment

by:claudw
ID: 2007177
Have you tried checking to see if the /dev/rmt/n device (n corresponding with the tape drive instance) exists? If it doesn't you could then use the
       # tapes
command. This command creates symbolic links between /dev/rmt and the device directory tree by searching the kernel device tree to see what tape drive device are attached to the box.

If the /dev/rmt/n device does exist and is corrupted, (you may have inadvertantly copied a backup to the default device, for example, 0 - use ls -alF to determine that all files listed in the /dev/rmt directory are links) you could delete it and use the tapes command to re-create, as above.

hope this helps
rsvp to claudw@hotmail.com

0
 

Author Comment

by:harlow
ID: 2007178
Thanks for the help.  That seems to be the fix!

BTW, I got Amanda running as suggested above.  Thanks everyone.  
0

Featured Post

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Java core in Solaris 10 1 296
building a service to accessed via telnet client, want colors ? 4 93
unix example issues 18 99
Linux hostname change 2 83
In tuning file systems on the Solaris Operating System, changing some parameters of a file system usually destroys the data on it. For instance, changing the cache segment block size in the volume of a T3 requires that you delete the existing volu…
My previous tech tip, Installing the Solaris OS From the Flash Archive On a Tape (http://www.experts-exchange.com/articles/OS/Unix/Solaris/Installing-the-Solaris-OS-From-the-Flash-Archive-on-a-Tape.html), discussed installing the Solaris Operating S…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question