Le Tue, 22 Dec 2015 05:51:30 +0000 "Seymour, Shane M" <shane.seymour@xxxxxxx> écrivait: > If you need help with anything please let me know I'd be more than > happy to contribute (with testing and a review if you want). I have a > system with an older LTO-3 tape drive that I can use any time (it > doesn’t support partitioning so if nothing else I can make sure > partitioning attempts fail gracefully). I may be able to beg, borrow, > or steal access to an LTO 5 or 6 drive though to help out in testing. ATM I have an HP LTO-5 and IBM LTO-6 drives (there are real differences in behaviour between these at times). I need to check what media I have available for tests though. > Kai, for the source of the HPE EverStore software should be available > here: > > http://h20564.www2.hpe.com/hpsc/swd/public/readIndex?sp4ts.oid=5111617 The IBM driver should be here: http://www-933.ibm.com/support/fixcentral/swg/quickorder?parent=ibm~ST~Tapedevicedriversandsoftware&product=ibm/Storage_Tape/Tape+device+drivers&release=1.0&platform=Linux&function=all&source=fc When you have selected RH as a platform, the source rpm is also available to download. > > This seems to be the relevant code from the driver though (the same > download has the ibm tape driver as well). You'll need to look at the > following: > > ltotape.c - ltotape_readposition to determine the current partition > ltotape.c - ltotape_locate - to move to a position on tape (includes > setting the partition and has a special flag for changing partitions > between the two it supports if required) ltotape.c - ltotape_format - > for creating and destroying partitions ltotape.c - > ltotape_remaining_capacity - will get you the remaining and maximum > capacity for the partitions > > When you look at those functions you'll see TC_FORMAT_TYPE referenced > this is the enum referred it is in src/libltfs/tape_ops.h: > > typedef enum { > TC_FORMAT_DEFAULT = 0x00, /* Make 1 partition medium */ > TC_FORMAT_PARTITION = 0x01, /* Make 2 partition medium */ > TC_FORMAT_DEST_PART = 0x02, /* Destroy all data and make 2 > partition medium */ TC_FORMAT_MAX = 0x03 > } TC_FORMAT_TYPE; /* Space command operations */ > The driver at that download looks like it only supports two > partitions though and if you go looking around the code (grep for > partition) some LTO drives (probably older ones) look like they may > be partition aware but may not actually support partitions, see this > comment: > > ltotape_platform.c: * For an LTO drive, need to determine > whether it is partition-capable or only partition-aware: The IBM code however looks like it supports any number of partitions (though LTO-6/7 support only 4,so MAX_SUPPORTED_PARTITIONS is set to 4): if(copy_from_user((void*)usr_part, (void*)arg, sizeof(struct tape_partition))) { printk("lin_tape_create_partition: cannot copy from user\n"); rc = -EFAULT; goto EXIT_LABEL; } /* if */ if(usr_part->number_of_partitions > MAX_SUPPORTED_PARTITIONS) { DbgPrint(("lin_tape: too many partitions %d\n", usr_part->number_of_partitions)); rc = -EINVAL; goto EXIT_LABEL; } /* if */ Interestingly it seems to support both wrap partitioning and longitudinal partitioning (on 3592 drives). -- ------------------------------------------------------------------------ Emmanuel Florac | Direction technique | Intellique | <eflorac@xxxxxxxxxxxxxx> | +33 1 78 94 84 02 ------------------------------------------------------------------------ -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html