LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
LinkBack Search this Thread
Old 05-08-2007, 09:47 AM   #1
duckie316
LQ Newbie
 
Registered: Aug 2003
Posts: 5

Rep: Reputation: 0
cpio dies when spanning media


Has anyone experienced cpio backups failing/dieing once the second tape is inserted? Clues, thoughts, profound intuition?

A bit more detail:
- cpio backup of 600GB of pdf images to tape media.
- The media fills and cpio request a second tape.
- A second tape is inserted, rewound and given a moment of ritual silence.
- Press <cr> to respond to the cpio request for media
- then the backup will quits..

The backup command:
cpio -ocC 32768 --force-local -M "Tape Change Request %d" < huge.list > /dev/nst0

The hardware:
where /dev/nst0 is an HP460 using LTO2 media

The OS:
rhel 3 update 7

The S/W:
cpio-2.5-4.RHEL3
 
Old 05-08-2007, 10:27 AM   #2
MensaWater
Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 5,195

Rep: Reputation: 469Reputation: 469Reputation: 469Reputation: 469Reputation: 469
Since you're spanning tapes should you be using the nst0 (no rewind) device? Perhaps the second tape isn't being rewound when you insert it so it is trying to write at the end of the tape rather than the beginning? (It might be unless it was a brand new tape.)

Have you tried it using st0 instead?
 
Old 05-08-2007, 11:28 AM   #3
duckie316
LQ Newbie
 
Registered: Aug 2003
Posts: 5

Original Poster
Rep: Reputation: 0
I am performing a "rewind -vs norewind" test now but I have some additional information. I repeated the test but to a floppy device so that the time span wasn't so painful between results. What we found was that when performing the cpio when using the " > /dev/fd0" it failed on the second floppy but when using " -F /dev/fd0" it spanned just as you would expect. Per the man page for cpio, both are acceptable. CPIO bug or my incorrect interpretation? I will post an update of my test using -F /dev/nst0 and -F /dev/st0.
 
Old 05-09-2007, 07:57 AM   #4
duckie316
LQ Newbie
 
Registered: Aug 2003
Posts: 5

Original Poster
Rep: Reputation: 0
Thanks all for the input. Hopefully the following will help others.
I am using RHEL3, 2.4.21-40.ELsmp, and cpio-2.5-4.RHEL3.

# Rewind device and the -F option
cpio -ocC 32768 < biglist -F /dev/st0 Works as anticipated on tape changes

# No rewind device and the -F option
cpio -ocC 32768 < biglist -F /dev/nst0 Fails after tape change. Note that the device status, after inserting new media still show EOT. I did not attempt a rewind, just responded to the prompt for new media and the cpio backup died.

# No rewind device and the > option (*1)
cpio -ocC 32768 < biglist > /dev/nst0 Fails on tape change

# Rewind device that the > option (*1)
cpio -ocC 32768 < biglist > /dev/st0 Fails on tape change

*1 The usage statement tells me that the > or -F should be legal but I am getting different results.

Usage: cpio {-o|--create} [-0acvABLV] [-C bytes] [-H format] [-M message]
[-O [[user@]host:]archive] [-F [[user@]host:]archive] [--file=[[user@]host:]archive] [--format=format] [--message=message]
[--null] [--reset-access-time] [--verbose] [--dot] [--append]
[--block-size=blocks] [--dereference] [--io-size=bytes] [--quiet]
[--force-local] [--rsh-command=command] [--help] [--version] < name-list
[> archive]
 
Old 05-09-2007, 08:28 AM   #5
MensaWater
Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 5,195

Rep: Reputation: 469Reputation: 469Reputation: 469Reputation: 469Reputation: 469
So using the rewind device worked with -F? Sort of what I expected. Some tape drives do automatic rewind on ejection of tape or insertion but it sounds as if yours doesn't.

You're correct that the > should have worked too (in fact that's the only way to do it in most UNIX flavors). I wonder if the double redirects (redirect in from biglist and redirect out to /dev/st0) in your command line somehow confused cpio?

What happens if you do:
cat biglist | cpio -ocC 32768 > /dev/st0

cpio is a little unique in that it expects use of standard redirect (<, >) characters as part of its command line. For most other programs the redirect characters change the default behavior.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Removable Media Source Spanning Discs waylandbill Mandriva 1 01-13-2006 08:49 PM
x server dies...dies...dead! aquaboot Linux - Software 2 08-28-2005 11:54 AM
How to use cpio to extract a cpio archive? linx win Debian 4 06-17-2005 01:53 PM
Cannot play streaming media - Browser dies donbellioni Linux - Software 1 03-27-2004 09:24 AM
Disk spanning? myrddin Slackware 4 01-28-2003 10:06 PM


All times are GMT -5. The time now is 12:25 AM.

Main Menu
 
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration