Closed chhsia0 closed 5 years ago
I think its problematic from few reasons:
So I believe the plugin should be responsible to identify if fstype exist on the PV or not.
Discussed in the community sync. This would be hard for COs to decide whether the node-side volume creation call should be called for pre-existing volumes. Closing this. If there's an actual use case we can reopen this for further discussion.
Currently the filesystem handling is completely implicit to the CO. After a volume is created, the plugin will do
mkfs
whenever the volume is first node-staged or node-published. That means a stateless plugin would need to check if the volume already has a filesystem successfully created before or not in its node-stage or node-publish logic.With the introduction of #222, we have a use case that the CO may want to handle the filesystem explicitly: during a volume expansion, the CO may be required to call
NodeExpandVolume
to signal the plugin to expand the filesystem. So here we have an inconsistency for handling filesystems between volume creation and expansion. Should this be unified by aNodeCreateVolume
call for node-side work of volume creation? This would make plugin writers' lives easier, since they no longer need to check if the filesystem already exists.The downside is that the CO need to do keep track of the state of filesystem creation and make this extra call, similar to the case of volume expansion.