currently i have a setup with two hardrives, one with xfs, the other one with btrfs on it.
The root fs is mounted on the xfs, and the btrfs under /data.
For verious reasons, the directory /var/www
on the xfs was replaced by a bind mount to /data/var/www.
(mount -o bind /data/var/www /var/www
) So if you look in both directories (/var/www & /data/var/www
) its exactly the same content.
To my surprise some btrfs tools cannot handle bind mounted pathes, so whatever i i do i need for certain situations that the given path "/var/ww" is canonicalized to "/data/var/www"
How can i do that with a shell tool?
something like resolve /var/www
which would then return /data/var/www
(or if there is more than one bind mount, it would return the proper path.
mount --bind
. Is/var/www
itself a mount point? If not, you have a submount, and that might be what btrfs tools have trouble with. If the problem is submounts, finding a mount point for the original can't be done in general, because it might not even exist. But something might work for your setup. Explain your setup instead of focusing on the wrong issue. – Gilles 'SO- stop being evil' Feb 07 '16 at 13:51