diff --git a/cloud/blockstore/libs/client/throttling.cpp b/cloud/blockstore/libs/client/throttling.cpp index a75de57ae3..7ab3d9726a 100644 --- a/cloud/blockstore/libs/client/throttling.cpp +++ b/cloud/blockstore/libs/client/throttling.cpp @@ -95,6 +95,11 @@ class TThrottlerPolicy final break; } + case NCloud::NProto::STORAGE_MEDIA_SSD_LOCAL: + case NCloud::NProto::STORAGE_MEDIA_HDD_LOCAL: + Y_DEBUG_ABORT_UNLESS(false); + [[fallthrough]]; + default: { mediaKindProfile = &Profile.GetHDDProfile(); break; diff --git a/cloud/blockstore/libs/diagnostics/config.cpp b/cloud/blockstore/libs/diagnostics/config.cpp index de8edb1a26..053e059fbd 100644 --- a/cloud/blockstore/libs/diagnostics/config.cpp +++ b/cloud/blockstore/libs/diagnostics/config.cpp @@ -243,6 +243,7 @@ TDuration GetDowntimeThreshold( case NCloud::NProto::STORAGE_MEDIA_SSD_MIRROR2: { return config.GetMirror2SSDDowntimeThreshold(); } + case NCloud::NProto::STORAGE_MEDIA_HDD_LOCAL: case NCloud::NProto::STORAGE_MEDIA_SSD_LOCAL: { return config.GetLocalSSDDowntimeThreshold(); } diff --git a/cloud/blockstore/libs/diagnostics/request_stats.cpp b/cloud/blockstore/libs/diagnostics/request_stats.cpp index d9c5f796af..7ac01faef0 100644 --- a/cloud/blockstore/libs/diagnostics/request_stats.cpp +++ b/cloud/blockstore/libs/diagnostics/request_stats.cpp @@ -178,6 +178,7 @@ class TRequestStats final TRequestCounters TotalSSDMirror3; TRequestCounters TotalSSDLocal; TRequestCounters TotalHDDNonrepl; + TRequestCounters TotalHDDLocal; THdrPercentiles HdrTotal; THdrPercentiles HdrTotalSSD; @@ -187,6 +188,7 @@ class TRequestStats final THdrPercentiles HdrTotalSSDMirror3; THdrPercentiles HdrTotalSSDLocal; THdrPercentiles HdrTotalHDDNonrepl; + THdrPercentiles HdrTotalHDDLocal; public: TRequestStats( @@ -241,6 +243,12 @@ class TRequestStats final TRequestCounters::EOption::AddSpecialCounters | TRequestCounters::EOption::OnlyReadWriteRequests, histogramCounterOptions)) + , TotalHDDLocal(MakeRequestCounters( + timer, + TRequestCounters::EOption::ReportDataPlaneHistogram | + TRequestCounters::EOption::AddSpecialCounters | + TRequestCounters::EOption::OnlyReadWriteRequests, + histogramCounterOptions)) { Total.Register(*Counters); @@ -265,6 +273,9 @@ class TRequestStats final auto hddNonrepl = Counters->GetSubgroup("type", "hdd_nonrepl"); TotalHDDNonrepl.Register(*hddNonrepl); + auto hddLocal = Counters->GetSubgroup("type", "hdd_local"); + TotalHDDLocal.Register(*hddLocal); + if (IsServerSide) { HdrTotal.Register(*Counters); HdrTotalSSD.Register(*ssd); @@ -274,6 +285,7 @@ class TRequestStats final HdrTotalSSDMirror3.Register(*ssdMirror3); HdrTotalSSDLocal.Register(*ssdLocal); HdrTotalHDDNonrepl.Register(*hddNonrepl); + HdrTotalHDDLocal.Register(*ssdLocal); } } @@ -491,6 +503,7 @@ class TRequestStats final TotalSSDMirror3.UpdateStats(updatePercentiles); TotalSSDLocal.UpdateStats(updatePercentiles); TotalHDDNonrepl.UpdateStats(updatePercentiles); + TotalHDDLocal.UpdateStats(updatePercentiles); if (updatePercentiles && IsServerSide) { HdrTotal.UpdateStats(); @@ -501,6 +514,7 @@ class TRequestStats final HdrTotalSSDMirror3.UpdateStats(); HdrTotalSSDLocal.UpdateStats(); HdrTotalHDDNonrepl.UpdateStats(); + HdrTotalHDDLocal.UpdateStats(); } } @@ -521,6 +535,8 @@ class TRequestStats final return TotalSSDLocal; case NCloud::NProto::STORAGE_MEDIA_HDD_NONREPLICATED: return TotalHDDNonrepl; + case NCloud::NProto::STORAGE_MEDIA_HDD_LOCAL: + return TotalHDDLocal; default: return TotalHDD; } @@ -542,6 +558,8 @@ class TRequestStats final return HdrTotalSSDLocal; case NCloud::NProto::STORAGE_MEDIA_HDD_NONREPLICATED: return HdrTotalHDDNonrepl; + case NCloud::NProto::STORAGE_MEDIA_HDD_LOCAL: + return HdrTotalHDDLocal; default: return HdrTotalHDD; } diff --git a/cloud/blockstore/libs/diagnostics/volume_perf.cpp b/cloud/blockstore/libs/diagnostics/volume_perf.cpp index ab35bd17bc..f7d62a133c 100644 --- a/cloud/blockstore/libs/diagnostics/volume_perf.cpp +++ b/cloud/blockstore/libs/diagnostics/volume_perf.cpp @@ -35,6 +35,7 @@ TVolumePerfSettings TVolumePerformanceCalculator::GetConfigSettings( case NCloud::NProto::STORAGE_MEDIA_SSD_MIRROR3: { return diagnosticsConfig->GetMirror3PerfSettings(); } + case NCloud::NProto::STORAGE_MEDIA_HDD_LOCAL: case NCloud::NProto::STORAGE_MEDIA_SSD_LOCAL: { return diagnosticsConfig->GetLocalSSDPerfSettings(); } @@ -240,9 +241,14 @@ void TSufferCounters::PublishCounters() "ssd_local", RunCounters[NCloud::NProto::STORAGE_MEDIA_SSD_LOCAL]); - auto hddCount = RunCounters[NCloud::NProto::STORAGE_MEDIA_DEFAULT] - + RunCounters[NCloud::NProto::STORAGE_MEDIA_HYBRID] - + RunCounters[NCloud::NProto::STORAGE_MEDIA_HDD]; + total += UpdateCounter( + HddLocal, + "hdd_local", + RunCounters[NCloud::NProto::STORAGE_MEDIA_HDD_LOCAL]); + + ui64 hddCount = RunCounters[NCloud::NProto::STORAGE_MEDIA_DEFAULT] + + RunCounters[NCloud::NProto::STORAGE_MEDIA_HYBRID] + + RunCounters[NCloud::NProto::STORAGE_MEDIA_HDD]; total += UpdateCounter(Hdd, "hdd", hddCount); diff --git a/cloud/blockstore/libs/diagnostics/volume_perf.h b/cloud/blockstore/libs/diagnostics/volume_perf.h index aa804d3f30..b547321758 100644 --- a/cloud/blockstore/libs/diagnostics/volume_perf.h +++ b/cloud/blockstore/libs/diagnostics/volume_perf.h @@ -135,6 +135,7 @@ class TSufferCounters TDynamicCounterPtr SsdMirror2; TDynamicCounterPtr SsdMirror3; TDynamicCounterPtr SsdLocal; + TDynamicCounterPtr HddLocal; public: explicit TSufferCounters( diff --git a/cloud/blockstore/libs/endpoints_vhost/external_vhost_server.cpp b/cloud/blockstore/libs/endpoints_vhost/external_vhost_server.cpp index 7d36572b04..b38588d7d4 100644 --- a/cloud/blockstore/libs/endpoints_vhost/external_vhost_server.cpp +++ b/cloud/blockstore/libs/endpoints_vhost/external_vhost_server.cpp @@ -913,9 +913,10 @@ class TExternalVhostEndpointListener final const NProto::TStartEndpointRequest& request, const NProto::TVolume& volume) const { - return volume.GetStorageMediaKind() == NProto::STORAGE_MEDIA_SSD_LOCAL - && request.GetVolumeMountMode() == NProto::VOLUME_MOUNT_LOCAL - && request.GetIpcType() == NProto::IPC_VHOST; + return (volume.GetStorageMediaKind() == NProto::STORAGE_MEDIA_SSD_LOCAL || + volume.GetStorageMediaKind() == NProto::STORAGE_MEDIA_HDD_LOCAL) && + request.GetVolumeMountMode() == NProto::VOLUME_MOUNT_LOCAL && + request.GetIpcType() == NProto::IPC_VHOST; } bool IsFastPathMode( diff --git a/cloud/blockstore/libs/storage/core/config.cpp b/cloud/blockstore/libs/storage/core/config.cpp index 308611ffa9..da8c170468 100644 --- a/cloud/blockstore/libs/storage/core/config.cpp +++ b/cloud/blockstore/libs/storage/core/config.cpp @@ -924,6 +924,7 @@ ui64 GetAllocationUnit( break; case STORAGE_MEDIA_SSD_LOCAL: + case STORAGE_MEDIA_HDD_LOCAL: unit = 4_KB; // custom pool can have any size break; diff --git a/cloud/blockstore/libs/storage/core/volume_model.cpp b/cloud/blockstore/libs/storage/core/volume_model.cpp index 4fea537691..9fbc87607f 100644 --- a/cloud/blockstore/libs/storage/core/volume_model.cpp +++ b/cloud/blockstore/libs/storage/core/volume_model.cpp @@ -114,6 +114,7 @@ bool GetThrottlingEnabled( { switch (volumeParams.MediaKind) { case NCloud::NProto::EStorageMediaKind::STORAGE_MEDIA_SSD_LOCAL: + case NCloud::NProto::EStorageMediaKind::STORAGE_MEDIA_HDD_LOCAL: return false; case NCloud::NProto::EStorageMediaKind::STORAGE_MEDIA_SSD: return config.GetThrottlingEnabledSSD(); @@ -138,6 +139,7 @@ auto GetThrottlingBoostUnits( return config.GetThrottlingSSDBoostUnits(); case NCloud::NProto::EStorageMediaKind::STORAGE_MEDIA_SSD_LOCAL: + case NCloud::NProto::EStorageMediaKind::STORAGE_MEDIA_HDD_LOCAL: case NCloud::NProto::EStorageMediaKind::STORAGE_MEDIA_SSD_NONREPLICATED: case NCloud::NProto::EStorageMediaKind::STORAGE_MEDIA_HDD_NONREPLICATED: case NCloud::NProto::EStorageMediaKind::STORAGE_MEDIA_SSD_MIRROR2: diff --git a/cloud/blockstore/libs/storage/disk_registry/disk_registry_actor_create_disk_from_devices.cpp b/cloud/blockstore/libs/storage/disk_registry/disk_registry_actor_create_disk_from_devices.cpp index 93784dff66..3be5c981a6 100644 --- a/cloud/blockstore/libs/storage/disk_registry/disk_registry_actor_create_disk_from_devices.cpp +++ b/cloud/blockstore/libs/storage/disk_registry/disk_registry_actor_create_disk_from_devices.cpp @@ -19,10 +19,11 @@ void TDiskRegistryActor::HandleCreateDiskFromDevices( const auto& volume = record.GetVolumeConfig(); LOG_INFO(ctx, TBlockStoreComponents::DISK_REGISTRY, - "[%lu] Received CreateDiskFromDevices %s, %d, [ %s] %s", + "[%lu] Received CreateDiskFromDevices %s, %u, %u, [%s] %s", TabletID(), volume.GetDiskId().c_str(), volume.GetBlockSize(), + volume.GetStorageMediaKind(), [&] { TStringStream out; for (auto& d: record.GetDevices()) { @@ -32,6 +33,18 @@ void TDiskRegistryActor::HandleCreateDiskFromDevices( }().c_str(), record.GetForce() ? "force" : ""); + if (!NProto::EStorageMediaKind_IsValid(volume.GetStorageMediaKind())) { + auto response = + std::make_unique( + std::move(MakeError( + E_ARGUMENT, + TStringBuilder() + << "Storage Media kind %d" + << volume.GetStorageMediaKind() << " is not valid."))); + NCloud::Reply(ctx, *ev, std::move(response)); + return; + } + ExecuteTx( ctx, CreateRequestInfo( @@ -42,6 +55,7 @@ void TDiskRegistryActor::HandleCreateDiskFromDevices( record.GetForce(), volume.GetDiskId(), volume.GetBlockSize(), + static_cast(volume.GetStorageMediaKind()), TVector ( record.GetDevices().begin(), record.GetDevices().end()) @@ -74,6 +88,7 @@ void TDiskRegistryActor::ExecuteCreateDiskFromDevices( args.Force, args.DiskId, args.BlockSize, + args.MediaKind, args.Devices, &result); diff --git a/cloud/blockstore/libs/storage/disk_registry/disk_registry_state.cpp b/cloud/blockstore/libs/storage/disk_registry/disk_registry_state.cpp index c5433dc9c0..740a6125e6 100644 --- a/cloud/blockstore/libs/storage/disk_registry/disk_registry_state.cpp +++ b/cloud/blockstore/libs/storage/disk_registry/disk_registry_state.cpp @@ -404,7 +404,8 @@ void TDiskRegistryState::AllowNotifications( if (disk.MediaKind == NProto::STORAGE_MEDIA_SSD_NONREPLICATED || disk.MediaKind == NProto::STORAGE_MEDIA_HDD_NONREPLICATED || - disk.MediaKind == NProto::STORAGE_MEDIA_SSD_LOCAL) + disk.MediaKind == NProto::STORAGE_MEDIA_SSD_LOCAL || + disk.MediaKind == NProto::STORAGE_MEDIA_HDD_LOCAL) { NotificationSystem.AllowNotifications(diskId); } @@ -582,8 +583,9 @@ void TDiskRegistryState::AddMigration( const TString& diskId, const TString& sourceDeviceId) { - if (disk.MediaKind == NProto::STORAGE_MEDIA_SSD_LOCAL - || disk.MediaKind == NProto::STORAGE_MEDIA_HDD_NONREPLICATED) + if (disk.MediaKind == NProto::STORAGE_MEDIA_SSD_LOCAL || + disk.MediaKind == NProto::STORAGE_MEDIA_HDD_LOCAL || + disk.MediaKind == NProto::STORAGE_MEDIA_HDD_NONREPLICATED) { return; } @@ -1959,7 +1961,10 @@ NProto::TError TDiskRegistryState::ValidateDiskLocation( const TVector& diskDevices, const TAllocateDiskParams& params) const { - if (params.MediaKind != NProto::STORAGE_MEDIA_SSD_LOCAL || diskDevices.empty()) { + if ((params.MediaKind != NProto::STORAGE_MEDIA_SSD_LOCAL && + params.MediaKind != NProto::STORAGE_MEDIA_HDD_LOCAL) || + diskDevices.empty()) + { return {}; } @@ -2023,7 +2028,9 @@ TResultOrError TDiskRegistryState::PrepareAllocat ? NProto::DEVICE_POOL_KIND_DEFAULT : NProto::DEVICE_POOL_KIND_GLOBAL; - if (params.MediaKind == NProto::STORAGE_MEDIA_SSD_LOCAL) { + if (params.MediaKind == NProto::STORAGE_MEDIA_SSD_LOCAL || + params.MediaKind == NProto::STORAGE_MEDIA_HDD_LOCAL) + { poolKind = NProto::DEVICE_POOL_KIND_LOCAL; } @@ -6965,6 +6972,7 @@ NProto::TError TDiskRegistryState::CreateDiskFromDevices( bool force, const TDiskId& diskId, ui32 blockSize, + NProto::EStorageMediaKind mediaKind, const TVector& devices, TAllocateDiskResult* result) { @@ -7045,9 +7053,7 @@ NProto::TError TDiskRegistryState::CreateDiskFromDevices( disk.LogicalBlockSize = blockSize; disk.StateTs = now; disk.State = CalculateDiskState(disk); - if (poolKind == NProto::DEVICE_POOL_KIND_LOCAL) { - disk.MediaKind = NProto::STORAGE_MEDIA_SSD_LOCAL; - } + disk.MediaKind = mediaKind; for (auto& uuid: deviceIds) { DeviceList.MarkDeviceAllocated(diskId, uuid); diff --git a/cloud/blockstore/libs/storage/disk_registry/disk_registry_state.h b/cloud/blockstore/libs/storage/disk_registry/disk_registry_state.h index 6692c9fede..a4f29e53e6 100644 --- a/cloud/blockstore/libs/storage/disk_registry/disk_registry_state.h +++ b/cloud/blockstore/libs/storage/disk_registry/disk_registry_state.h @@ -795,6 +795,7 @@ class TDiskRegistryState bool force, const TDiskId& diskId, ui32 blockSize, + NProto::EStorageMediaKind mediaKind, const TVector& devices, TAllocateDiskResult* result); diff --git a/cloud/blockstore/libs/storage/disk_registry/disk_registry_tx.h b/cloud/blockstore/libs/storage/disk_registry/disk_registry_tx.h index 1f3e6af859..739837aa31 100644 --- a/cloud/blockstore/libs/storage/disk_registry/disk_registry_tx.h +++ b/cloud/blockstore/libs/storage/disk_registry/disk_registry_tx.h @@ -1145,6 +1145,7 @@ struct TTxDiskRegistry const bool Force; const TString DiskId; const ui32 BlockSize; + const NProto::EStorageMediaKind MediaKind; const TVector Devices; NProto::TError Error; @@ -1155,11 +1156,13 @@ struct TTxDiskRegistry bool force, TString diskId, ui32 blockSize, + NProto::EStorageMediaKind mediaKind, TVector devices) : RequestInfo(std::move(requestInfo)) , Force(force) , DiskId(std::move(diskId)) - , BlockSize(std::move(blockSize)) + , BlockSize(blockSize) + , MediaKind(mediaKind) , Devices(std::move(devices)) {} diff --git a/cloud/blockstore/libs/storage/service/service_actor_monitoring.cpp b/cloud/blockstore/libs/storage/service/service_actor_monitoring.cpp index de2ff892ba..007b207565 100644 --- a/cloud/blockstore/libs/storage/service/service_actor_monitoring.cpp +++ b/cloud/blockstore/libs/storage/service/service_actor_monitoring.cpp @@ -348,7 +348,10 @@ void TServiceActor::RenderVolumeList(IOutputStream& out) const } TABLED() { if (volume.GetLocalMountClientInfo() && - volume.StorageMediaKind != NProto::STORAGE_MEDIA_SSD_LOCAL) + volume.StorageMediaKind != + NProto::STORAGE_MEDIA_SSD_LOCAL && + volume.StorageMediaKind != + NProto::STORAGE_MEDIA_HDD_LOCAL) { BuildVolumePreemptionButton(out, volume); } diff --git a/cloud/blockstore/libs/storage/stats_service/stats_service_actor.cpp b/cloud/blockstore/libs/storage/stats_service/stats_service_actor.cpp index 059114ba50..c44b432921 100644 --- a/cloud/blockstore/libs/storage/stats_service/stats_service_actor.cpp +++ b/cloud/blockstore/libs/storage/stats_service/stats_service_actor.cpp @@ -54,6 +54,8 @@ void TStatsServiceActor::RegisterCounters(const TActorContext& ctx) auto ssdMirror3Counters = totalCounters->GetSubgroup("type", "ssd_mirror3"); auto ssdSystemCounters = totalCounters->GetSubgroup("type", "ssd_system"); auto hddSystemCounters = totalCounters->GetSubgroup("type", "hdd_system"); + auto hddLocalCounters = totalCounters->GetSubgroup("type", "hdd_local"); + auto ssdLocalCounters = totalCounters->GetSubgroup("type", "sdd_local"); auto localCounters = totalCounters->GetSubgroup("binding", "local"); auto nonlocalCounters = totalCounters->GetSubgroup("binding", "remote"); @@ -66,6 +68,8 @@ void TStatsServiceActor::RegisterCounters(const TActorContext& ctx) State.GetSsdMirror3Counters().Register(ssdMirror3Counters); State.GetSsdSystemCounters().Register(ssdSystemCounters); State.GetHddSystemCounters().Register(hddSystemCounters); + State.GetSsdLocalCounters().Register(ssdLocalCounters); + State.GetHddLocalCounters().Register(hddLocalCounters); State.GetLocalVolumesCounters().Register(localCounters); State.GetNonlocalVolumesCounters().Register(nonlocalCounters); State.GetSsdBlobCounters().Register(ssdCounters); diff --git a/cloud/blockstore/libs/storage/stats_service/stats_service_actor_solomon.cpp b/cloud/blockstore/libs/storage/stats_service/stats_service_actor_solomon.cpp index 79bb683921..f7f1d0a51a 100644 --- a/cloud/blockstore/libs/storage/stats_service/stats_service_actor_solomon.cpp +++ b/cloud/blockstore/libs/storage/stats_service/stats_service_actor_solomon.cpp @@ -96,6 +96,9 @@ void TStatsServiceActor::UpdateVolumeSelfCounters(const TActorContext& ctx) &State.GetSsdMirror3Counters(), &State.GetSsdSystemCounters(), &State.GetHddSystemCounters(), + &State.GetHddSystemCounters(), + &State.GetHddLocalCounters(), + &State.GetSsdLocalCounters(), }; for (auto* tc: totalCounters) { diff --git a/cloud/blockstore/libs/storage/stats_service/stats_service_state.h b/cloud/blockstore/libs/storage/stats_service/stats_service_state.h index 4eb3e6252c..b2b5ae3f9d 100644 --- a/cloud/blockstore/libs/storage/stats_service/stats_service_state.h +++ b/cloud/blockstore/libs/storage/stats_service/stats_service_state.h @@ -170,6 +170,7 @@ class TStatsServiceState TTotalCounters SsdMirror2; TTotalCounters SsdMirror3; TTotalCounters SsdLocal; + TTotalCounters HddLocal; TTotalCounters SsdSystem; TTotalCounters HddSystem; @@ -197,6 +198,7 @@ class TStatsServiceState , SsdMirror2(EPublishingPolicy::DiskRegistryBased) , SsdMirror3(EPublishingPolicy::DiskRegistryBased) , SsdLocal(EPublishingPolicy::DiskRegistryBased) + , HddLocal(EPublishingPolicy::DiskRegistryBased) , SsdSystem(EPublishingPolicy::Repl) , HddSystem(EPublishingPolicy::Repl) , SsdBlobLoadCounters( @@ -265,6 +267,11 @@ class TStatsServiceState return SsdLocal; } + TTotalCounters& GetHddLocalCounters() + { + return HddLocal; + } + TTotalCounters& GetSsdSystemCounters() { return SsdSystem; @@ -288,6 +295,7 @@ class TStatsServiceState case NCloud::NProto::STORAGE_MEDIA_SSD_MIRROR2: return SsdMirror2; case NCloud::NProto::STORAGE_MEDIA_SSD_MIRROR3: return SsdMirror3; case NCloud::NProto::STORAGE_MEDIA_SSD_LOCAL: return SsdLocal; + case NCloud::NProto::STORAGE_MEDIA_HDD_LOCAL: return HddLocal; case NCloud::NProto::STORAGE_MEDIA_HDD: case NCloud::NProto::STORAGE_MEDIA_HYBRID: case NCloud::NProto::STORAGE_MEDIA_DEFAULT: diff --git a/cloud/blockstore/libs/storage/testlib/ss_proxy_client.h b/cloud/blockstore/libs/storage/testlib/ss_proxy_client.h index 4db66526a7..dd97a78b49 100644 --- a/cloud/blockstore/libs/storage/testlib/ss_proxy_client.h +++ b/cloud/blockstore/libs/storage/testlib/ss_proxy_client.h @@ -69,8 +69,10 @@ class TSSProxyClient ? NCloud::NProto::STORAGE_MEDIA_SSD_MIRROR2 : diskId.StartsWith("mirror3-") ? NCloud::NProto::STORAGE_MEDIA_SSD_MIRROR3 - : diskId.StartsWith("local-") + : diskId.StartsWith("ssd-local-") ? NCloud::NProto::STORAGE_MEDIA_SSD_LOCAL + : diskId.StartsWith("hdd-local-") + ? NCloud::NProto::STORAGE_MEDIA_HDD_LOCAL : NCloud::NProto::STORAGE_MEDIA_SSD); } diff --git a/cloud/disk_manager/api/disk.proto b/cloud/disk_manager/api/disk.proto index 3b8cb35f0a..d907300f5d 100644 --- a/cloud/disk_manager/api/disk.proto +++ b/cloud/disk_manager/api/disk.proto @@ -14,6 +14,7 @@ enum DiskKind { DISK_KIND_SSD_LOCAL = 5; DISK_KIND_SSD_MIRROR3 = 6; DISK_KIND_HDD_NONREPLICATED = 7; + DISK_KIND_HDD_LOCAL = 8; } message DiskId { diff --git a/cloud/disk_manager/internal/pkg/clients/nbs/client.go b/cloud/disk_manager/internal/pkg/clients/nbs/client.go index 0821fc9a50..eb3e819622 100644 --- a/cloud/disk_manager/internal/pkg/clients/nbs/client.go +++ b/cloud/disk_manager/internal/pkg/clients/nbs/client.go @@ -68,6 +68,8 @@ func getStorageMediaKind( return core_protos.EStorageMediaKind_STORAGE_MEDIA_SSD_MIRROR3, nil case types.DiskKind_DISK_KIND_SSD_LOCAL: return core_protos.EStorageMediaKind_STORAGE_MEDIA_SSD_LOCAL, nil + case types.DiskKind_DISK_KIND_HDD_LOCAL: + return core_protos.EStorageMediaKind_STORAGE_MEDIA_HDD_LOCAL, nil case types.DiskKind_DISK_KIND_HDD_NONREPLICATED: return core_protos.EStorageMediaKind_STORAGE_MEDIA_HDD_NONREPLICATED, nil default: @@ -100,6 +102,8 @@ func getDiskKind( return types.DiskKind_DISK_KIND_SSD_MIRROR2, nil case core_protos.EStorageMediaKind_STORAGE_MEDIA_SSD_LOCAL: return types.DiskKind_DISK_KIND_SSD_LOCAL, nil + case core_protos.EStorageMediaKind_STORAGE_MEDIA_HDD_LOCAL: + return types.DiskKind_DISK_KIND_HDD_LOCAL, nil case core_protos.EStorageMediaKind_STORAGE_MEDIA_SSD_MIRROR3: return types.DiskKind_DISK_KIND_SSD_MIRROR3, nil case core_protos.EStorageMediaKind_STORAGE_MEDIA_HDD_NONREPLICATED: diff --git a/cloud/disk_manager/internal/pkg/services/disks/service.go b/cloud/disk_manager/internal/pkg/services/disks/service.go index e77c4e3628..e565c02e56 100644 --- a/cloud/disk_manager/internal/pkg/services/disks/service.go +++ b/cloud/disk_manager/internal/pkg/services/disks/service.go @@ -37,6 +37,8 @@ func diskKindToString(kind types.DiskKind) string { return "ssd-mirror3" case types.DiskKind_DISK_KIND_SSD_LOCAL: return "ssd-local" + case types.DiskKind_DISK_KIND_HDD_LOCAL: + return "hdd-local" case types.DiskKind_DISK_KIND_HDD_NONREPLICATED: return "hdd-nonreplicated" } @@ -59,6 +61,8 @@ func prepareDiskKind(kind disk_manager.DiskKind) (types.DiskKind, error) { return types.DiskKind_DISK_KIND_SSD_MIRROR3, nil case disk_manager.DiskKind_DISK_KIND_SSD_LOCAL: return types.DiskKind_DISK_KIND_SSD_LOCAL, nil + case disk_manager.DiskKind_DISK_KIND_HDD_LOCAL: + return types.DiskKind_DISK_KIND_HDD_LOCAL, nil case disk_manager.DiskKind_DISK_KIND_HDD_NONREPLICATED: return types.DiskKind_DISK_KIND_HDD_NONREPLICATED, nil default: diff --git a/cloud/disk_manager/internal/pkg/types/types.proto b/cloud/disk_manager/internal/pkg/types/types.proto index b2ea18ad03..3784f27d66 100644 --- a/cloud/disk_manager/internal/pkg/types/types.proto +++ b/cloud/disk_manager/internal/pkg/types/types.proto @@ -15,6 +15,7 @@ enum DiskKind { DISK_KIND_SSD_LOCAL = 4; DISK_KIND_SSD_MIRROR3 = 5; DISK_KIND_HDD_NONREPLICATED = 6; + DISK_KIND_HDD_LOCAL = 7; } // These values are stored in DB, do not shuffle them around. diff --git a/cloud/disk_manager/pkg/admin/disks.go b/cloud/disk_manager/pkg/admin/disks.go index 592c6a95ac..6f211de18a 100644 --- a/cloud/disk_manager/pkg/admin/disks.go +++ b/cloud/disk_manager/pkg/admin/disks.go @@ -34,6 +34,7 @@ var stringToDiskKind = map[string]diskKind{ "ssd-mirror3": diskKind(disk_manager.DiskKind_DISK_KIND_SSD_MIRROR3), "local": diskKind(disk_manager.DiskKind_DISK_KIND_SSD_LOCAL), "ssd-local": diskKind(disk_manager.DiskKind_DISK_KIND_SSD_LOCAL), + "hdd-local": diskKind(disk_manager.DiskKind_DISK_KIND_HDD_LOCAL), "hdd-nonreplicated": diskKind( disk_manager.DiskKind_DISK_KIND_HDD_NONREPLICATED, ), diff --git a/cloud/storage/core/libs/common/media.cpp b/cloud/storage/core/libs/common/media.cpp index 71dfc816f4..067d48efc7 100644 --- a/cloud/storage/core/libs/common/media.cpp +++ b/cloud/storage/core/libs/common/media.cpp @@ -11,6 +11,7 @@ bool IsDiskRegistryMediaKind(NProto::EStorageMediaKind mediaKind) case NProto::STORAGE_MEDIA_SSD_MIRROR2: case NProto::STORAGE_MEDIA_SSD_MIRROR3: case NProto::STORAGE_MEDIA_SSD_LOCAL: + case NProto::STORAGE_MEDIA_HDD_LOCAL: case NProto::STORAGE_MEDIA_HDD_NONREPLICATED: return true; default: @@ -47,6 +48,8 @@ TString MediaKindToString(NProto::EStorageMediaKind mediaKind) return "ssd_mirror3"; case NProto::STORAGE_MEDIA_SSD_LOCAL: return "ssd_local"; + case NProto::STORAGE_MEDIA_HDD_LOCAL: + return "hdd_local"; case NProto::STORAGE_MEDIA_HDD_NONREPLICATED: return "hdd_nonrepl"; default: @@ -102,6 +105,8 @@ bool ParseMediaKind(const TStringBuf s, NProto::EStorageMediaKind* mediaKind) *mediaKind = NProto::STORAGE_MEDIA_SSD_MIRROR3; } else if (s == "local" || s == "ssd_local") { *mediaKind = NProto::STORAGE_MEDIA_SSD_LOCAL; + } else if (s == "hdd_local") { + *mediaKind = NProto::STORAGE_MEDIA_HDD_LOCAL; } else if (s == "hdd_nonrepl") { *mediaKind = NProto::STORAGE_MEDIA_HDD_NONREPLICATED; } else { diff --git a/cloud/storage/core/protos/media.proto b/cloud/storage/core/protos/media.proto index e7d37ef4d7..c033f4b9e9 100644 --- a/cloud/storage/core/protos/media.proto +++ b/cloud/storage/core/protos/media.proto @@ -18,4 +18,5 @@ enum EStorageMediaKind STORAGE_MEDIA_SSD_LOCAL = 6; STORAGE_MEDIA_SSD_MIRROR3 = 7; STORAGE_MEDIA_HDD_NONREPLICATED = 8; + STORAGE_MEDIA_HDD_LOCAL = 9; }