| Previous | Next |
| ERROR_FILEMARK_DETECTED | ERROR_SETMARK_DETECTED |
ERROR_BEGINNING_OF_MEDIA
the beginning of the tape or a partition was encountered.
ERROR_BEGINNING_OF_MEDIA means that a backward positioning or access operation reached the start of a tape or tape partition. In this case, the decisive context is rewind and reverse-spacing commands, together with current partition, file number, block number, and requested movement.
Where the result appears
- rewind and reverse-spacing commands.
- restore tools navigating among tape files.
- partitioned tape media.
- diagnostic or inventory software querying sequential-media position.
Typical causes
- the requested reverse movement exceeds the current position.
- the drive is already at load point or partition start.
- the caller used an incorrect position or partition assumption.
- a previous operation rewound or repartitioned the medium.
Evidence to collect
- current partition, file number, block number, and requested movement.
- previous positioning commands and drive completion statuses.
- media type and partition configuration.
- whether a tape library or another process changed drive state.
For this condition, begin the investigation with current partition, file number, block number, and requested movement. Correlate it with previous positioning commands and drive completion statuses and check whether the requested reverse movement exceeds the current position. Capture the original this result immediately after the failing call so later cleanup does not replace the thread-local error value.
Handling and recovery
Treat the condition as a positioning boundary. Recalculate the desired location from a known load point or catalog coordinate instead of issuing repeated reverse commands. If the boundary is unexpected, verify that the correct cartridge and partition are loaded.
Any retry policy for it should be tied to evidence that the drive is already at load point or partition start has changed. Before another attempt, verify media type and partition configuration. If a previous operation rewound or repartitioned the medium still applies, stop the retry sequence and preserve the first diagnostic event.
Common misinterpretation
The beginning-of-media condition does not mean the tape is blank. Data may begin at or after the current logical position.
Guidance for developers
When surfacing this result through another layer, retain its Win32 domain, numeric value, and the operation described by restore tools navigating among tape files. A useful telemetry record also includes whether a tape library or another process changed drive state. 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 the caller used an incorrect position or partition assumption, assert this result, and confirm that the program releases resources associated with partitioned tape media. The recovery test should also verify that current partition, file number, block number, and requested movement is refreshed before the operation resumes.
References
Looking for a different code? Search another status or error code.