A question for Linux hackers...
On my file server, I have several logical partitions, one of which holds all of my media. This partition is mounted at /mnt/media, but for simplicity, I've added some bind mounts under / to make my paths shorter. Here are the relevant lines in my fstab:
/dev/vg00/media /mnt/media jfs defaults,noatime 1 1
/mnt/media/incoming /incoming none rw,bind 0 0
/mnt/media/music /music none rw,bind 0 0
/mnt/media/photo /photo none rw,bind 0 0
/mnt/media/video /video none rw,bind 0 0
I was using symbolic links instead of bind mounts before, but was having problems traversing them properly from CIFS clients. I think I figured out the smb.conf magic to solve most of those problems, but in that process, discovered bind mounts, and figured they were a better fit for my setup.
The problem I'm having now is that moving files between these bind mounted partitions is slow. For example, say I'm in /incoming ("real" path /mnt/media/incoming) and I want to move a file to /video ("real" path /mnt/media/video). In reality, this is a move on the same partition, and should be instantaneous. However, when I do this, it takes a long time, because the system is clearly copying the entire file. In fact, if I cd to /mnt/media/incoming/video and do a "mv file ../video", the move is instantaneous, as expected.
I think what's happening is that the system doesn't realize that the source and destination mounts are actually on the same partition. So, why not?