I have a server with a program which rapidly writes data to a folder. I attached a new disk to the server, mounted it and now I want it to expand or replace the folder with data. The program works with hardcoded folder names and I don't really want to stop it copy the files to new disk and symlink them to address of the old folder.
My original way would be like this:
rsync -avxP --progress /data/oldsrc /mnt/newsrc/ rm -rf /data/oldsrc ln -s /mnt/newsrc /data/oldsrc
Is there any way to do this without moving/copying old files, removing them from source and linking from new disk to old folder?
Edit: I need all the data in the old folder to be accessible by the program.