Quote Originally Posted by kl522 View Post
Actually you did not answer my question (2) directly, but from the flow of the sentences, it appears to me you are overwritting knoppix-data while you are having it mounted. Since the whole operation is surrounded on increasing the size of knoppix-data, it might be safe to perform it while having knoppix-data mounted, but personally I am not sure it will be 100% safe.
and actively using the file. Just like you can mv a running exectutable to another file of the same name, you can do this with files tied to a loopback. I think the mv will create a hard link to the new file then remove the old file. All open file descriptors will still point to the correct data blocks.

I ran this script as knoppix on my system and had no issues. Until I rebooted, the kernel still sees knoppix-data.bak content exactly as it was when it was before the mv.