Bug 86302 - directory mounted with --bind causes cp -R to fail
directory mounted with --bind causes cp -R to fail
Status: CLOSED UPSTREAM
Product: Red Hat Linux
Classification: Retired
Component: fileutils (Show other bugs)
8.0
i586 Linux
medium Severity medium
: ---
: ---
Assigned To: Tim Waugh
Mike McLean
:
Depends On: 87658
Blocks:
  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:
Environment:
Last Closed: 2004-12-10 07:02:18 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
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):
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 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.