4 ms·
pedrocr's comment above suggests a good solution: 1. Copy each file from the source volume to a single directory (e.g. /tmp) on the target volume, named for th
by sounds 12y ago
pedrocr's comment above suggests a good solution:
1. Copy each file from the source volume to a single directory (e.g. /tmp) on the target volume, named for the source volume inode number.
(edit: I suggest using a hierarchy of dirs to avoid the "too many dentry's" slowdown)
2. If the file has already been copied, it will already exist in /tmp - looking up the inode is a vanilla directory lookup
3. Create a hard link from /tmp to the actual path of the file
4. When all the files have been created on the target volume, delete the inode numbers in /tmp