diff --git a/cmd/lotus-storage-miner/storage.go b/cmd/lotus-storage-miner/storage.go index 0a5505b6a..26a36431e 100644 --- a/cmd/lotus-storage-miner/storage.go +++ b/cmd/lotus-storage-miner/storage.go @@ -200,16 +200,19 @@ var storageListCmd = &cli.Command{ var barCols = int64(50) set := (st.Capacity - st.Available) * barCols / st.Capacity - bar := strings.Repeat("|", int(set)) + strings.Repeat(" ", int(barCols-set)) + used := (st.Capacity - (st.Available + st.Reserved)) * barCols / st.Capacity + reserved := set - used + bar := strings.Repeat("#", int(used)) + strings.Repeat("*", int(reserved)) + strings.Repeat(" ", int(barCols-set)) fmt.Printf("\t[%s] %s/%s %s\n", color.New(percCol).Sprint(bar), types.SizeStr(types.NewInt(uint64(st.Capacity-st.Available))), types.SizeStr(types.NewInt(uint64(st.Capacity))), color.New(percCol).Sprintf("%d%%", usedPercent)) - fmt.Printf("\t%s; %s; %s\n", + fmt.Printf("\t%s; %s; %s; Reserved: %s\n", color.YellowString("Unsealed: %d", cnt[0]), color.GreenString("Sealed: %d", cnt[1]), - color.BlueString("Caches: %d", cnt[2])) + color.BlueString("Caches: %d", cnt[2]), + types.SizeStr(types.NewInt(uint64(st.Reserved)))) si, err := nodeApi.StorageInfo(ctx, s.ID) if err != nil { diff --git a/go.mod b/go.mod index d9c5df181..0cb4462dd 100644 --- a/go.mod +++ b/go.mod @@ -33,7 +33,7 @@ require ( github.com/filecoin-project/go-paramfetch v0.0.2-0.20200701152213-3e0f0afdc261 github.com/filecoin-project/go-statestore v0.1.0 github.com/filecoin-project/go-storedcounter v0.0.0-20200421200003-1c99c62e8a5b - github.com/filecoin-project/sector-storage v0.0.0-20200803184904-3cab915fd225 + github.com/filecoin-project/sector-storage v0.0.0-20200805173933-deec7a2658d4 github.com/filecoin-project/specs-actors v0.8.6 github.com/filecoin-project/specs-storage v0.1.1-0.20200622113353-88a9704877ea github.com/filecoin-project/storage-fsm v0.0.0-20200730122205-d423ae90d8d4 diff --git a/go.sum b/go.sum index b2fd03c3c..095f1d885 100644 --- a/go.sum +++ b/go.sum @@ -262,8 +262,8 @@ github.com/filecoin-project/go-storedcounter v0.0.0-20200421200003-1c99c62e8a5b github.com/filecoin-project/go-storedcounter v0.0.0-20200421200003-1c99c62e8a5b/go.mod h1:Q0GQOBtKf1oE10eSXSlhN45kDBdGvEcVOqMiffqX+N8= github.com/filecoin-project/sector-storage v0.0.0-20200712023225-1d67dcfa3c15/go.mod h1:salgVdX7qeXFo/xaiEQE29J4pPkjn71T0kt0n+VDBzo= github.com/filecoin-project/sector-storage v0.0.0-20200730050024-3ee28c3b6d9a/go.mod h1:oOawOl9Yk+qeytLzzIryjI8iRbqo+qzS6EEeElP4PWA= -github.com/filecoin-project/sector-storage v0.0.0-20200803184904-3cab915fd225 h1:Or2lM5Cdsq0nDrSWp2YO70tjd8Ohg0jVWT/KGP3BX+I= -github.com/filecoin-project/sector-storage v0.0.0-20200803184904-3cab915fd225/go.mod h1:oOawOl9Yk+qeytLzzIryjI8iRbqo+qzS6EEeElP4PWA= +github.com/filecoin-project/sector-storage v0.0.0-20200805173933-deec7a2658d4 h1:vEqr7sPz9sFEe8unfvY5X4DmkQrhmfLvbsXlmVMtmqM= +github.com/filecoin-project/sector-storage v0.0.0-20200805173933-deec7a2658d4/go.mod h1:oOawOl9Yk+qeytLzzIryjI8iRbqo+qzS6EEeElP4PWA= github.com/filecoin-project/specs-actors v0.0.0-20200210130641-2d1fbd8672cf/go.mod h1:xtDZUB6pe4Pksa/bAJbJ693OilaC5Wbot9jMhLm3cZA= github.com/filecoin-project/specs-actors v0.3.0/go.mod h1:nQYnFbQ7Y0bHZyq6HDEuVlCPR+U3z5Q3wMOQ+2aiV+Y= github.com/filecoin-project/specs-actors v0.6.1/go.mod h1:dRdy3cURykh2R8O/DKqy8olScl70rmIS7GrB4hB1IDY=