0

If someone uses the command "cp -alr" on a directory located in a non-path preserving merged pool will it always create a directory on the same disk with all of its contents as hard links?

For example, if we created a merged pool with category.create=mfs and on the following directory tree we run "cp -alr /romance/TitanicMovie/ /comedy/" what would happen?

Would it create a directory on disk1 called comedy and a hard link to Titanic.mkv or because disk2 has more free space would it copy Titanic.mkv to the directory on disk2 called comedy?

 /mnt/
    ├── disk1/ (Physical Drive mounted,  1TiB in size)
    |   ├── romance/
    |   |   ├── TitanicMovie
    |   |       ├──Titanic.mkv
    ├── disk2/ (Physical Drive mounted,  1TiB in size)
    |   ├── comedy/
    ├── storage/ (mergerFS mounted using: /mnt/disk1:/mnt/disk2 /mnt/storage fuse.mergerfs dropcacheonclose=true,defaults,allow_other,minfreespace=50G,fsname=mergerFS,func.mkdir=all,category.create=mfs 0 0
    |   ├── romance/
    |   |   ├── TitanicMovie
    |   |       ├──Titanic.mkv
    |   ├── comedy/
0

The specific details on how rename and link work are in the docs.

If you're not using path preservation then it clones the path on the same branch (if needed) and performs the rename or link.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.