Solved

mt command in Solaris 2.6 gives "inappropriate ioctl"

Posted on 1998-10-02
3
1,132 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

The Ultimate Checklist to Optimize Your Website

Websites are getting bigger and complicated by the day. Video, images, custom fonts are all great for showcasing your product/service. But the price to pay in terms of reduced page load times and ultimately, decreased sales, can lead to some difficult decisions about what to cut.

Question has a verified solution.

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

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…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
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.

691 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