mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-10-21 10:07:24 +08:00
support customizable disk type
This commit is contained in:
@@ -373,10 +373,3 @@ func (l *DiskLocation) CheckDiskSpace() {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
func (l *DiskLocation) GetDiskType() string {
|
||||
if l.DiskType == SsdType {
|
||||
return "SSD"
|
||||
}
|
||||
return "HDD"
|
||||
}
|
||||
|
@@ -173,6 +173,7 @@ func collectStatForOneVolume(vid needle.VolumeId, v *Volume) (s *VolumeInfo) {
|
||||
ReadOnly: v.IsReadOnly(),
|
||||
Ttl: v.Ttl,
|
||||
CompactRevision: uint32(v.CompactionRevision),
|
||||
DiskType: v.DiskType().String(),
|
||||
}
|
||||
s.RemoteStorageName, s.RemoteStorageKey = v.RemoteStorageNameKey()
|
||||
|
||||
|
@@ -24,3 +24,10 @@ func ToDiskType(vt string) (diskType DiskType) {
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func (diskType DiskType) String() string{
|
||||
if diskType == "" {
|
||||
return "hdd"
|
||||
}
|
||||
return string(diskType)
|
||||
}
|
||||
|
Reference in New Issue
Block a user