[ ssic-linux-Bugs-1949568 ] st_dev from stat(2) doesn't include node

"SourceForge.net" <[email protected]>
Newsgroups gmane.linux.cluster.ssic.devel
Message-ID <[email protected]>
Bugs item #1949568, was opened at 2008-04-23 07:37
Message generated for change (Comment added) made by rogertsang
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=405834&aid=1949568&group_id=32541

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
>Category: Filesystem
>Group: default
>Status: Closed
>Resolution: Wont Fix
>Priority: 1
Private: No
Submitted By: John Hughes (hughesj)
Assigned to: Nobody/Anonymous (nobody)
Summary: st_dev from stat(2) doesn't include node

Initial Comment:
Recipe for confusion.  Two nodes have identical hardware, they both have an identical filesystem on /dev/hda1.

Mount the two filesystems, and try to copy a file with the same inode# from one to another:

# onall grep hda1 /proc/mounts
(node 1)
/dev/1/hda1 /boot cfs rw,node=1 0 0
(node 2)
/dev/hda1 /mnt cfs rw,node=2 0 0
# ls -li /boot/grub/menu.lst /mnt/grub/menu.lst
46190 -rw-r--r-- 1 root root 4033 2008-04-22 15:18 /boot/grub/menu.lst
46190 -rw-r--r-- 1 root root 4033 2008-04-22 15:34 /mnt/grub/menu.lst
# cp /boot/grub/menu.lst /mnt/grub/menu.lst
cp: `/boot/grub/menu.lst' and `/mnt/grub/menu.lst' are the same file

Problem is that cp thinks they're the same file if they've got the same st_dev (which they do) and st_inode (which they do).

In this case it happened 'cos I copied the filesystem between the two nodes, but it could happen randomly if filesystems are mounted on more than one node.


----------------------------------------------------------------------

>Comment By: Roger Tsang (rogertsang)
Date: 2008-05-23 20:18

Message:
Logged In: YES 
user_id=1246761
Originator: NO

Not worth mucking with coreutils for something this rare plus we're not
going to touch VFS, ask the architect.  Can be worked around by sysadmin.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=405834&aid=1949568&group_id=32541

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.