rbd: do not run mkfs on a BlockMode volume

Signed-off-by: Niels de Vos <ndevos@ibm.com>
This commit is contained in:
Niels de Vos 2023-03-03 12:15:38 +01:00 committed by mergify[bot]
parent 9c0fa09f19
commit 37c8f07ed5

View File

@ -781,7 +781,7 @@ func (ns *NodeServer) mountVolumeToStagePath(
readOnly = true
}
if existingFormat == "" && !staticVol && !readOnly {
if existingFormat == "" && !staticVol && !readOnly && !isBlock {
args := mkfsDefaultArgs[fsType]
// if the VolumeContext contains "mkfsOptions", use those as args instead