- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: tape's record size
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
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
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
04-30-2002 04:19 AM
04-30-2002 04:19 AM
I am porting a tape program from Solaris to HP-UX. My question is about setting the record size. I need to write to tapes in a way that other systems can read it with 32k record size. In Solaris there is MTSRSZ command from mtio that does the job. As I understand there is no equivalent for MTSRSZ in HP-UX and the record (or block) size is encoded in the tape device file name. So on my machine I had to get the administrator to create a device file for tape like this:
/dev/rmt/c3t14d0s32768BEST
Is there any other way to set the record size dynamically through my program? Is there any standard short name for this new device file?
Thanks in advance for any reply!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-30-2002 04:46 AM
04-30-2002 04:46 AM
Re: tape's record size
The MAXIMUM tape block size is limited by the tapedrive.
live free or die
harry
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-30-2002 05:46 AM
04-30-2002 05:46 AM
Re: tape's record size
My question is not about the Maximum block size.
The question is about the way to do it. In HP-UX scsi tape drives by default work in variable block size mode. If you want to have fixed block size you have to set it some where. In HP-UX the block size can be encoded in the device name. You can use SAM or mkfs to create a new tape device file for a scsi drive under /dev/rmt and choose it to work with fixed record length. This will show up as a letter "s" and then the block size in the device file name. This is what I have done already and works ok.
My question is how to do the same thing dynamically in my program, as you can do in other Unix flavors (Solaris, AIX and Linux). It seems to me that it is not possible in HP-UX. Can anybody confirm?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-30-2002 06:00 AM
04-30-2002 06:00 AM
Re: tape's record size
Also to write DDS format on 512 bytes to be read on old tapes whit DDS2 tape drivers.
This is: one thing is what you send to driver ( special file) and other thing is how the type driver must write/read it.
You can see /usr/inlcude/sys/mtio.h to know what arguments are recogniced by ioctl.
mtio is a generic driver for tapes.
Note that there are a new patch to that implement DDS3 and DDS4 densities for tape drivers.
HTH.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-30-2002 06:12 AM
04-30-2002 06:12 AM
Re: tape's record size
What is the utility you ar using in the script to write on the tape , is it tar or cpio ,or dd ?
Manoj Srivastava
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-30-2002 06:14 AM
04-30-2002 06:14 AM
Re: tape's record size
It must be possible because utilities like dd are able to write blocks of a specific size e.g. bs=64k.
I suspect that you have to use tape specific calls to ioctl - see man 7 scsi_tape for more information.
Regards,
John
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-30-2002 07:16 AM
04-30-2002 07:16 AM
Re: tape's record size
I am already using mtio and ioctl calls, but the problem is: there is no block size setting option there (similar to MTSRSZ in Solaris). Please read my quetion.
Carlos, Density is a different parameter from block size.
Manoj, I use a program written in C++ to access the tape. I am not using any scripts.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-30-2002 11:46 PM
04-30-2002 11:46 PM
SolutionHave you read the man page for scsi_tape?
Quote:
SCSI sequential-access (tape) devices store a sequence of data blocks.
Data can be read and written using either fixed or variable sized
block mode. If supported by the device, variable sized block mode is
normally used (even when all blocks are the same size). Fixed sized
block mode is generally only used for tape devices which do not
support variable sized blocks.
End quote.
Is your application not able to write 32k blocks? If it does then the contents of the tape would be the same as if the driver does it.
The man page goes on to state:
The SIOC_SET_BLOCK_SIZE ioctl changes the current block size to the
specified number of bytes. Setting the block size to zero specifies
that variable-sized-block mode should be used. Any non-zero block
size specifies that fixed-sized-block mode should be used. By
default, the device driver attempts to set the block size to zero
during open. If variable-sized-block mode is not supported by the
device, the driver selects an appropriate block size for fixed-sized-
block mode use. Note that the device block size set by the
SIOC_SET_BLOCK_SIZE ioctl survives between close() and open() calls,
but not through system reboot.
Which indicates that you can force the driver to 'fixed length block mode'.
Regards,
John
PS I did read your question!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-01-2002 04:59 AM
05-01-2002 04:59 AM
Re: tape's record size
You were 100% right, The SIOC_SET_BLOCK_SIZE ioctl did the job!
I was thinking that the solution is in mtio and a MTIOCTOP ioctl call (similar to Solaris and Linux), but I was wrong.
Thanks again.