Skip to content

Commit 128de36

Browse files
committed
Allow claim sparse device
Signed-off-by: Nobi <[email protected]>
1 parent 6863cc2 commit 128de36

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

pkg/select/blockdevice/select.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,12 @@ func (c *Config) getCandidateDevices(bdList *apis.BlockDeviceList) (*apis.BlockD
5858
FilterBlockDeviceName,
5959
)
6060
} else {
61+
if c.ClaimSpec.DeviceType != "sparse" {
62+
// Unless explicitly specify DeviceType as sparse, device sparse will not be included
63+
filterKeys = append(filterKeys, FilterOutSparseBlockDevices)
64+
}
65+
6166
filterKeys = append(filterKeys,
62-
// Sparse BDs can be claimed only by manual selection. Therefore, all
63-
// sparse BDs will be filtered out in auto mode
64-
FilterOutSparseBlockDevices,
6567
FilterDeviceType,
6668
FilterVolumeMode,
6769
FilterNodeName,

0 commit comments

Comments
 (0)