Le Fri, 18 Dec 2015 17:06:44 +0100 Emmanuel Florac <eflorac@xxxxxxxxxxxxxx> écrivait: > > I'm trying to use mt to work with LTO-5 and bigger tapes. Switching > partitions works: > > # tapeinfo -f /dev/sg1 > Product Type: Tape Drive > Vendor ID: 'HP ' > Product ID: 'Ultrium 5-SCSI ' > Revision: 'Z61U' > Attached Changer API: No > SerialNumber: 'HU1249TP88' > MinBlock: 1 > MaxBlock: 16777215 > SCSI ID: 1 > SCSI LUN: 0 > Ready: yes > BufferedMode: yes > Medium Type: Not Loaded > Density Code: 0x58 > BlockSize: 0 > DataCompEnabled: yes > DataCompCapable: yes > DataDeCompEnabled: yes > CompType: 0x1 > DeCompType: 0x1 > BOP: yes > Block Position: 0 > Partition 0 Remaining Kbytes: 1459056 > Partition 0 Size in Kbytes: 1459056 > ActivePartition: 0 > EarlyWarningSize: 0 > NumPartitions: 1 > MaxPartitions: 1 > Partition0: 38 > Partition1: 1453 > > # mt -f /dev/nst0 setpartition 1 > > > However "mt mkpartition" fails miserably: > > # mt -f /dev/nst0 mkpartition 1453 > /dev/nst0: Input/output error > > # dmesg | tail > st 6:0:1:0: st0: Failed to read 65536 byte block with 256 byte > transfer. st0: Sense Key : Illegal Request [current] > st0: Add. Sense: Invalid field in parameter list > > Is this a limitation of mt or the st driver? > I'm replying to myself: this is very obviously a limitation of the st driver. Checking st.c partition_tape() function, it looks like it only knows of hardware from past century... OTOH it seems that Cygwin does that properly... by using CreateTapePartition, a windows kernel32.dll function. Argh. We'll have to do the heavy lifting of SCSI commands by hand, then. Where should we post an eventual patch, given that the linux-tape ML looks like a ghost town? It would also be great to be able to support more than 2 partitions (LTO-6 and 7 support 4), but that would require patching the mt utility too, but I don't where it currently lives :) Any hints welcome. -- ------------------------------------------------------------------------ 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