samba-in-kubernetes / samba-operator

An operator for a Samba as a service on PVCs in kubernetes
Apache License 2.0
110 stars 24 forks source link

Batching shares into a single instance. #175

Closed phlogistonjohn closed 1 year ago

phlogistonjohn commented 2 years ago

Group multiple shares which export the same PVC into a single cluster instance.

FTS152 commented 1 year ago

Hi, I am curious if SmbShare supports mounting multiple PVCs or multiple share folders for now. For example, can I create a SmbShare deployment that mount two PVCs share1 and share2, then access these shares with one service ip, like smb:\\10.43.0.100\share1 and smb:\\10.43.0.100\share2? Or the feature of accessing multiple shares through one Samba server is still under development?

phlogistonjohn commented 1 year ago

The feature of combining multiple SmbShares within one smbd is in active development (see #240 for all the gory details).

There are a couple of things to note for even after that PR gets completed. First, there's currently no way to add a PVC to an existing pod, so it will only support multiple shares on the same underlying PVC. Second, there's no way to isolate storage from one share vs. another. So if I wanted to use a single smbd to host a 5GB share and a 10GB share I'd need to create a 15GB PVC, but you'd need to make sure the clients honored the limits otherwise a writer to the first share could write >5GB and consume the storage you wanted for the latter share.

I don't know of a way to fix the first issue (multiple pvcs). However, we do have plans that could allow some level of isolation of storage limits (see #256 ) but this is future work and not part of the current PR. It will also depend on underlying fs (e.g. we'll look into supporting that idea on cephfs and xfs).

FTS152 commented 1 year ago

Thanks for the detailed explanation! I've checked the PR and it looks close to completion. I think even with the restrictions you mentioned, this feature is still sufficient for the use case in my last post. Looking forward to the PR to be merged, and the update for user capacity management related features in the future!

phlogistonjohn commented 1 year ago

This is fixed.