* shell: harden volume.tier.upload for unattended batch runs
- validate -dest against the master's storage backends before any volume
is marked read-only, instead of failing per volume after the freeze
- mark replicas read-only with canDelete so TTL expiry keeps draining the
volume during the upload, and restore writable marks when the upload or
metadata replication fails partway
- keep going after a per-volume failure in batch mode and report all
errors at the end
- treat an unset -disk as "any disk"; flag.String never returns nil and
ToDiskType("") is the hdd type, so the batch silently skipped ssd and
tagged volumes
Refs #13223
* shell: keep deletes refused while volume.tier.upload copies a volume
A delete accepted during the copy appends a tombstone to the source .dat,
so the attach refuses the upload, and one accepted after a replica's .idx
snapshot is dropped when that replica installs the copy.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* shell: leave replicas that were read-only alone when a tier upload fails
VolumeMarkWritable persists ReadOnly=false, so the rollback cleared an
operator's read-only mark on any replica that was frozen before the run.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* shell: roll back the replica whose read-only mark failed in volume.tier.upload
VolumeMarkReadonly freezes the volume locally before its second master
notification, so an error there leaves the replica read-only although it
never joined the marked list. Also name that replica in the error.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* shell: let the tiered source accept deletes once every replica has its index
The copies load as tiered volumes that accept deletes, but the source kept
the no-delete mark until its next reload, so a delete applied on a copy
then failed on the source.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* shell: bound each rollback mark in volume.tier.upload
A stalled VolumeMarkWritable held up the upload error and, in a batch run,
every later volume.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* shell: keep replicas frozen when the tier upload attached before failing
A stream that breaks after the volume server attached the remote copy
returns an error, and reopening the other replicas then let them take
writes the remote copy lacks. Ask the source first; a rerun finishes the
upload from its remote copy.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* shell: bound the final delete mark in volume.tier.upload
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Chris Lu <chrislusf@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* volume: copying a remote-backed volume only needs space for the index
VolumeCopy sized its target-location check by the source .dat even when
that .dat lives in a cloud tier and only .idx/.vif land locally, so
re-replicating a tiered volume demanded the full remote size in free
disk. Require the index size instead.
* shell: volume.tier.upload keeps volume replicas
Tiering a replicated volume deleted every replica but the upload
source, leaving one server holding the only .idx and the only .vif
that knows the remote object key — losing that server orphaned the
volume even though its data sat intact in the cloud.
Replicate the uploaded .idx/.vif onto the other replica servers
instead (VolumeCopy skips the .dat for remote-backed volumes), so all
replicas serve reads from the same remote object and the volume keeps
its replica count. An already-tiered replica is preferred as the
upload source, so a rerun after a partial failure reuses the existing
remote object instead of uploading a second copy under a new key.
* shell: group tier upload locations instead of re-prepending
* rust volume: copying a remote-backed volume only needs space for the index
Mirror the Go VolumeCopy change: size the free-location check by the
source .idx when the .dat lives in a cloud tier, since only .idx/.vif
land locally.