| Previous | Next |
| ERROR_NOT_SAFEBOOT_SERVICE | ERROR_FILEMARK_DETECTED |
ERROR_END_OF_MEDIA
the physical end of the tape has been reached.
ERROR_END_OF_MEDIA means that a tape operation reached the physical end of the currently loaded medium. In this case, the decisive context is sequential backup and archival systems, together with drive and media identifiers, capacity estimate, partition, block size, and position.
Where the result appears
- sequential backup and archival systems.
- tape restore, verify, copy, or positioning operations.
- multi-volume backup sets.
- legacy removable sequential media workflows.
Typical causes
- the requested read or write extends beyond usable tape length.
- the current volume is full and the backup set expects another medium.
- positioning moved to the physical end rather than a logical file boundary.
- capacity assumptions do not match the loaded cartridge or drive mode.
Evidence to collect
- drive and media identifiers, capacity estimate, partition, block size, and position.
- operation type, requested length, bytes completed, and backup-set sequence.
- drive sense data and tape-library events.
- whether spanning to another volume is configured and which medium is expected next.
For this condition, begin the investigation with drive and media identifiers, capacity estimate, partition, block size, and position. Correlate it with operation type, requested length, bytes completed, and backup-set sequence and check whether the requested read or write extends beyond usable tape length. Capture the original this result immediately after the failing call so later cleanup does not replace the thread-local error value.
Handling and recovery
Finalize the current volume according to the backup format and request the correct next medium when spanning is supported. Do not overwrite or rewind automatically unless the media-management policy explicitly authorizes it. For restore, verify that the expected volume sequence is complete.
Any retry policy for it should be tied to evidence that the current volume is full and the backup set expects another medium has changed. Before another attempt, verify drive sense data and tape-library events. If capacity assumptions do not match the loaded cartridge or drive mode still applies, stop the retry sequence and preserve the first diagnostic event.
Common misinterpretation
Physical end of media is different from an application filemark or setmark. It reflects medium capacity, not merely a logical separator.
Guidance for developers
When surfacing this result through another layer, retain its Win32 domain, numeric value, and the operation described by tape restore, verify, copy, or positioning operations. A useful telemetry record also includes whether spanning to another volume is configured and which medium is expected next. For a-related handling, decisions must use the numeric value and documented API contract rather than localized wording.
A focused test should reproduce the condition in which positioning moved to the physical end rather than a logical file boundary, assert this result, and confirm that the program releases resources associated with multi-volume backup sets. The recovery test should also verify that drive and media identifiers, capacity estimate, partition, block size, and position is refreshed before the operation resumes.
References
Looking for a different code? Search another status or error code.