diff options
Diffstat (limited to 'weed/storage/volume_loading.go')
| -rw-r--r-- | weed/storage/volume_loading.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/weed/storage/volume_loading.go b/weed/storage/volume_loading.go index 077ce43c6..7064fdc03 100644 --- a/weed/storage/volume_loading.go +++ b/weed/storage/volume_loading.go @@ -43,6 +43,11 @@ func (v *Volume) load(alsoLoadIndex bool, createDatIfMissing bool, needleMapKind hasVolumeInfoFile := v.maybeLoadVolumeInfo() + if v.volumeInfo.ReadOnly && !v.HasRemoteFile() { + // this covers the case where the volume is marked as read-only and has no remote file + v.noWriteOrDelete = true + } + if v.HasRemoteFile() { v.noWriteCanDelete = true v.noWriteOrDelete = false |
