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

Use NVMe Optimally #295

Open
old-square-eyes opened this issue May 14, 2022 · 2 comments
Open

Use NVMe Optimally #295

old-square-eyes opened this issue May 14, 2022 · 2 comments
Labels

Comments

@old-square-eyes
Copy link

old-square-eyes commented May 14, 2022

I have a NVMe as my landing zone. I also have it in the storage pool.

  • FSCK seems to run quickly off simlinks in the samba shares/LZ of the NVMe. So that's a bonus.
  • Witing filkes to the shares is also nice and quick, as is listing directories over SAMBA. Great.

Opening files is still slow because the simlink often points out to HDD.

I know I can use sticky files directive to consolidate a complete set of files to one disk. So I could potentially use the below to pin my photos in a complete set, for example, to the NVMe.

sticky_files = Photos/
	stick_into = /mnt/NVMe/gh

Is this the correct way to do it? If I have # of copies of photos, set to 3... how will greyhole link the one on the NVMe in preference so opening those files over SAMBA gets the fasted read possible?

@gboudreau
Copy link
Owner

Since you define a stick_into, the specified drive should always be used as the first drive where a copy will be created, for the Photos share. And normally, unless the file copy failed, the 1st drive used is the one that will be used to created the link in the LZ. So for all new photos, the symlink should point to /mnt/NVMe.

For already existing links, after you changed your config to add the sticky option (and restarted the daemon), you could:

  • greyhole --fsck --dir=/path/to/Photos/LZ/ ; will ensure a copy of all your photos exist on /mnt/NVMe, per your sticky config.
  • rename all /mnt/*/gh/Photos to Photos.bak, except for /mnt/NVMe/gh/Photos ; all symlinks in your LZ that are NOT pointing to a copy on /mnt/NVMe will be broken
  • greyhole --fix-symlinks ; will re-create broken symlinks by using the only available copy at this point, i.e. the one in /mnt/NVMe/gh/Photos
  • rename all /mnt/*/gh/Photos.bak to Photos

@old-square-eyes
Copy link
Author

old-square-eyes commented May 15, 2022 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants