LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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
  Search this Thread
Old 10-08-2008, 12:59 PM   #1
dougbourne
LQ Newbie
 
Registered: Jun 2008
Posts: 29

Rep: Reputation: 15
cpio: /dev/tty: No such device or address


Hi,
I have a server running samba server and i need perform a backup to DAT tape using cpio.

My script run this command:
Code:
ERRFILE="/var/log/backup/backup.log"

/usr/bin/find /u01/public /home /u02/quality /u01/C.P.D -print |/bin/cpio -ovBH tar -O /dev/st0 >> $ERRFILE 2>&1
The backup starts normally, but at "random" time it fails.
on $ERRFILE i got this message:
cpio: /dev/tty: No such device or address

Tested Possibilities (and false):
1 - Tape problem
2 - Tape drive problem
3 - not enough space on tape
4 - removed redirect of stderr to test output problem

I really don't know whats happening...


someone have an idea???
thanks

Last edited by dougbourne; 10-08-2008 at 01:00 PM.
 
Old 10-08-2008, 01:37 PM   #2
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
That error would indicate to me that you're backing up the /dev directory.
 
Old 10-08-2008, 01:46 PM   #3
dougbourne
LQ Newbie
 
Registered: Jun 2008
Posts: 29

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by trickykid View Post
That error would indicate to me that you're backing up the /dev directory.
yeap, but /dev/ is out of setlist.

I think this is an problem with STDOUT or STDERR output, but i remove all redirect of output and still got this error.
This is the only way relation with /dev/tty (the stdout) i think...
 
Old 10-08-2008, 02:52 PM   #4
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
One thing I noticed from your command is that you used the -B option but didn't set the block size. You might also want to use the "-0" option for cpio and the "-print0" instead of "-print" for the find command. An odd filename may be broken up or a file may be a symbolic link to /dev/tty.
 
Old 10-08-2008, 03:51 PM   #5
dougbourne
LQ Newbie
 
Registered: Jun 2008
Posts: 29

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by jschiwal View Post
One thing I noticed from your command is that you used the -B option but didn't set the block size. You might also want to use the "-0" option for cpio and the "-print0" instead of "-print" for the find command. An odd filename may be broken up or a file may be a symbolic link to /dev/tty.

Hi jschiwal,
But the -B param set the block size to 5120bytes (vide man pages).
The default value is 512bytes.

thanks!

Last edited by dougbourne; 10-08-2008 at 03:53 PM.
 
Old 10-09-2008, 01:01 AM   #6
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
Sorry. I guess you are correct. I though you needed to explicitly give the block size.
Code:
-B'
     Set the I/O block size to 5120 bytes.  Initially the block size is
     512 bytes.

`--block-size=BLOCK-SIZE'
     Set the I/O block size to BLOCK-SIZE * 512 bytes.
I thought that -B was synonymous with --block-size=.

Have you tried the -print0 option? Also, try running the find command by itself or pipe the output through grep looking for 'tty'.
You could add "-type c" to find if a device file is found in the search.
 
Old 10-09-2008, 12:28 PM   #7
dougbourne
LQ Newbie
 
Registered: Jun 2008
Posts: 29

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by jschiwal View Post
Sorry. I guess you are correct. I though you needed to explicitly give the block size.
Code:
-B'
     Set the I/O block size to 5120 bytes.  Initially the block size is
     512 bytes.

`--block-size=BLOCK-SIZE'
     Set the I/O block size to BLOCK-SIZE * 512 bytes.
I thought that -B was synonymous with --block-size=.

Have you tried the -print0 option? Also, try running the find command by itself or pipe the output through grep looking for 'tty'.
You could add "-type c" to find if a device file is found in the search.

Hi, thanks for your reply.
there is no device or any reference on files listed to backup job.
i'm loosing my mind with this issue.

thanks
 
  


Reply



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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Ultrium 2 - multi-tape error (DUMP: fopen on /dev/tty fails: No such device or addres tbwalter55 Linux - Hardware 2 01-08-2015 08:05 AM
/dev/lp0 no such device or address deadeyes Linux - Hardware 0 08-28-2008 11:33 AM
/dev/gpmctl: No such device or address devnull0 Linux - Software 0 07-17-2007 08:55 PM
/dev/tty: No such device or address ? dkennedy Linux - General 2 08-01-2006 11:28 AM
loop: can't open device /dev/loop0: No such device or address miaviator278 Linux - Security 3 06-09-2004 09:24 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 03:40 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration