- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: frecover in a script ..
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-10-2001 09:45 AM
12-10-2001 09:45 AM
I have a little script to write the contents of a tape to an output file.
/usr/sbin/frecover -xNv -f /dev/rmt/0m 2>/tmp/listing
I can run this command without a problem from command line. However, when I try and run it from a script I get "unable to find device file /dev/rmt/0m"
Any ideas?
Thank you all very much,
Sally
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-10-2001 09:47 AM
12-10-2001 09:47 AM
Re: frecover in a script ..
mt -t /dev/rmt/0m rewind
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-10-2001 09:49 AM
12-10-2001 09:49 AM
Re: frecover in a script ..
How are you running the script?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-10-2001 09:49 AM
12-10-2001 09:49 AM
Re: frecover in a script ..
Chris
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-10-2001 09:50 AM
12-10-2001 09:50 AM
Re: frecover in a script ..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-10-2001 09:53 AM
12-10-2001 09:53 AM
Re: frecover in a script ..
#!/bin/ksh
or whatever shell you are using
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-10-2001 10:26 AM
12-10-2001 10:26 AM
Re: frecover in a script ..
1. I tried the mt -t dev rewind and it did not work
2. I am not doing anything else beforehand with the device - so it is not busy
3. I definitely have /dev/rmt/0m (I always check for typos first)
Basically, I run the script and get the error. I go to the command line and type exactly what I have in the script and it runs fine.
Thanks for all the quick responses,
Sally
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-10-2001 10:44 AM
12-10-2001 10:44 AM
Re: frecover in a script ..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-10-2001 11:29 AM
12-10-2001 11:29 AM
Re: frecover in a script ..
you might want to do an fuser on the device file in the script (just to see) and make it doesn't show anything. Also, have to tried a different device file, like /dev/rmt/0mn
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-10-2001 11:37 AM
12-10-2001 11:37 AM
Re: frecover in a script ..
One more thing. run the env command on the command line and from your script. See of there any differences, it is possible that LANG or some other environment variable is getting changed and not allowing to you access the device file properly.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-10-2001 11:47 AM
12-10-2001 11:47 AM
Re: frecover in a script ..
fuser didn't show anything and the env was the same. Also, I tried /dev/rmt/0mn and it didn't work either.
The error message that comes up is that the device is not found - then goes on to say unable to use the device, etc.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-10-2001 12:00 PM
12-10-2001 12:00 PM
Re: frecover in a script ..
tar -tvf /dev/rmt/0m
Run the script and check the error. If the error says Checksum, or blocksize error the problem is in the frecover, it you get can't open file /dev/rmt/0m then there is an issue in script. Then we can troubleshoot from there
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-10-2001 12:33 PM
12-10-2001 12:33 PM
Re: frecover in a script ..
Ran your request and got the checksum error. So I guess the problem is with frecover. But as mentioned before, frecover runs perfectly if I am restoring something...I only run into this problem when I just want a tape listing. Again, I am running:
frecover -xNv -f /dev/rmt/0m
Thanks again,
Sally
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-10-2001 12:43 PM
12-10-2001 12:43 PM
Solutioncouple more things to try. First, put a -y in the options. This way if there are any questions asked you won't messed up waiting for a prompt when you output is going to a file. Also, You may want to leave out the -f dev part. /dev/rmt/0m is the default if nothing is specified, I wounldn't know why that would help, but it would be interesting to see what happened.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-10-2001 01:05 PM
12-10-2001 01:05 PM
Re: frecover in a script ..
Thanks again,
Sally
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-10-2001 07:33 PM
12-10-2001 07:33 PM
Re: frecover in a script ..
/usr/bin/frecover -I /tmp/listing -f /dev/rmt/0m
Unlike legacy tools like tar and cpio, all the files that were selected at the start of the backup will be listed. The -xNv options will require reading (and computing extra checksums) for the whole tape...possible hours. The -I option can be completed in a couple of minutes.
Bill Hassell, sysadmin