Storage detach/attach in lotus-miner, cli commands
This commit is contained in:
@@ -1206,6 +1206,22 @@ func (sm *StorageMinerAPI) StorageAddLocal(ctx context.Context, path string) err
|
||||
return sm.StorageMgr.AddLocalStorage(ctx, path)
|
||||
}
|
||||
|
||||
func (sm *StorageMinerAPI) StorageDetachLocal(ctx context.Context, path string) error {
|
||||
if sm.StorageMgr == nil {
|
||||
return xerrors.Errorf("no storage manager")
|
||||
}
|
||||
|
||||
return sm.StorageMgr.DetachLocalStorage(ctx, path)
|
||||
}
|
||||
|
||||
func (sm *StorageMinerAPI) StorageRedeclareLocal(ctx context.Context, id *storiface.ID, dropMissing bool) error {
|
||||
if sm.StorageMgr == nil {
|
||||
return xerrors.Errorf("no storage manager")
|
||||
}
|
||||
|
||||
return sm.StorageMgr.RedeclareLocalStorage(ctx, id, false)
|
||||
}
|
||||
|
||||
func (sm *StorageMinerAPI) PiecesListPieces(ctx context.Context) ([]cid.Cid, error) {
|
||||
return sm.PieceStore.ListPieceInfoKeys()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user