diff --git a/weed/storage/disk_location.go b/weed/storage/disk_location.go index 99c4f3c34..9589d9281 100644 --- a/weed/storage/disk_location.go +++ b/weed/storage/disk_location.go @@ -164,10 +164,11 @@ func (l *DiskLocation) UnloadVolume(vid VolumeId) error { l.Lock() defer l.Unlock() - _, ok := l.volumes[vid] + v, ok := l.volumes[vid] if !ok { return fmt.Errorf("Volume not loaded, VolumeId: %d", vid) } + v.Close() delete(l.volumes, vid) return nil }