Cannot Read Input/output Error Tar
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more linux tape drive input output error about hiring developers or posting ads with us Unix & Linux Questions Tags Users Badges Unanswered tar /dev/st0 cannot write input/output error Ask Question _ Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating
Tar: Cannot Write: Input/output Error
systems. Join them; it only takes a minute: Sign up Here's how it works: Anybody can ask a question Anybody can answer The best answers are voted up and rise to the top Cannot open: Input/output error with tar command
Dev Nst0 Input Output Error
in a shell script up vote 5 down vote favorite I am trying to create a tar ball in a shell script (I have enabled set -x), but I get an error: + cd /home5/mysite/public_html + TAR_DUMP=gypo_2012-02-18-03:51:15.tar.gz + echo 'Tar name: gypo_2012-02-18-03:51:15.tar.gz' Tar name: gypo_2012-02-18-03:51:15.tar.gz + tar -cvzf gypo_2012-02-18-03:51:15.tar.gz gypo ... tar: gypo_2012-02-18-03\:44\:04.tar.gz: Cannot open: Input/output error tar: Error is not recoverable: exiting now ... The script is the following: NOW=$(date +"%Y-%m-%d-%T") # TAR cd $HOME/public_html TAR_DUMP="gypo_$NOW.tar.gz" echo "Tar mt input output error name: $TAR_DUMP" tar -cvzf $TAR_DUMP gypo # mv -t $DEST $TAR_DUMP Why is tar generating this error and how can I solve it? Thanks. shell-script filenames tar share|improve this question edited Feb 18 '12 at 23:58 Gilles 370k676711120 asked Feb 18 '12 at 10:57 JVerstry 3541717 add a comment| 1 Answer 1 active oldest votes up vote 5 down vote accepted The : in the filename are confusing tar. At least for the coreutils version of tar, the --file switch can take an argument of the form: hostname:/remote/file/name so I'm guessing tar is trying to interpret that filename in a manner that is not what you meant. Prefixing the file name with ./ (or specifying a full path) should solve your problem. TAR_DUMP="./gypo_$NOW.tar.gz" echo "Tar name: $TAR_DUMP" tar -cvzf $TAR_DUMP gypo Another fix would be to add the --force-local switch. --force-local Forces `tar' to interpret the filename given to --file as a local file, even if it looks like a remote tape drive name. share|improve this answer answered Feb 18 '12 at 11:16 Mat 29.8k591114 Adding ./ solved the issue, many many thanks !!! –JVerstry Feb 18 '12 at 11:30 add a comment| Your Answer draft saved draft discarded Sign up or log in Sign up using Google Sign up using Facebook Sign up using Email and Password Post as a guest Name Email Post as a guest Name Email discard B
Red Hat Certificate System Red Hat Satellite Subscription Asset Manager Red Hat Update Infrastructure Red Hat Insights Ansible Tower by Red Hat Cloud Computing Back Red Hat CloudForms Red Hat OpenStack Platform Red Hat Cloud Infrastructure Red Hat Cloud Suite Red Hat OpenShift Container Platform Red Hat OpenShift Online Red Hat OpenShift Dedicated Storage Back Red Hat Gluster Storage Red Hat Ceph Storage JBoss Development and Management Back Red Hat JBoss Enterprise Application Platform Red Hat JBoss Data Grid Red Hat JBoss Web Server Red Hat JBoss Portal Red Hat JBoss Operations Network Red Hat JBoss Developer Studio JBoss Integration and Automation http://unix.stackexchange.com/questions/32036/cannot-open-input-output-error-with-tar-command-in-a-shell-script Back Red Hat JBoss Data Virtualization Red Hat JBoss Fuse Red Hat JBoss A-MQ Red Hat JBoss BPM Suite Red Hat JBoss BRMS Mobile Back Red Hat Mobile Application Platform Services Back Consulting Technical Account Management Training & Certifications Red Hat Enterprise Linux Developer Program Support Get Support Production Support Development Support Product Life Cycle & Update Policies Knowledge Search Documentation Knowledgebase Videos Discussions Ecosystem Browse Certified Solutions Overview https://access.redhat.com/articles/7463 Partner Resources Tools Back Red Hat Insights Learn More Red Hat Access Labs Explore Labs Configuration Deployment Troubleshooting Security Additional Tools Red Hat Access plug-ins Red Hat Satellite Certificate Tool Security Back Product Security Center Security Updates Security Advisories Red Hat CVE Database Security Labs Resources Overview Security Blog Security Measurement Severity Ratings Backporting Policies Product Signing (GPG) Keys Community Back Discussions Red Hat Enterprise Linux Red Hat Virtualization Red Hat Satellite Customer Portal Private Groups All Discussions Start a Discussion Blogs Customer Portal Red Hat Product Security Red Hat Access Labs Red Hat Insights All Blogs Events Customer Events Red Hat Summit Stories Red Hat Subscription Benefits You Asked. We Acted. Open Source Communities Subscriptions Downloads Support Cases Account Back Log In Register Red Hat Account Number: Account Details Newsletter and Contact Preferences User Management Account Maintenance My Profile Notifications Help Log Out Language Back English español Deutsch italiano 한국어 français 日本語 português 中文 (中国) русский Customer Portal Search Products & Services Back View All Products Infrastructure and Management Back Red Hat Enterprise Linux Red Hat Virtualization Red Hat Identity Management Red Hat Directory Server Red Hat Certificate System Red Hat Satellite Subscription Asset Manager Red Hat Update Infrastructure Red Hat Insights A
tar (Ubuntu) Edit Invalid Undecided Unassigned Edit You need to log in to change this bug's status. Affecting: tar (Ubuntu) Filed here by: ytene When: 2007-05-11 Completed: 2007-05-19 Target Distribution Baltix BOSS Juju Charms Collection Elbuntu Guadalinex Guadalinex Edu Kiwi Linux nUbuntu PLD https://bugs.launchpad.net/bugs/114074 Linux Tilix tuXlab Ubuntu Ubuntu Linaro Evaluation Build Ubuntu RTM Package (Find…) Project (Find…) Status http://forums.fedoraforum.org/showthread.php?t=262434 Importance Invalid Undecided Assigned to Nobody Me Comment on this change (optional) Email me about changes to this bug report Also affects project (?) Also affects distribution/package Nominate for series Bug Description Binary package hint: tar Ubuntu 6.10/AMD64 on Tyan Thunder K8W with an Adaptec Ultra160 PCI SCSI Card and a Freecom (HP) DAT72 Tape Deck. Hardware ID of the deck output error is /dev/st0 If I attempt a backup using, for example, the syntax tar cvfz /dev/st0 /home/ytene/data I am rewarded with a spooling tape drive and a scrolling display of files being written to the tape. So far so good. However, if I try and catalog the tape - or restore from it, using the syntax tar tvf /dev/st0 or tar xvf /dev/st0 all that I get for my trouble is the following error message : root@voyager:/home/ytene# tar input output error tvf /dev/st0 tar: /dev/st0: Cannot read: Input/output error tar: At beginning of tape, quitting now tar: Error is not recoverable: exiting now root@voyager:/home/ytene# I did some basic trawling around and came upon the following reference:- http://lists.freebsd.org/pipermail/f...er/021514.html [forgive the fact that this is a bsd site and not specifically linux related - I think the tools are largely common] and I tried to follow the suggestions given there, but without success. These failures seem to be 100% consistent and repeatable. I have tried to erase the tape back to "new" state, by using mt -f /dev/st0 erase which, for 72Gb tapes, takes an age! However, this makes no difference. I have tried brand new tapes, with the same results. As a final check, I have rebooted this machine into WindowsXP and tried to use NTBackup to prove the tape hardware. This works perfectly. I am therefore pretty confident that my hardware and tape media are all OK. What's really puzzling/frustrating to me is that I am *sure* I've had this working before. Maybe not on 6.10, but almost certainly on 6.04 or 5.10. Obviously slightly concerned as my ubuntu machine is where I do all my serious work... so would like to have a reliably working backup solution. I'd really appreciate any tests or steps I can take to diagnose and preferably fix this problem... If I cat the cont
Common F23 Bugs Common F24 Bugs Communicate with Fedora The Documents Bug Reports Fedora Update System (Bodhi) Fedora Build System (Koji) Official Spins FedoraForum.org > Fedora 23/24 > Hardware & Laptops Tape input/output error FedoraForum Search User Name Remember Me? Password Forgot Password? Join Us! Register All Albums FAQ Today's Posts Search Hardware & Laptops Help with your hardware, including laptop issues Google™ Search FedoraForum Search Red Hat Bugzilla Search Search Forums Show Threads Show Posts Tag Search Advanced Search Go to Page... Thread Tools Search this Thread Display Modes #1 3rd May 2011, 02:46 AM AlwaysLearning Offline Registered User Join Date: Dec 2004 Posts: 40 Tape input/output error Hi all, I'm either missing the obvious or have four identically defective tape drives. Each is a Seagate or IBM Travan drive (yes, I know they're old and I need to access the data; they were in Win boxes) using QIC-80/DC-2120 media. I've been trying to solve this using three Fedora boxes (different versions) and one Debian machine. The OS's recognize the drives and they show up as /dev/st0. more /proc/scsi/scsi Attached devices: Host: scsi0 Channel: 00 Id: 00 Lun: 00 Vendor: ATA Model: WDC WD1600JB-00D Rev: 65.1 Type: Direct-Access ANSI SCSI revision: 05 Host: scsi1 Channel: 00 Id: 00 Lun: 00 Vendor: HL-DT-ST Model: DVDRAM GSA-4163B Rev: A103 Type: CD-ROM ANSI SCSI revision: 05 Host: scsi1 Channel: 00 Id: 01 Lun: 00 Vendor: Seagate Model: STT20000A Rev: 8A51 Type: Sequential-Access ANSI SCSI revision: 02 dmesg | grep scsi scsi0 : pata_amd scsi1 : pata_amd scsi 0:0:0:0: Direct-Access ATA WDC WD1600JB-00D 65.1 PQ: 0 ANSI: 5 scsi 1:0:0:0: CD-ROM HL-DT-ST DVDRAM GSA-4163B A103 PQ: 0 ANSI: 5 scsi 1:0:1:0: Sequential-Access Seagate STT20000A 8A51 PQ: 0 ANSI: 2 sd 0:0:0:0: Attached scsi generic sg0 type 0 scsi 1:0:0:0: Attached scsi generic sg1 type 5 scsi 1:0:1:0: Attached scsi generic sg2 type 1 sr0: scsi3-mmc drive: 40x/40x writer dvd-ram cd/rw xa/form2 cdda tray sr 1:0:0:0: Attached scsi CD-ROM sr0 scsi2 : sata_nv scsi3 : sata_nv st 1:0:1:0: Attached scsi tape st0 scsi4 : sata_nv scsi5 : sata_nv dmesg | grep tape st 1:0:1:0: Attached scsi tape st0 With no media in the drives, I get a status report; with media inserted, I get the same input/output errors. Examples (all as root): With tape inserted: # mt -f /dev/st0 status /dev/st0: Input/output error With no tape in drive: # mt -f /dev/st0 status SCSI 2 tape drive: File number=-1, block number=-1, partition=0. Tape block size 0 bytes. Density code