Solved

mt command in Solaris 2.6 gives "inappropriate ioctl"

Posted on 1998-10-02
3
1,119 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Let's say you need to move the data of a file system from one partition to another. This generally involves dismounting the file system, backing it up to tapes, and restoring it to a new partition. You may also copy the file system from one place to…
Why Shell Scripting? Shell scripting is a powerful method of accessing UNIX systems and it is very flexible. Shell scripts are required when we want to execute a sequence of commands in Unix flavored operating systems. “Shell” is the command line i…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:

679 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