LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Kernel (https://www.linuxquestions.org/questions/linux-kernel-70/)
-   -   How does AUFS work when we delete a file and remount it into the union? (https://www.linuxquestions.org/questions/linux-kernel-70/how-does-aufs-work-when-we-delete-a-file-and-remount-it-into-the-union-4175720499/)

fulalas 01-04-2023 05:09 AM

How does AUFS work when we delete a file and remount it into the union?
 
I'm using Porteus, which uses AUFS filesystem to mount modules into the union on the fly. I noticed that if I delete a file from the union (e.g /usr/bin/xfce4-taskmanager) it appears in /mnt/live/memory/changes/usr/bin as .wh.xfce4-taskmanager with zero byte. So far so good. However, if I try to mount a module with the same file/path, it doesn't appear in the union. Somehow the whiteout file has a higher priority in the stack. If I delete the whiteout file, then the real file (/usr/bin/xfce4-taskmanager) will automatically appear in the union. Also, if I manually copy (instead of mounting) the real file to the union, it appears normally and can be executed without any problem.

1- Is this the expected behavior?
2- Is there a way to set the whiteout files to have the lowest priority in the stack so that mounting files into the union will make them appear for the user?


All times are GMT -5. The time now is 10:41 PM.