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

req: allow archive to send to directory vs drives #322

Closed
wants to merge 1 commit into from

Conversation

Fmstrat
Copy link
Contributor

@Fmstrat Fmstrat commented May 10, 2021

Handles #321

The archiver currently requires separate drives to be mounted for archiving. For instance:

  • /mnt (a folder on the root drive)
    • /mnt/drive1 (a physical drive/mount in df)

However, if you have a RAID or ZRAID where you are storing elements, there is no "mounted drive" to use. For instance:

  • /storage (a RAID array with lots of items on it
    • /storage/random (some random files)
    • /storage/plots (where you want your plots to go)
    • /storage/morerandom (some random files)

This PR adds a new configuration option of rsyncd_type which defaults to drives if it does not exist in the configuration (the original method).

If it is set to directory in the configuration YAML, then:

  • df checks free space on the destination directory without requiring it to be a separate mounted disk
  • The same path replacements happen, which means the share name (ex: chia) would be the rsync destination, which in turn is the single directory destination

I've run this across 3 plots in testing, and all functions smoothly.

@Fmstrat
Copy link
Contributor Author

Fmstrat commented May 10, 2021

Note: I'll update the WIKI once this is merged.

@@ -8,6 +8,7 @@ def test_compute_priority():
def test_rsync_dest():
arch_dir = '/plotdir/012'
arch_cfg = configuration.Archive(
rsyncd_type='drives'

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might appease tests:

Suggested change
rsyncd_type='drives'
rsyncd_type='drives',

@altendky
Copy link
Collaborator

Archiving is being significantly reworked in terms of the identification of target directories and the transfer commands. This will allow users to enter their own scripts for those activities as well as set us up to generically provide multiple presets. There is already a local and remote rsync option in target_definitions.yaml in #627, though both use the existing 'find mounted drives in the specified directory' logic. The interest here should be able to be implemented as another preset. After the custom archival PR is merged, let's add a preset there.

@altendky
Copy link
Collaborator

I believe you could implement this now by way of a custom archive target definition (released in v0.4). The transfer script wouldn't need to change. The disk space script could loop over the configured directories and check and report the space for each.

I do appreciate the effort to contribute this to the project and apologize for my very slow handling of yours and other contributions.

@altendky
Copy link
Collaborator

I think that adding this now would take a sufficiently different form that it probably ought to be submitted as a new PR.

@altendky altendky closed this Jun 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants