Current my entrypoint inside my docker is doing a mv on a folder which is 5GB.
In kubernetes, the command become a copy and it take up to around 5min for the mv command to complete.
Previously in Vsphere Integrated Container (VIC), the command take 1 sec to complete as it really a move command.
Please let me know if anyone know some setting which i can so that kubernetes will do a mv instead of a copy.
Kubernetes version: NA
Cloud being used: Private Cloud
Installation method: NA
Host OS: Linux
CNI and version: NA
CRI and version: NA
You can format your yaml by highlighting it and pressing Ctrl-Shift-C, it will make your output easier to read.
This is entirely about what kind of volume you are using and how your node mounts. If you are copying between different mounts, the move has to become a copy plus delete.
If it is on the same filesystem it SHOULD optimize to a rename(). If it isn’t you might have to peek at whatever tool you are using (e.g. strace) to see why it is deciding it can’t
Any idea how can I force to the same mount? Cause I really just doing a simple mv command and it will be up to system to decide. When i did strace on mv command, it is showing up as a cp command.
You have not provided nearly enough information to hazard a guess on this. We would need to know what kind of volumes, how they are provisioned, where they are mounted, whether the move op crossed volumes, etc.