Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

mt command in Solaris 2.6 gives "inappropriate ioctl"

Posted on 1998-10-02
3
Medium Priority
?
1,148 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 200 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

Installing FreeBSD… FreeBSD is a darling of an operating system. The stability and usability make it a clear choice for servers and desktops (for the cunning). Savvy?  The Ports collection makes available every popular FOSS application and packag…
I have been running these systems for a few years now and I am just very happy with them.   I just wanted to share the manual that I have created for upgrades and other things.  Oooh yes! FreeBSD makes me happy (as a server), no maintenance and I al…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
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…
Suggested Courses

810 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