Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 7 Apr 1999 20:25:37 +0100
From:      Mark Ovens <marko@uk.radan.com>
To:        Doug White <dwhite@resnet.uoregon.edu>
Cc:        questions@FreeBSD.ORG
Subject:   Re: Bug in cp(1) or a filesystem problem?
Message-ID:  <19990407202537.I2018@marder-1.localhost>
In-Reply-To: <Pine.BSF.4.03.9904071121070.4368-100000@resnet.uoregon.edu>; from Doug White on Wed, Apr 07, 1999 at 11:22:09AM -0700
References:  <19990407164542.A2018@marder-1.localhost> <Pine.BSF.4.03.9904071121070.4368-100000@resnet.uoregon.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Apr 07, 1999 at 11:22:09AM -0700, Doug White wrote:
> On Wed, 7 Apr 1999, Mark Ovens wrote:
> 
> > I was trying to copy a whole directory tree to a new disk using:
> > 
> > ``cp -p -r marko /mnt/usr/''
> > 
> > There's about 29,000 files (~560MB). After about 80% has been copied
> > cp just hangs. ps(1) shows it as idle. I tried again, same thing.
> > I identified the sub-dirs that hadn't been copied and copied them
> > (cp -p -r) one at a time. This worked for all but one directory.
> > 
> > I tried several times, but this one dir (which contains sub-dirs)
> > just hangs cp.
> > 
> > I dropped to single-user, umnounted the filesystems and fsck'd both
> > the source and target filesystems, no errors reported.
> 
> Can you read (ie, `cat') all the files in that directory?  Are there any
> errors from the disk subsystem?
> 
> > Program received signal SIGTSTP, Stopped (user).
> > 0x804a94c in _open ()
> > (gdb) bt
> > #0  0x804a94c in _open ()
> > #1  0x8048cb1 in copy_file (entp=0x8070600, dne=1) at utils.c:70
> > #2  0x8048bb9 in copy (argv=0xefbfdaa8, type=FILE_TO_DIR, fts_options=6)
> >     at cp.c:407
> > #3  0x8048665 in main (argc=1, argv=0xefbfdaa8) at cp.c:240
> > #4  0x80480e9 in _start ()
> > (gdb)
> > 
> > Unfortunately this is about the limit of my gdb skills.
> 
> You need to parse entp to grab what filename it's currently processing.
> 

Well I've learned something about gdb from this, I now know what
``p*'' does :-). The problem turned out to be a FIFO file in one
of the sub-dirs. I rm'd that and the copy worked.

Thanks for the pointer, but shouldn't cp(1) give some kind of
warning/error in this situation instead of just hanging? (I left
it for >1 hour at one point).

Thanks again for your help.

> Doug White                               
> Internet:  dwhite@resnet.uoregon.edu    | FreeBSD: The Power to Serve
> http://gladstone.uoregon.edu/~dwhite    | www.freebsd.org
> 
> 

-- 
      FreeBSD - The Power To Serve http://www.freebsd.org
      My Webpage http://www.users.globalnet.co.uk/~markov
_______________________________________________________________
Mark Ovens, CNC Apps Engineer, Radan Computational Ltd. Bath UK
CAD/CAM solutions for Sheetmetal Working Industry
mailto:marko@uk.radan.com                  http://www.radan.com



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19990407202537.I2018>