One thought in comparing MHVTL device assignment to real libraries - With a real library, one tape device is always the master and it uses a serial connection (ADI) to connect the library as a LUN. This means that the master, or 0th tape device in the library will always be first device, LUN 0 and the library head will be the same pSCSI/SAS/FC device, but assigned to LUN 1. If you partition the library, the 0th drive assigned to the partition takes on that same role.
Currently in MHVTL, things are reversed. The library head is getting the LUN 0 assignment and the 0th tape drive is getting the LUN 1 assignment. While this is not a disaster, it is odd if you are working with a diagnostic tool that expects the live order.
I've looked at the generators and can't see a way to set the order of the devices generated when the target is enabled and started. Is this possible there, or do we need a core code change?