Yes, it is possible to relocate a Btrfs subvolume within the same root without copying the data. Btrfs provides the ability to perform subvolume relocation using the Btrfs subvolume set command with the '-r' option. Here's how you can achieve it:
Ensure that you have enough free space within the target subvolume (docker) to accommodate the data from the subvolume you want to move (docker/nc/data).
Before proceeding, make sure there are no active processes accessing or modifying the subvolume you want to relocate. It's recommended to unmount the subvolume if it is currently mounted.
Open a terminal or shell and run the following command to perform the subvolume relocation:
sudo btrfs subvolume set-default <new_path> <old_path>
In your case, the command would look like this:
sudo btrfs subvolume set-default /docker/nc/config/data /docker/nc/data
After executing the command, the subvolume will be relocated to the new path without copying the data. It's important to note that the process is instantaneous as it simply updates the metadata of the subvolume.
Finally, you can verify the relocation by listing the subvolumes again:
sudo btrfs subvolume list /
You should see that the subvolume docker/nc/data has been relocated to the new path docker/nc/config/data while preserving the data.
Remember to update any references or configurations that rely on the old path to reflect the new path.
Please note that it is always recommended to have backups of your data before performing any modifications to your file system structure.