-
Notifications
You must be signed in to change notification settings - Fork 34
feat(docs): add documentation for the posixfs scan command #1084
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
Open
pbleser-oc
wants to merge
3
commits into
opencloud-eu:main
Choose a base branch
from
pbleser-oc:feat-3182-posixfs-scan-subtree-docs
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+29
−0
Open
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -104,6 +104,35 @@ opencloud storage-users trash-bin restore-all <space-id> | |
|
|
||
| Restoring is only possible to the original location. The behavior when the target name already exists can be configured with the available restore options: skipping, replacing, or keeping both items. | ||
|
|
||
| ### Scanning resources on PosixFS | ||
|
|
||
| When using the [PosixFS Storage Driver](../configuration/storage/posixfs.md) in collaborative mode (with `STORAGE_USERS_POSIX_WATCH_FS` set to `true`), files and directories can be added or manipulated in the storage directly. When files are added, OpenCloud transparently adds metadata to track the files for future changes, as if they were uploaded through OpenCloud. | ||
|
|
||
| Administrators can trigger the storage scanning manually. This might be useful during migrations, or when [collaborative mode](../configuration/storage/posixfs.md#posixfs-collaborative-mode) is disabled. | ||
|
|
||
| It is recommended practice in such situations, since files that have not been scanned | ||
|
|
||
| * may have a negative performance impact when accessed, since OpenCloud transparently performs a storage scan to ingest previously untracked files when listing a directory through its UIs and APIs (but not recursively) | ||
| * prevents those files from being accounted for in directory tree sizes and quotas | ||
|
|
||
| For such cases, use the following command: | ||
|
|
||
| ```bash | ||
| opencloud posixfs scan [path path ...] | ||
| ``` | ||
|
|
||
| Optionally, one might want to specify resources to scan, using optional arguments that specify paths. | ||
|
|
||
| When that path is a directory, it will recurse and perform a storage scan for all the files contained within that directory and all its subdirectories. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. should we also mention about scanning space? |
||
|
|
||
| And when that path is a regular file instead, it will solely perform a storage scan on that one file. | ||
|
|
||
| Note that in either case, the resource must be underneath the PosixFS storage root, or be the PosixFS storage root itself, as set using `STORAGE_USERS_POSIX_ROOT`; if not, an error will occur. | ||
|
|
||
| When no arguments are specified, the default behavior is to start the storage scanning recursively at the root of the PosixFS storage (as defined by `STORAGE_USERS_POSIX_ROOT`). | ||
|
|
||
| The optional command-line option `--halt-on-error` (or `-E`) will make the command stop as soon as an error is encountered, whereas the default behaviour is to keep going by skipping paths that yield unrecoverable errors and proceeding to processing the subsequent ones. | ||
|
|
||
| ## Uploads | ||
|
|
||
| The `opencloud storage-users uploads sessions` command lists and manages upload sessions. Flags can be combined to filter sessions by state. | ||
|
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This sentence feels incomplete.
maybe like:
It is recommended to scan files in such situations because unscanned files: