If mount a local file(disk) in two different dirctories, it is similar to the network storage. Detecting identical "files" is still a problem.
Such as:
dd if=/dev/zero of=aa bs=1M count=10
mkfs.ext4 aa
Then mount aa to two directories.
mount aa /mnt/dir1
mount aa /mnt/dir2
# tune2fs -l aa
tune2fs 1.42.5 (29-Jul-2012)
Filesystem volume name: <none>
Last mounted on: <not available>
Filesystem UUID: bb095a44-e896-4949-b5f4-9d9468a7178e
Filesystem magic number: 0xEF53
Filesystem revision #: 1 (dynamic)
Filesystem features: has_journal ext_attr resize_inode dir_index filetype needs_recovery extent flex_bg sparse_super huge_file uninit_bg dir_nlink extra_isize
Filesystem flags: signed_directory_hash
Default mount options: user_xattr acl
Filesystem state: clean
Errors behavior: Continue
Filesystem OS type: Linux
Inode count: 2560
Block count: 10240
Reserved block count: 512
Free blocks: 8795
Free inodes: 2549
First block: 1
Block size: 1024
Fragment size: 1024
Reserved GDT blocks: 39
Blocks per group: 8192
Fragments per group: 8192
Inodes per group: 1280
Inode blocks per group: 160
Flex block group size: 16
Filesystem created: Mon Dec 9 14:00:46 2013
Last mount time: Mon Dec 9 14:01:35 2013
Last write time: Mon Dec 9 14:01:35 2013
Mount count: 2
Maximum mount count: -1
Last checked: Mon Dec 9 14:00:46 2013
Check interval: 0 (<none>)
Lifetime writes: 1150 kB
Reserved blocks uid: 0 (user root)
Reserved blocks gid: 0 (group root)
First inode: 11
Inode size: 128
Journal inode: 8
Default directory hash: half_md4
Directory Hash Seed: efe7990e-1414-4ede-9488-4f4d369fe7f5
Journal backup: inode blocks
---
Can create the same file in /mnt/dir1 and /mnt/dir2.
-----
For network storage, usually mounted via FuseFS(such as glusterfs). Can not check file identity when mount in more than a directory. So maybe it is the same as the network storage file.
Best wishes,