Solved

mt command in Solaris 2.6 gives "inappropriate ioctl"

Posted on 1998-10-02
3
1,104 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
Comment Utility
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
Comment Utility
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
Comment Utility
Thanks for the help.  That seems to be the fix!

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

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

When you do backups in the Solaris Operating System, the file system must be inactive. Otherwise, the output may be inconsistent. A file system is inactive when it's unmounted or it's write-locked by the operating system. Although the fssnap utility…
Every server (virtual or physical) needs a console: and the console can be provided through hardware directly connected, software for remote connections, local connections, through a KVM, etc. This document explains the different types of consol…
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.

728 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now