Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change file path on filestore because of a rename in physical storage #8198

Open
nickreserved opened this issue Jun 17, 2021 · 1 comment
Open
Labels
kind/feature A new feature need/triage Needs initial labeling and prioritization

Comments

@nickreserved
Copy link

I have my complete FOOBAR collection in filestore.
Now I want, in my disk to rename a folder containing 1000000 TB of data.
Just a (folder or file) rename.

How filestore handle this EFFICIENTLY?

If we talk about torrents, filestore is the way torrents work.
EVERY torrent client has a "Set data location".
Because data moved often. This is the case.

So, I propose
ipfs filestore mv [-r] old_path new_path
-r includes all children folders and files (implies that old_path is a path to a directory).
No checks for hashes (if someone runs this command implies that he knows what he does).

Others propose add --nocopy with the same content from another location to replace old location.
This, I believe is wrong because new content must be hashed again. No. Just rename underling files.

I see, file paths stored in LevelDB databases.
So, it is easy to implement an additional rename operation (I believe).

@nickreserved nickreserved added kind/feature A new feature need/triage Needs initial labeling and prioritization labels Jun 17, 2021
@Jorropo
Copy link
Contributor

Jorropo commented Jun 21, 2021

ipfs filestore mv [-r] old_path new_path

It's a so good idea that someone already proposed it :D (in a sense it's good because indepent people comming up to the same solution probably mean this is a good solution)
see #3981 (comment)

This is a duplicate of #4193 then.

Actually I don't like this, for me filestore in the current form is a pretty good hack, but a hack non the less. I'm more for #8201 (oh my own issue what a surprise) and #7557, reflink makes more sense to me and include way less way to silently mess up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature A new feature need/triage Needs initial labeling and prioritization
Projects
None yet
Development

No branches or pull requests

2 participants