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

NAS support #1632

Open
willprice-oracle opened this issue Oct 8, 2024 · 5 comments
Open

NAS support #1632

willprice-oracle opened this issue Oct 8, 2024 · 5 comments

Comments

@willprice-oracle
Copy link

The README claims:

Compatible with Ecosystem: Storage backend support with Registry, OSS, NAS, Shared Disk, and P2P service. Compatible with the OCI images, and provide native eStargz images support.

But I can't find any documentation on what sort of network attached storage is supported. The configuration files indicates only local filesystems or block devices can be used, but is there existing support for using shared networked block volumes, NFS, or other similar technologies?

Many thanks

@imeoer
Copy link
Collaborator

imeoer commented Oct 8, 2024

It is better to mount NFS to the local directory and then configure nydus to use localfs as storage backend.

@willprice-oracle
Copy link
Author

Hi @imeoer,
Thanks for the feedback.

Q1: Am I right in understanding that you're suggesting configuring the nydusd backend like so:

{
  "device": {
    "backend": {
      "type": "localfs",
      "config": {
        "dir": "/var/lib/nydus/blobs"
      }
    },
    "cache": {
      "type": "dummycache",
    }
  },
  "mode": "direct",
  "digest_validate": false,
  "iostats_files": false,
  "enable_xattr": false
}

Where I have /var/lib/nydus/blobs as an NFS mount?

Some notes on the configuration:

  • I've disabled the blobcache, replacing it with the dummycache, since the hosts I have won't have any persistent local storage.
  • I've disabled xattr since NFS doesn't support xattr.

Q2: If I assume my registry hosts are the only ones that are writing to the NFS share, am I correct in thinking that there won't be any trampling of state?

Q3: I'm assuming that I can't avoid the duplication of the nydus metadata files that the container hosts will download from the registry? In other words, there's not a way for me to store those metadata files on NFS too?

@imeoer
Copy link
Collaborator

imeoer commented Oct 9, 2024

A1: Right, the /var/lib/nydus/blobs directory should include all the blob files, for example, the sha256:xxx blob should name it xxx.
A2: What's means trampling of state? The opened blob files by nydusd should be readonly.
A3: Nydusd can mount a bootstrap (metadata) file from a local file, so we can also put it in a NAS mount directory.

@willprice-oracle
Copy link
Author

Great, thanks again for your answers @imeoer . And for A2, yes, I did mean nydusd clients writing to the NFS store, it's good to have confirmation it uses it readonly.

@imeoer
Copy link
Collaborator

imeoer commented Oct 9, 2024

The files in device.backend.config.dir should be readonly, the cache dir (device.cache, but expect dummycache) should be writable.

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

No branches or pull requests

2 participants