disk.go 356 B

123456789101112131415
  1. package stats
  2. import (
  3. "github.com/seaweedfs/seaweedfs/weed/glog"
  4. "github.com/seaweedfs/seaweedfs/weed/pb/volume_server_pb"
  5. )
  6. func NewDiskStatus(path string) (disk *volume_server_pb.DiskStatus) {
  7. disk = &volume_server_pb.DiskStatus{Dir: path}
  8. fillInDiskStatus(disk)
  9. if disk.PercentUsed > 95 {
  10. glog.V(0).Infof("disk status: %v", disk)
  11. }
  12. return
  13. }