# Multiple sector mode (aka IDE Block Mode) w/ SATA/libata HDs

## Flow__

Hi,

while tryring to set the Multiple sector mode with 

```
hdparm -m 16 /dev/sda
```

 on a libata Drive*, the following message appears:

```

 * Running hdparm on /dev/sdb ...

Use of -m is VERY DANGEROUS.

Only the old IDE drivers work correctly with -m with kernels up to at least 2.6.29.

libata drives may fail and get hung if you set this flag.

Please supply the --yes-i-know-what-i-am-doing flag if you really want this.

Program aborted.

```

I can imagine that with multiple unused CPU cores the performance gain of "-m 16" isn´t that much. But I am curious: Did anyone successfully set this feature on a SATA/libata drives? If so, which drive, which kernel version and which controller? What are the pitfalls? Will the new drivers be fixed sometime?

Regards

   Flow

*: SATA controller: Intel Corporation 82801JI (ICH10 Family) SATA AHCI Controller with WDC WD10EACS-00D6B0

----------

## roarinelk

Out of curiosity: why do you want to do that anyway?  Do you have a specific

reason?

----------

## krinn

Specially because if it's not yet enable, then it will be dangerous to enable it.

So what is your question: am i doing stupid things ? Any other than me that enable it where it shouldn't be ?

No i did not enable it, but if you check your drives, you'll see it's enable for most of them.

```
hdparm -m /dev/sda /dev/sdb /dev/sdc /dev/sdd

/dev/sda:

 multcount     = 16 (on)

/dev/sdb:

 multcount     = 16 (on)

/dev/sdc:

 multcount     = 16 (on)

/dev/sdd:

 multcount     =  0 (off)

```

And i were you, i wouldn't enable it on sdd (well, as i'm not you, as you see, i didn't)

----------

## roarinelk

 *krinn wrote:*   

> 
> 
> So what is your question: am i doing stupid things ? Any other than me that enable it where it shouldn't be ?
> 
> 

 

Kind of, yes  :D 

I would assume that the driver and ata-layer in the kernel test whether the drive can

safely enable multisector IO, and there should be no need to use hdparm to force it.

Especially since the new ata layer is way smarter than the ancient ide code it replaced.

----------

## salahx

Actually it is stupid: multi-sector mode (and 32-bit I/O mode support) only have any meaning in PIO mode, not with DMA. 

See http://www.redhat.com/archives/fedora-devel-list/2007-April/msg01169.html

----------

## jathlon

 *krinn wrote:*   

> 
> 
> ```
> hdparm -m /dev/sda /dev/sdb /dev/sdc /dev/sdd
> 
> ...

 

What kind of drives do you have installed?  I get;

```
hdparm -m /dev/sda /dev/sdb /dev/sdc /dev/sdd

/dev/sda:

 multcount     =  1 (on)

/dev/sdb:

 multcount     =  0 (off)

/dev/sdc:

 multcount     =  0 (off)

/dev/sdd:

 multcount     =  0 (off)
```

sda is a SSD while the rest are regular SATA drives.  If I try to set -m 16 I get the same warning.  Which is strange because the drive shows this when checked.

```
~ # hdparm -i /dev/sda

/dev/sda:

 Model=INTEL SSDSA2M040G2GC, FwRev=2CV102HD, SerialNo=CVGB019200MC040NGN

 Config={ Fixed }

 RawCHS=16383/16/63, TrkSize=0, SectSize=0, ECCbytes=0

 BuffType=unknown, BuffSize=unknown, MaxMultSect=16, MultSect=1

 CurCHS=16383/16/63, CurSects=16514064, LBA=yes, LBAsects=78165360

 IORDY=on/off, tPIO={min:120,w/IORDY:120}, tDMA={min:120,rec:120}

 PIO modes:  pio0 pio3 pio4 

 DMA modes:  mdma0 mdma1 mdma2 

 UDMA modes: udma0 udma1 udma2 udma3 udma4 udma5 *udma6 

 AdvancedPM=no WriteCache=enabled

 Drive conforms to: ATA/ATAPI-7 T13 1532D revision 1:  ATA/ATAPI-2,3,4,5,6,7

 * signifies the current active mode

```

So hdparm claims that it's on, but it won't let you change it.   :?

joe

----------

## Flow__

 *jathlon wrote:*   

> 
> 
> What kind of drives do you have installed?
> 
> 

 

Thats the information I would like to gather. Which SATA drives and chipsets together allow the Multi Sector Mode.

 *jathlon wrote:*   

> 
> 
> sda is a SSD while the rest are regular SATA drives.  If I try to set -m 16 I get the same warning.  Which is strange because the drive shows this when checked.
> 
> ```
> ...

 

If you look closely, it says MaxMultSect=16 and MultSect=1. So the maximum would be 16, but the current setting is 1. I suppose that there is somewhere a problem with the interaction of drive, libata and chipset in the new kernel/driver versions.

Flow

----------

## krinn

```
dmesg | grep Direct-Access

[    0.640750] scsi 1:0:0:0: Direct-Access     ATA      WDC WD2000JB-00G 08.0 PQ: 0 ANSI: 5

[    0.641309] scsi 2:0:0:0: Direct-Access     ATA      WDC WD2500AAKS-0 01.0 PQ: 0 ANSI: 5

[    0.804652] scsi 3:0:0:0: Direct-Access     ATA      WDC WD5000AADS-0 05.0 PQ: 0 ANSI: 5

[    3.654172] scsi 5:0:0:0: Direct-Access     ATA      ST3750640AS      3.AA PQ: 0 ANSI: 5

```

i don't really remember, i think the seagate one  and WD200 are sata

----------

