- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- hpux 11iv2 how many times has a tape been written ...
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
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
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
07-27-2015 01:35 PM - edited 07-27-2015 01:39 PM
07-27-2015 01:35 PM - edited 07-27-2015 01:39 PM
hello everyone,
is there a command to view how many times a tape has been written to?
i am using sam, backup and recovery, interactive backup and recovery to write the data to the tapes.
any help is greatly appreciated
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-27-2015 04:55 PM - edited 07-27-2015 04:56 PM
07-27-2015 04:55 PM - edited 07-27-2015 04:56 PM
SolutionSince you are using SAM for backups, you are running the fbackup program which will track the number of times that fbackup was used on this tape. This is a feature of fbackup but relies on the tape to have the header from a previous fbackup. To read the header:
# frecover -V - -f /dev/rmt/<whatever>
Magic Field:FBACKUP_LABEL
Machine Identification:ia64
System Identification:HP-UX
Release Identification:B.11.31
Node Identification:atl6
User Identification:root
Record Size:4194304
Time:Mon Jul 27 19:47:00 2015
Media Use:27
Volume Number:1
Checkpoint Frequency:8192
Fast Search Mark Frequency:5000
Index Size:18019
Backup Identification Tag:12454 1438040820
Language:
The line: Media Use:27
indicates how many times this tape was written with fbackup.
As long as you use this tape only with SAM for backups, the counter will be intact.
If you use any other program such as tar or cpio to write on the tape, then the header is erased and the counter is lost. The next SAM backup to this tape will start the counter at 1. You'll see the message at the beginning of the fbakup session:
fbackup(3205): WARNING: unable to read a volume header
which means the tape header is not fbackup and will be overwritten.
Bill Hassell, sysadmin
- Tags:
- fbackup
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-19-2015 08:07 AM
08-19-2015 08:07 AM
Re: hpux 11iv2 how many times has a tape been written to?
Hi Bill,
thank you for the above command.
do you know why the above command would stop working using a cleaning tape on the drive? i checked the write counter on a few tapes and ran the cleaning tape before putting in the production tape and ran the command there after and now i am getting the below message:
# frecover -V - -f /dev/rmt/1m
frecover(5403): Unable to open or identify device at /dev/rmt/1m
frecover(5405): unable to open /dev/rmt/1m
frecover(5406): Do you wish to continue? (^[yY]/^[nN]) Y
frecover(5432): Media rewind failed
frecover(5402): failed close on device /dev/rmt/1m
frecover(5404): Press return when the next volume is ready on /dev/rmt/1m:
it was working prior to running cleaning tape as i tested on an old tape:
# frecover -V - -f /dev/rmt/1m
Magic Field:FBACKUP_LABEL
Machine Identification:9000/800
System Identification:HP-UX
Release Identification:B.11.23
...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-20-2015 08:44 AM
08-20-2015 08:44 AM
Re: hpux 11iv2 how many times has a tape been written to?
Run the mt command to check the status.
The cleaning tape puts tape drives into a strange state and some versions of firmware don't handle the cycle cleanup very well. Use it like this:
# mt -f /dev/rmt/1m status
If it reports that 1m is not ready or that the device is not reaady, try running an ioscan and device file refresh like this:
# ioscan -fC tape # insf -C tape
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-20-2015 01:24 PM - edited 08-20-2015 01:25 PM
08-20-2015 01:24 PM - edited 08-20-2015 01:25 PM
Re: hpux 11iv2 how many times has a tape been written to?
i had a bad terminator. i was able to run # frecover -V - -f /dev/rmt/1m but once i ran the cleaning tape both tape drives showed NO_HW when i did # iocan -fnC tape and i could not use the frecover command.
support replaced the terminator and now both tape drives show CLAIMED
is it safe to do a device file refresh # insf -C tape after a clean? i wrote to both tape drives and was able to read and i ran the cleaning tape on both drives. everything looks ok as far as i can tell:
# mt -f /dev/rmt/1m status
Drive: HP C5683A
Format:
Status: [41112600] BOT online compression immediate-report-mode
File: 0
Block: 0
# mt -f /dev/rmt/0m status
Drive: HP C5683A
Format:
Status: [41112600] BOT online compression immediate-report-mode
File: 0
Block: 0
# ioscan -fC tape
Class I H/W Path Driver S/W State H/W Type Description
=====================================================================
tape 0 0/3/1/1.0.0 stape CLAIMED DEVICE HP C5683A
tape 1 0/3/1/1.1.0 stape CLAIMED DEVICE HP C5683A
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-20-2015 02:54 PM - edited 08-20-2015 02:56 PM
08-20-2015 02:54 PM - edited 08-20-2015 02:56 PM
Re: hpux 11iv2 how many times has a tape been written to?
The bad terminator caused all the problems. ioscan showed no hardware because the tape drive was not communicating with the OS correctly. The cleaning cycle probably did not cause this condition but just made it visible. You were lucky that fbackup completed OK.
The insf command can be run at any time. It will not remove or change any device files - it does some internal checking to find any pieces of equipment that do not have device files, and also corrects ownership settings.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-20-2015 03:28 PM
08-20-2015 03:28 PM
Re: hpux 11iv2 how many times has a tape been written to?
# ioscan -fC tape Class I H/W Path Driver S/W State H/W Type Description ===================================================================== tape 0 0/3/1/1.0.0 stape CLAIMED DEVICE HP C5683A tape 1 0/3/1/1.1.0 stape CLAIMED DEVICE HP C5683A
It appears that both tape drives are connected on the same SCSI cable -- not a recommended path. Tape drives should always be connected to dedicated SCSI cards with no other devices. The DDS4 (DAT40) drive needs about 6 MBytes/sec to keep from repositioning during backups. To keep the data streaming as fast as possible, be sure to use an fbackup config file like this:
blocksperrecord 4096 records 64 checkpointfreq 8192 readerprocesses 6 maxretries 5 retrylimit 5000000 maxvoluses 200 filesperfsm 5000
Save this as /etc/fbackup.config and then add it to your fbackup command like this:
# fbackup -i / -v -c /etc/fbackup.conf -f /dev/rmt/0m
You should see a significantly faster backup speed.