Mark6 Module State Changes
Mark6 modules can be in one of four states: erased, recorded, cataloged and played.
Mark6 state is stored in the metadata state file which is located at /mnt/disks/.meta/<slot>/<disk>/state. The state file is written to each disk in the module.
The following state changes should be allowed:
played -> erased
(which should also trigger the erasure of any data on the module)
erased -> recorded
recorded -> cataloged
cataloged -> played
The "played -> erased" state change occurs when a module is loaded into a unit at the observing site. Software on the Mark6 will detect the newly loaded module, determine that its state is "played", erase the data on the module, and change its state to "erased".
The "erased -> recorded" state change occurs when data is first recorded to a module. The software managing the recording should check for the "erased" state and change the state to "recorded" before recording begins.
The "recorded -> cataloged" state change occurs when a module is inserted into a correlator unit for cataloging. The software managing the cataloging should check for the "recorded" state and change the state to "cataloged" before performing the cataloging procedure.
The "catalogued -> played" state change occurs when a module is used for correlation. The software managing the correlation should check for the "cataloged" state and change the state to "played" before starting the correlation.
"recorded" state modules should be able to be used for continued recording. "played" state modules should be able to be used for continued correlation.
Unexpected state changes should trigger a warning to an operator. Examples: an "erased" module arrives at the correlator for cataloging, and a "cataloged" module arrives at an observing site for recording.
A convenience script, /usr/bin/m6state.sh
, is installed on Mark 6 units to manually perform state changes. It can also be used to force state changes that are not allowed.