﻿# Invalidate stale MIG identity records after instance recreation

Treat a recreated MIG allocation as a new identity mapping and validate current version-specific enumeration before using old selection records.

Author: Retrivium editorial team
Updated: 2026-11-03
Canonical URL: https://retrivium.ai/journal/guide-linux-mig-identity-generation/
Language: en

A scheduler retains a MIG identifier after the instance layout is destroyed and recreated. Even if the new profile looks equivalent, an old allocation record should not silently become proof of the new instance's identity. Rebuild the parent and instance mapping for the current configuration generation before admitting another model worker.

## Preserve the allocation generation

Record the physical GPU identity, current GPU Instance and Compute Instance relationships, profile and MIG device identity together. Keep the time and configuration revision. A profile describes a resource shape rather than one unique allocation. Multiple instances can share a profile, so matching its name cannot identify which current object a previous worker or scheduler record referred to.

## Re-enumerate after recreation

The MIG guide documents separate creation and destruction of GPU and compute instances. Treat that lifecycle as invalidating an assumed mapping until the new inventory is observed. Do not promise identifier continuity or continued meaning of a short index. Preserve the new enumeration rather than editing an old record's timestamp while leaving its identity fields unchanged.

## Match the runtime's supported view

CUDA enumeration of MIG devices depends on the installed driver and runtime generation. The current guide distinguishes supported enumeration behavior across versions. A management inventory can contain more instances than one process can enumerate under its particular rules. Read the applicable version's constraints instead of classifying every difference as lost hardware or a broken visibility filter.

## Refresh dependent selection records

Connect the current identity to container selection, scheduler allocation and telemetry labels. A valid old launch argument can still be stale for a recreated object. Keep device selection distinct from control access that can reconfigure MIG. Update the intended allocation record through the supported owner rather than broadening access to every instance so the model happens to start.

## Verify the new assignment

In a disposable supported layout, compare inventory before and after a planned recreation, then launch a bounded consumer with the intended current identity. Acceptance means the new record resolves to the expected instance and basic computation works. It does not establish continuity of the old workload, preserve its memory state or prove that equivalent-looking profiles provide interchangeable capacity under every concurrent workload.

## Primary references

[MIG Device Identity and Enumeration](https://docs.nvidia.com/datacenter/tesla/mig-user-guide/mig-device-names.html).

[MIG Instance Creation and Destruction](https://docs.nvidia.com/datacenter/tesla/mig-user-guide/getting-started-with-mig.html).

[NVIDIA System Management Interface](https://docs.nvidia.com/deploy/nvidia-smi/index.html).

Related reading: [NVIDIA_VISIBLE_DEVICES vs CUDA_VISIBLE_DEVICES: why GPU indexes differ](/journal/nvidia-visible-vs-cuda-visible-devices/); [MIG and time-slicing: sharing a GPU without confusing guarantees](/journal/gpu-mig-vs-time-slicing/).
