Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 86302 - directory mounted with --bind causes cp -R to fail
Summary: directory mounted with --bind causes cp -R to fail
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: fileutils
Version: 8.0
Hardware: i586
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Tim Waugh
QA Contact: Mike McLean
URL:
Whiteboard:
Depends On: 87658
Blocks:
TreeView+ depends on / blocked
 
Reported: 2003-03-19 07:38 UTC by Russell Stuart
Modified: 2007-04-18 16:52 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2004-12-10 12:02:18 UTC


Attachments (Terms of Use)

Description Russell Stuart 2003-03-19 07:38:36 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20021224

Description of problem:
This command:
  cp --archive --one-file-system --verbose src dst
fails if the directory src contains a mount point
mounted with 'mount --bind'.

Version-Release number of selected component (if applicable):
fileutils-4.1.9-11

How reproducible:
Always

Steps to Reproduce:
Run these commands as root:
  mkdir -p src/{x,y}
  mount --bind src/x src/y
  cp --archive --one-file-system src dst

Actual Results:  The cp command exits with a status of 1
and gives the error message:
  cp: will not create hard link `dst/y' to directory `dst/x'
This directory structure is created:
  dst/
    x/
Note: there is no dst/y.

Expected Results:
1. cp should give no error messages.
2. cp should have an exit status of 0.
3. cp should create the directories dst/, dst/x/ and dst/y/.

Comment 1 Tim Waugh 2003-03-19 17:57:30 UTC
FWIW, rsync seems to behave correctly in this situation.

Comment 2 Tim Waugh 2003-03-31 13:18:15 UTC
Reported to bug-coreutils mailing list.


Note You need to log in before you can comment on or make changes to this bug.