LUN Assignment in MHVTL versus reality

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

LUN Assignment in MHVTL versus reality

Tim Jones
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?

Reply | Threaded
Open this post in threaded view
|

Re: LUN Assignment in MHVTL versus reality

Tim Jones
I need to update this since the answer was staring me in the face each time I edited the device.conf file(s).

For example:

Library: 10 CHANNEL: 00 TARGET: 00 LUN: 01
 Vendor identification: TOLISGRP
 Product identification: TGL2240
 Unit serial number: MX700192AG
 NAA: 10:22:33:44:ab:00:00:01
 Home directory: /opt/mhvtl
 PERSIST: False
 Backoff: 400
# fifo: /var/tmp/mhvtl

Drive: 11 CHANNEL: 00 TARGET: 00 LUN: 00
 Library ID: 10 Slot: 01
 Vendor identification: TOLISGRP
 Product identification: ULTRIUM-HH7
 Unit serial number: HU009128S3
 NAA: 10:22:33:44:ab:00:00:00
 Compression: factor 1 enabled 0
 Compression type: lzo
 Backoff: 400
# fifo: /var/tmp/mhvtl

Reply | Threaded
Open this post in threaded view
|

Re: LUN Assignment in MHVTL versus reality

Tim Jones
One step further for anyone following this.

It appears that the old pSCSI rule of higher ID = higher priority is still being observed in the Linux kernel.

Therefore, Your should order the ID field by the order in which you want to virtual drives assigned in the kernel.

Therefore, to force the "lower," or management drive to be ST0, be sure to set it and the library to a higher ID than the second and later drives.  Notice belowe that the drive at TARGET: 07 will be /dev/nst0 and the drive at TARGET: 00 will be /dev/nst1:

Library: 10 CHANNEL: 00 TARGET: 07 LUN: 01
 Vendor identification: TOLISGRP
 Product identification: TGL3400FLEX
 Unit serial number: MX454414A1
 NAA: 10:22:33:44:ab:00:00:00
 Home directory: /opt/mhvtl
 PERSIST: False
 Backoff: 400
# fifo: /var/tmp/mhvtl

Drive: 11 CHANNEL: 00 TARGET: 07 LUN: 00
 Library ID: 10 Slot: 01
 Vendor identification: TOLISGRP
 Product identification: ULTRIUM-HH7
 Unit serial number: HU009128S3
 NAA: 10:22:33:44:ab:00:01:00
 Compression: factor 1 enabled 0
 Compression type: lzo
 Backoff: 400
# fifo: /var/tmp/mhvtl

Drive: 12 CHANNEL: 00 TARGET: 01 LUN: 00
 Library ID: 10 Slot: 02
 Vendor identification: TOLISGRP
 Product identification: ULTRIUM-HH7
 Unit serial number: HU009128S3
 NAA: 10:22:33:44:ab:00:02:00
 Compression: factor 1 enabled 0
 Compression type: lzo
 Backoff: 400
# fifo: /var/tmp/mhvtl