Bug 87658 - mount --bind creates directories with shared dev/ino
Summary: mount --bind creates directories with shared dev/ino
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: kernel
Version: 9
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Arjan van de Ven
QA Contact: Brian Brock
Depends On:
Blocks: 86302
TreeView+ depends on / blocked
Reported: 2003-03-31 22:58 UTC by Tim Waugh
Modified: 2007-04-18 16:52 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2004-09-30 15:40:42 UTC

Attachments (Terms of Use)

Description Tim Waugh 2003-03-31 22:58:23 UTC
Description of problem:
The device/inode numbers of the mount-point and the source directory of a bind
mount are the same.

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

How reproducible:

Steps to Reproduce:
As root:

mkdir x y
mount --bind x y
stat --format='%d %n' x y
touch x/foo
ln x/foo y/bar

Actual results:
773 x
773 y
ln: creating hard link `y/bar' to `x/foo': Invalid cross-device link

Expected results:
Different device numbers.

Additional info:
This is connected with bug #86302 (cp --preserve=links vs mount --bind).

Comment 1 Arjan van de Ven 2003-04-11 13:26:29 UTC
it's the same device.... what's the issue ??????

Comment 2 Tim Waugh 2003-05-22 10:32:47 UTC
That ln is told it can't make a *cross*-device link, i.e. a link between two
different devices.

If the mount points are the same device, why can't I make a link between them?

Comment 3 Bugzilla owner 2004-09-30 15:40:42 UTC
Thanks for the bug report. However, Red Hat no longer maintains this version of
the product. Please upgrade to the latest version and open a new bug if the problem

The Fedora Legacy project (http://fedoralegacy.org/) maintains some older releases, 
and if you believe this bug is interesting to them, please report the problem in
the bug tracker at: http://bugzilla.fedora.us/

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