Re: st driver doesn't seem to grok LTO partitioning

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> On 29.12.2015, at 18.58, Emmanuel Florac <eflorac@xxxxxxxxxxxxxx> wrote:
> 
> Le Fri, 25 Dec 2015 17:53:46 +0200 (EET)
> Kai Makisara <Kai.Makisara@xxxxxxxxxxx> écrivait:
> 
>> The patch uses the scsi level of the device to separate processing.
>> The FORMAT MEDIUM command is defined in SCSI-3 and I suppose that no
>> current drive is still SCSI-2. In addition to the "sane" changes
>> using the method to specify partitions, the patch implements the
>> following: if the size is 1, the driver tells the drive to use
>> default partitioning for two partitions. For the HP Ultrium this
>> should result in partition 0 of 1425 GB and 1 of 37.5 GB. I don't
>> know if this is a useful addition.
> 
> Still testing, with another, LTO-5 tape:
> 
> ~# mt -f /dev/nst0 mkpartition 0
> /dev/nst0: Invalid argument
> 
It seems that you have not told the st driver that your drive knows partitions. One way to set the
options is to use the stint program and proper definitions. You can also use
mtst -f /dev/nst0 stsetoption can-partitions

> Dec 29 17:57:38 shakuhachi kernel: st 7:0:0:0: st0: Block limits 1 - 16777215 bytes.
> Dec 29 17:57:38 shakuhachi kernel: st 7:0:0:0: st0: Mode sense. Length 11, medium 0, WBS 10, BLL 8
> Dec 29 17:57:38 shakuhachi kernel: st 7:0:0:0: st0: Density 58, tape length: 0, drv buffer: 1
> Dec 29 17:57:38 shakuhachi kernel: st 7:0:0:0: st0: Block size: 0, buffer size: 4096 (1 blocks).
> 
The st driver prints some debugging data to the kernel log if debugging is enabled. If the driver
is compiled with debugging (it is nowadays default but in 3.18 you should change DEBUG to 1
in st.c). The debugging output can be enabled with the command:
mtst -f /dev/nst0 stsetoption debug

Here is the debugging output when I make a 10 MB partition with my drive:
[ 2199.572546] st 4:0:5:0: [st0] Block limits 1 - 16777215 bytes.
[ 2199.573367] st 4:0:5:0: [st0] Mode sense. Length 11, medium 0, WBS 10, BLL 8
[ 2199.573375] st 4:0:5:0: [st0] Density 26, tape length: 0, drv buffer: 1
[ 2199.573380] st 4:0:5:0: [st0] Block size: 0, buffer size: 4096 (1 blocks).
[ 2199.573403] st 4:0:5:0: [st0] Rewinding tape.
[ 2199.575319] st 4:0:5:0: [st0] Partition page length is 10 bytes.
[ 2199.575328] st 4:0:5:0: [st0] PP: max 1, add 1, xdp 0, psum 02, pofmetc 0,rec 03 units 00, sizes: 100 65535
[ 2199.575333] st 4:0:5:0: [st0] psd_cnt 1, max.parts 1, nbr_parts 1
[ 2199.575338] st 4:0:5:0: [st0] Formatting tape with two partitions (1 = 10 MB).
[ 2199.575342] st 4:0:5:0: [st0] Sent partition page length is 10 bytes. needs_format: 0
[ 2199.575348] st 4:0:5:0: [st0] PP: max 1, add 1, xdp 1, psum 02, pofmetc 0,rec 03 units 00, sizes: 10 65535

Regardless whether the partitioning works with your drive, your should see at least few lines after “Rewinding tape”.
The driver first reads the partition mode page and (for testing) prints some data from the page.

Kai

--
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



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux