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
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.
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.
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 )
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