World is Welcome To The World of Linux

Journey into the world of linux

Menu
  • About
  • Welcome
Menu

Solving Incorrect Block Size Problem In Backup Tapes

Posted on April 1, 2009 by Ganesh Sharma

If you're new here, you may want to subscribe to my RSS feed. Thanks for visiting!

Its common phenomena to take Unix tape backups on one system and restore on another. Moving tapes to another site for safety sake is also called offsite backup. The problem often occurs while restoring tape data on another server. The tape backup access is very much dependent upon the block size used on the Unix server. For example on one unix server the block size can be 2048 Bytes and on another it may be 1024 Bytes.

Normally the tape backup is written in 512 Bytes block size. Now, suppose the target unix server is using the block size other than this one e.g 2048 Bytes, the tape becomes temporarily unavailable. The reason is block size mismatch.

You get something like this;

# tar -tvf /dev/rmt0

tar: 0511-193 An error occurred while reading from the media.

There is an input or output error.

This problem can be solved in two ways:

  1. tcopy command in Aix.

  2. The dd commanad, common to almost every unix system.

The tcopy command

Let’s say the tape device is /dev/rmt0, then the output of the following command will give the size of tape block size.

tcopy /dev/rmt0

tcopy : Tape File: 1; Records: 1 to 8796 ; size:1024

tcopy : Tape File: 1; End of file after :8796 records; 9474628 bytes

tcopy : Tape File: 2; Records: 1 to 3400 ; size:1024

tcopy : Tape File: 2; End of file after 3400 records, 76890 bytes

….

size:512 specifies tape block size.

The dd command

Simply using dd command to read one block of tape device will give the tape block size.

For example: dd      if     /dev/rmt0    bs=128k      count=1 | wc -l

The above command gives the size of tape block size.

Now, once you know the tape block size, you can change the tape block size. For Aix its give below:

#chdev -l /dev/rmt0 -a block_size=1024

Now attempting, below command will be successful.:

# tar -tvf /dev/rmt0

-rw-rw-r– 0 0 1327 Apr 01 12:18:17 2600 /var/adm/ras

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Recent Posts

  • Date Command Tutorial(Video)
  • grep Command Tutorial – 1(Video)
  • Introduction To ls Command(Video)
  • Chapter 3
  • Set Position Of Poll Module Into Joomla

Recent Comments

  • Kansas City Trailer Proz on Physical Volume In AIX – A Primer
  • Create volume group in AIX | myunixsheet on How To Create Volume Group
  • Restore of AIX backup on other Unix system - TecHub on What is mksysb And What Are Its Components
  • Firewall Unleashed - InfoSec Institute on Packet Filtering Firewall: An Introduction
  • Manwendra on Proxy Firewall and Gateway Firewall: Introduction

Archives

  • January 2019
  • June 2010
  • May 2010
  • February 2010
  • May 2009
  • April 2009
  • March 2009
  • February 2009
  • January 2009
  • December 2008
  • November 2008

Categories

  • 30 Days To Joomla WebSite Setup
  • A Journey To The World of Linux System Administration
  • Aix
  • Backups
  • Books
  • Firewalls
  • Introduction
  • Joomla
  • Joomla Backup
  • Joomla Web Technology
  • Linux
  • LPAR and Virtualization
  • LVM
  • Pluggable Authentication Modules
  • section navigator pro
  • Security
  • Security Knowledge Base
  • Tips and Tricks
  • Uncategorized
  • World is Welcome Products

Meta

  • Log in
  • Entries RSS
  • Comments RSS
  • WordPress.org
©2023 World is Welcome To The World of Linux | WordPress Theme by SuperbThemes