Bug 86302 - directory mounted with --bind causes cp -R to fail
directory mounted with --bind causes cp -R to fail
Product: Red Hat Linux
Classification: Retired
Component: fileutils (Show other bugs)
i586 Linux
medium Severity medium
: ---
: ---
Assigned To: Tim Waugh
Mike McLean
Depends On: 87658
  Show dependency treegraph
Reported: 2003-03-19 02:38 EST by Russell Stuart
Modified: 2007-04-18 12:52 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2004-12-10 07:02:18 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Russell Stuart 2003-03-19 02:38:36 EST
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):

How reproducible:

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:
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 12:57:30 EST
FWIW, rsync seems to behave correctly in this situation.
Comment 2 Tim Waugh 2003-03-31 08:18:15 EST
Reported to bug-coreutils mailing list.

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