ceph: allow passing 'osd-crush-initial-weight'
Ceph support the option '--osd-crush-initial-weight' upon OSD start, which sets an explicit weight (in TiB units) to specific OSD. Allow passing this option all the way from the user (similar to 'DeviceClass'), for the special case where end users wants it cluster to have non-even balance over specific OSDs (e.g., one of the OSDs is placed over a partition alongside OS-partition). ROOK issue: https://github.com/rook/rook/issues/7448 Signed-off-by: Shachar Sharon <ssharon@redhat.com>
This commit is contained in:
1 parent
8c1ac86325
commit
9766e9b8fb
12 files changed
+70
No files matched your search
@@ -118,6 +118,7 @@ func addOSDConfigFlags(command *cobra.Command) {
|
||||
command.Flags().IntVar(&cfg.storeConfig.OSDsPerDevice, "osds-per-device", 1, "the number of OSDs per device")
|
||||
command.Flags().BoolVar(&cfg.storeConfig.EncryptedDevice, "encrypted-device", false, "whether to encrypt the OSD with dmcrypt")
|
||||
command.Flags().StringVar(&cfg.storeConfig.DeviceClass, "osd-crush-device-class", "", "The device class for all OSDs configured on this node")
|
||||
command.Flags().StringVar(&cfg.storeConfig.InitialWeight, "osd-crush-initial-weight", "", "The initial weight of OSD in TiB units")
|
||||
}
|
||||
|
||||
func init() {
|
||||
@@ -303,6 +304,7 @@ func parseDevices(devices string) ([]osddaemon.DesiredDevice, error) {
|
||||
d.OSDsPerDevice = cd.StoreConfig.OSDsPerDevice
|
||||
d.DatabaseSizeMB = cd.StoreConfig.DatabaseSizeMB
|
||||
d.DeviceClass = cd.StoreConfig.DeviceClass
|
||||
d.InitialWeight = cd.StoreConfig.InitialWeight
|
||||
d.MetadataDevice = cd.StoreConfig.MetadataDevice
|
||||
|
||||
if d.OSDsPerDevice < 1 {
|
||||
|
||||
Reference in new issue
Block a user