Cpio Read Error Cannot Allocate Memory
Contents |
Log In [x] | Forgot Password Login: [x] Format For Printing -XML -Clone This Bug -Last Comment First Last Prev Next This bug is not in your last search results. Bug573943 -
Linux Cpio Read Error Cannot Allocate Memory
Technical note: Better document cpio behavior when using tape mechanic (find proper block size) error cannot allocate memory - connect(2) Summary: Technical note: Better document cpio behavior when using tape mechanic (find ... Status: CLOSED ERRATA Aliases: None Product: Red Hat Enterprise mount error cannot allocate memory Linux 5 Classification: Red Hat Component: cpio (Show other bugs) Sub Component: --- Version: 5.5 Hardware: All Linux Priority low Severity medium TargetMilestone: rc TargetRelease: --- Assigned To: Pavel Raiskup QA Contact: qe-baseos-daemons Docs Contact: URL:
Failed Error Cannot Allocate Memory
Whiteboard: Keywords: Documentation Depends On: Blocks: 5.6-Known_Issues 57KnownIssue Show dependency tree /graph Reported: 2010-03-16 05:38 EDT by Jan Ščotka Modified: 2013-04-12 16:38 EDT (History) CC List: 3 users (show) azelinka jpopelka rvokal See Also: 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
Error Cannot Allocate Memory Errno 12
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 ) Story Points: --- Clone Of: Environment: Last Closed: 2012-07-03 08:31:33 EDT Type: --- Regression: --- Mount Type: --- Documentation: --- CRM: Verified Versions: Category: --- oVirt Team: --- RHEL 7.3 requirements from Atomic Host: Cloudforms Team: --- Attachments (Terms of Use) Add an attachment (proposed patch, testcase, etc.) Groups: None (edit) Description Jan Ščotka 2010-03-16 05:38:38 EDT 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
Debian / Ubuntu, Hardware, Linux, Suse, Troubleshooting, Ubuntu LinuxQ. I've Debian Linux 4.0 Install on HP Server. This server has SCSI tape device. According to my tape documentation size should be 64k. How can I set the block size for a HP SCSI tape device? A. You need to use standard tar or cpio command to set the block size for a SCSI tape device. There is no special setting exists to set the block for a tape.
tar command set block sizeThe -b option https://bugzilla.redhat.com/show_bug.cgi?id=573943 use to set block size. The record size of Nx512 bytes (default is N=20). The following example, set a tape to 256k block to backup /data file system: # tar -b 512 -cvf /dev/st0 /data To extract simply use: # tar -b 512 -xvf /dev/st0 Where,-b 512 Use a blocksize of 512 i.e 512x512bytesc : Create archivev : Verbose (display http://www.cyberciti.biz/faq/rhel-centos-debian-set-tape-blocksize/ progress)f : Tape device name /dev/st0x : Extract archiveSo to set data transfer block size to 64k (64x64bytes), enter: # tar -b 128 -cvf /dev/st0 /path/to/backup/directory See more about mt and tar command for making backups under Linux.cpio commandPass the -block-size BLOCK option to cpio command, enter: # find /home | cpio --block-size 128 -o -H tar -F /dev/nst0 To Restore backup, enter the following command # cpio --block-size 128 -i -F /dev/nst0How do I find out tape block size?Refer to tape manufactures documentation or product web site. However, with the help of dd command (little trial and error) you can find actual blocksize of tape. All you have to do is provide ibs=BLOCKSIZE: # dd if=/dev/st0 of=/tmp/test.file ibs=64k count=1 Output:dd: reading `/dev/st0': Cannot allocate memory 0+0 records in 0+0 records out If you get an error message, ‘Cannot allocate memory‘, try next blocksize as selected blocksize (64k) is too small: # dd if=/dev/st0 of=testfile ibs=256k count=1 Output:1+0 records in 512+0 records outSo 256k is correct block size for this scsi tape device. Share this tutorial on:TwitterFacebookGoogle+Download PDF verJoin INTELLIGENT WORK FORUMSFOR COMPUTER PROFESSIONALS Log In Come Join Us! Are you aComputer / IT professional?Join Tek-Tips Forums! Talk With Other Members Be Notified Of ResponsesTo Your Posts Keyword Search One-Click Access To YourFavorite Forums Automated SignaturesOn http://www.tek-tips.com/viewthread.cfm?qid=1319965 Your Posts Best Of All, It's Free! Join Us! *Tek-Tips's functionality depends on members http://www.unix.com/unix-for-beginners-questions-and-answers/268030-cpio-restore.html receiving e-mail. By joining you are opting in to receive e-mail. Posting Guidelines Promoting, selling, recruiting, coursework and thesis posting is forbidden.Tek-Tips Posting Policies Jobs Jobs from Indeed What: Where: jobs by Link To This Forum! Add Stickiness To Your Site By Linking To This Professionally Managed Technical Forum.Just copy and paste the BBCode HTML Markdown MediaWiki error cannot reStructuredText code below into your site. Linux (server) Forum at Tek-Tips HomeForumsMIS/ITOperating Systems - UNIX basedLinux (server) Forum CPIO error thread54-1319965 Forum Search FAQs Links MVPs CPIO error CPIO error robert030975 (MIS) (OP) 9 Jan 07 04:34 Hi allI have ran the below script trying to restore a file from tapemt -f /dev/st0 rewindmkdir /tmp/newdircd /tmp/newdircpio -icdvr -C32768 --no-absolute-filenames -I /dev/st0 data/jvedi/jv-ediinpbut it keeps comming upcpio: read error: Input/output errordoes anyone error cannot allocate have any ideas??if I'm doing anything wrong??thanksrobert RE: CPIO error robert030975 (MIS) (OP) 9 Jan 07 08:36 I can copy a file from the top of the tape but not hte bottom so I tried to set the block size from zero to 1024Is there a reson why you can't set the block size on a tapeerror input / outputmt -f/dev/st0 setblk 1024??? RE: CPIO error Annihilannic (MIS) 11 Jan 07 04:01 Are you able to dd off the entire tape with no I/O errors, e.g.dd if=/dev/st0 of=/dev/null Annihilannic. RE: CPIO error robert030975 (MIS) (OP) 11 Jan 07 04:17 Thanks for the replyI'm not really a linux person but as I need to recove this file I'll take all the help I can get!!What is happening at the moment is that Ive switched on my dev box with out new ultrium drive put a couple of clea cycles through.strange thing is that on last nights tape I can get the file but not on the one I need.Hence trying a different box.I have put the dd if=/dev/st0 of=/dev/null(what does it do?)dd: reading '/dev/st0: cannot allocate memory0+0 records in0+0 records outstrange thing is that I can set the block size on this but when I try to read it cpio –itcv –C32768 < /
Questions & Answers If you're not sure where to post a Unix or Linux question, post it here. All unix and Linux beginners welcome in this forum! Search Forums Show Threads Show Posts Tag Search Advanced Search Unanswered Threads Find All Thanked Posts Go to Page... learn unix and linux commands CPIO Restore UNIX for Beginners Questions & Answers Page 1 of 2 1 2 > Thread Tools Search this Thread Display Modes #1 08-26-2016 isoabv Registered User Join Date: Aug 2016 Last Activity: 5 September 2016, 2:19 AM EDT Posts: 6 Thanks: 1 Thanked 0 Times in 0 Posts CPIO Restore Please note that using the command cpio to back up to tape was successful. Used the below command: Code: time find /accts -print | cpio -oa --block-size=512 --format=newc --verbose -O /dev/nst0 I'm trying to restore from tape of a particular file and having issues. Below is the command to restore from tape: Code: cpio -iv "/accts/bank/2day" "/accts/bank/lastyear" --block-size=2048 < /dev/nst0 Please assist if the above command to restore is correct. I tried using it but it does not restore. I was in the /bkp directory to do the restore. Last edited by vbe; 08-26-2016 at 08:16 AM.. Reason: code tags Remove advertisements Sponsored Links isoabv View Public Profile Find all posts by isoabv #2 08-26-2016 Don Cragun Moderator Join Date: Jul 2012 Last Activity: 6 October 2016, 1:05 AM EDT Location: San Jose, CA, USA Posts: 9,449 Thanks: 435 Thanked 3,191 Times in 2,736 Posts Quote: Originally Posted by isoabv Please note that using the command cpio to back up to tape was successful. Used the below command: Code: time find /accts -print | cpio -oa --block-size=512 --format=newc --verbose -O /dev/nst0 I'm trying to restore from tape of a particular file and having issues. Below is the command to restore from tape: Code: cpio -iv "/accts/bank/2day" "/