[ 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 13:37
Message generated for change (Tracker Item Submitted) made by Item Submitter
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: None
Group: None
Status: Open
Resolution: None
Priority: 5
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.


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

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 the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
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.