I'm assuming that the three directories /home
, /data
and /apps
are mount points.
When you mount something on /home
, the inode that is reported for /home
is the inode of the root directory of the mounted partition, not that of the original /home
directory. It is therefore not strange that these inodes are the same as those of other partition's root directories.
On my OpenBSD machine (which doesn't use btrfs):
$ find / -xdev -inum 2
/
/home
/usr
/var
/tmp
I see the same on my Ubuntu VM. This is not a bug.
Another way of saying it: The stat
structure returned by the stat()
system call for the different directories have the same value of st_ino
, but different values of st_dev
. See the description of stat()
and sys/stat.h
in POSIX.
It may be that you misunderstand the -xdev
option to find
. With it, it will not descend into those directories that are on other filesystems, but it will still print the directory names if they match the other criteria.