Re: tools support for non-512 byte sector sizes

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

 



Martin K. Petersen wrote:
"Eric" == Moore, Eric <Eric.Moore@xxxxxxx> writes:

Eric> I was wondering about formatting drives with DIF support??
Eric> Martin told me he is using sg_format, however it doesn't support
Eric> type 3 protection format, which has 6 byte application tag.

I have only been testing Type 3 with scsi_debug (which conveniently
avoids the formatting step).

I doubt we will see any disk drives that support Type 3.  The way the
standard is written, a drive can either do Type 1+2 or Type 1+3.  Type
2+3 is not a possible combination.

In any case.  If you happen to own a Type 3-capable device you format
it exactly like if it had been a Type 2.  I.e. set PINFO=1 and
RTO_REQ=1 in FORMAT UNIT.  sg_format can already do this.

According to sbc3r15.pdf (section 5.2 table 20 page 56)
sg_format is setting the correct bits for type 3 protection.
See the "format cdb" and the "format parameter list" in the
verbose output below).

The appropriate command line invocation is pretty convoluted:


# sg_format --format --pinfo --rto_req --pfu=1 -vvv /dev/sdb
open /dev/sdb with flags=0x802
    inquiry cdb: 12 00 00 00 24 00
      duration=0 ms
    Linux     scsi_debug        0004   peripheral_type: disk [0x0]
      PROTECT=0
    mode sense (10) cdb: 5a 00 01 00 00 00 00 00 fc 00
      duration=1 ms
    mode sense (10): requested 252 bytes but got 28 bytes
    mode sense (10): response
        00 1a 00 10 00 00 00 08  00 00 40 00 00 00 02 00
        01 0a c0 0b f0 00 00 00  05 00 ff ff
Mode Sense (block descriptor) data, prior to changes:
  Number of blocks=16384 [0x4000]
  Block size=512 [0x200]

A FORMAT will commence in 10 seconds
    ALL data on /dev/sdb will be DESTROYED
        Press control-C to abort
A FORMAT will commence in 5 seconds
    ALL data on /dev/sdb will be DESTROYED
        Press control-C to abort
    format cdb: 04 d8 00 00 00 00
    format parameter list:
        01 02 00 00
      duration=1 ms
format unit:  Fixed format, current;  Sense key: Illegal Request
 Additional sense: Invalid command operation code
 Raw sense data (in hex):
        70 00 05 00 00 00 00 0a  00 00 00 00 20 00 00 00
        00 00
Format command not supported
FORMAT failed


Doug Gilbert



--
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux