It is "safe" in that it does not affect already open filehandles (files that have already been reached and opened before "hiding" them). So it won't damage or affect the loop device in any way.
But it is perhaps cumbersome / intransparent to use and might confuse some tools (and users). I'm not sure if systemd itself needs the file to be reachable for statistics and the like.
]]>sudo cryptsetup open /home/ua4000/123/luks2 m123
sudo mount /dev/mapper/m123 /home/ua4000/123
But is this safe, or can this damge the loop file ?
Or any disadvantage ? Did I miss anything ?
The real question is,
all examples I found for loopfiles, incl. Systemd-homed uses two different directories, one that holds the loop image file, and the other holds the target mountpoint:
https://wiki.archlinux.org/title/Systemd-homed
"The image path for the LUKS mechanism is set to /home/username.home. The directory path for the directory mechanism is set to /home/username.homedir."
So why not use the same folder ?
Having in /home/ua4000/luks2 the loop image and then open and mount it to /home/ua4000 ?
Thanks very much!
]]>