Bug 573943 - Technical note: Better document cpio behavior when using tape mechanic (find proper block size)
Summary: Technical note: Better document cpio behavior when using tape mechanic (find ...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: cpio
Version: 5.5
Hardware: All
OS: Linux
low
medium
Target Milestone: rc
: ---
Assignee: Pavel Raiskup
QA Contact: qe-baseos-daemons
URL:
Whiteboard:
Depends On:
Blocks: 5.6-Known_Issues 57KnownIssue
TreeView+ depends on / blocked
 
Reported: 2010-03-16 09:38 UTC by Jan Ščotka
Modified: 2013-04-12 20:38 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
The cpio utility uses a default block size of 512 bytes for I/O operations. This may not be supported by certain types of tape devices. If a tape device does not support this block size, cpio fails with the following error message: cpio: read error: Cannot allocate memory To work around this issue, modify the default block size with the --block-size long option, or use the -B option to set the block size to 5120 bytes. When the block size supported by the tape device is provided, the cpio utility works as expected. (BZ#573943 )
Clone Of:
Environment:
Last Closed: 2012-07-03 12:31:33 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2012:1055 0 normal SHIPPED_LIVE cpio bug fix update 2012-07-03 16:30:27 UTC

Description Jan Ščotka 2010-03-16 09:38:38 UTC
Description of problem:
This is not a bug, but more less release note. As we tested cpio on tape mechanic (HP StorageWorks DAT72)
I expected that it will work normally without any special parameters.
But it shows us problem with block size (It expects some bigger block that default number is)
I think that it isn't a problem to add some heureistic diagnose of using block size, to not fall into bad state, but extract files succesfully.
something like in pseudo code:
maxsize=10^9
for (x=0;10^x< maxsize; size=10^x){
   if ifoperationpass(size) break;
}

commad with explicit block size works as expected:
# cpio -i  --block-size=1024 < /dev/st0

==========================
without explicit size:
# cpio -i   < /dev/st0
cpio: read error: Cannot allocate memory

Comment 2 RHEL Program Management 2010-08-09 18:18:24 UTC
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated in the
current release, Red Hat is unfortunately unable to address this
request at this time. Red Hat invites you to ask your support
representative to propose this request, if appropriate and relevant,
in the next release of Red Hat Enterprise Linux.

Comment 9 Ondrej Vasik 2011-08-25 09:51:31 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
The cpio utility uses default block size for i/o operations 512 bytes. This may be not supported by certain types of tape devices. If tape device does not support this blocksize, cpio fails with confusing error message 'cpio: read error: Cannot allocate memory'.  Solution is pretty easy, you could modify the default blocksize by --block-size
long option (or use -B option to set blocksize to 5120 bytes). When block size supported by tape device is provided, cpio works as expected.

Comment 11 Martin Prpič 2011-12-13 14:44:40 UTC
    Technical note updated. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    Diffed Contents:
@@ -1,2 +1,5 @@
-The cpio utility uses default block size for i/o operations 512 bytes. This may be not supported by certain types of tape devices. If tape device does not support this blocksize, cpio fails with confusing error message 'cpio: read error: Cannot allocate memory'.  Solution is pretty easy, you could modify the default blocksize by --block-size
+The cpio utility uses a default block size of 512 bytes for I/O operations. This may not be supported by certain types of tape devices. If a tape device does not support this block size, cpio fails with the following error message:
-long option (or use -B option to set blocksize to 5120 bytes). When block size supported by tape device is provided, cpio works as expected.+
+cpio: read error: Cannot allocate memory
+
+To work around this issue, modify the default block size with the --block-size long option, or use the -B option to set the block size to 5120 bytes. When the block size supported by the tape device is provided, the cpio utility works as expected. (BZ#573943 )

Comment 17 errata-xmlrpc 2012-07-03 12:31:33 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2012-1055.html


Note You need to log in before you can comment on or make changes to this bug.