kernel do Linux - não pode acessar sda16 & sda17

4

Não consigo acessar sda16 sda17 e partições maiores do meu linux. Este linux é bastante debian (muito antigo); kernel 2.6.23. Então, eu sei que o kernel do Linux tão velho não pode acessar o > 16 partições em disco sata único.

Qual versão do kernel devo usar para poder acessar sda16, sda17 etc? Eu quero atualizar apenas um kernel, não uma distribuição Linux completa.

PS. Existe um kernel WindowsNT que pode acessar e formatar 16, 17 ou maior partição, mas minha intenção é usar sda16 e sda17 do linux (eu quero Linux Kernel).

PPS: dmesg:

sd 2:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
 sda: sda1 sda2 sda3 sda4 < sda5 sda6 sda7 sda8 sda9 sda10 sda11 sda12 sda13 sda14 sda15 >
sd 2:0:0:0: [sda] Attached SCSI disk
sd 4:0:0:0: [sdb] xxx 512-byte hardware sectors ...

Portanto, não há mapeamento de sda16, sda17, ... para sdb. Sdb é o segundo disco rígido físico.

    
por osgx 14.11.2011 / 01:31

1 resposta

2

Eu posso trabalhar demais sem alterar o kernel e com a montagem com offset:

$ fdisk -l -u /dev/sda
   Device Boot      Start 
...
/dev/sda16      123456783 ...
/dev/sda17      234567894 ...

$ mount -o ro,offset=$[512*123456783] /dev/sda /mount/sda16
$ mount -o ro,offset=$[512*234567894] /dev/sda /mount/sda17

O problema se origina da movimentação do SATA para o subsistema SCSI. SCSI pode ter apenas 15 partições:

link - nomeação de dispositivos Linux

By convention, SCSI disks have a maximum of 16 minor numbers mapped to a single disk. Thus, for each whole disk, there is a maximum of 15 partitions per disk because one minor number is used to describe the entire disk (for example /dev/sda), and the other 15 minor numbers are used to refer to partitions for that disk (for example /dev/sda1, /dev/sda2, etc).

Portanto, não há possibilidade de criar dispositivos de bloco especiais para a 16ª e a 17ª partição usando mknod , porque menor 16 será a próxima unidade, por exemplo:

# ls -l /dev/sda? /dev/sda?? /dev/sdb
brw-rw----  1 root disk  8,   0 May 24 08:09 /dev/sda
brw-rw----  1 root disk  8,   1 May 24 08:09 /dev/sda1
brw-rw----  1 root disk  8,   2 May 24 08:09 /dev/sda2
...
brw-rw----  1 root disk  8,  14 May 24 08:09 /dev/sda14
brw-rw----  1 root disk  8,  15 May 24 08:09 /dev/sda15
brw-rw----  1 root disk  8,  16 May 24 08:09 /dev/sdb

A mudança foi feita na versão do kernel do Linux em torno de 2.6.20, de acordo com o thread SCSI-SATA-PATA-USB-disk"> - "Como obter 44 partições lógicas de um disco SCSI / SATA / PATA / USB"

A Linux using 2.6.20 kernel or later now calls every SCSI, Sata, Pata and USB hard disk by the same naming convention, using disk names sda, sdb, sdc, sdd, sde etc. A maximum of 16 device names is now standard for each disk. For the first disk sda the 16 devices names are sda, and sda1 to sda15. The sda1, sda2, sda3 and sda4 are permanently reserved for the 4 primary partitions, even if some of them are not used, and the rest sda5 to sda15 are 11 logical partition names.

Isso foi feito pela "libata", que implementa o PATA / SATA no subsistema SCSI:

link

Libata PATA (Parallel ATA) merge By "Parallel ATA" we mean all the ATA/IDE controllers and drives that we have been using for years before SATA. Almost from the start, one of the objectives of some kernel hackers was to replace the IDE drivers available in drivers/ide (everything under the "Device drivers -> ATA/ATAPI/MFM/RLL support" configuration menu) with a reimplementation on top of libata (i.e.: the "SATA layer"). ... This means 2.6.19 may have two drivers for your PATA-based device: The old IDE driver under "Device drivers -> ATA/ATAPI/MFM/RLL support" and an alternative driver under "Device drivers -> Serial ATA (prod) and Parallel ATA (experimental) drivers" (along with the rest of the SATA drivers)

O problema já era conhecido em 2006: link

  1. The SCSI subsystem only allows 15 (I think) partitions on a disk. And with the standard MS-DOS style partition tables, that always includes all four primary partitions. So one primary + eleven logical partitions is the limit.

  2. The libata support for SATA disks uses the SCSI subsystem, and inherits the same limitations.

  3. libata support for IDE (= PATA) has been merged and is scheduled to be available for 2.6.19. It won't be the default set of drivers, and it's very unlikely to become the default during a Fedora Core release, but given Fedora's aims and engineers, I would not be surprised to see this turned on in official Fedora kernels for the FC7 release. (If not, FC8. We're probably talking the next year or so.)

When libata support is turned on for parallel IDE, then existing partitions on IDE devices above /dev/hdx15 will become unmountable.

    
por 15.11.2011 / 00:03