mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* max scri drive size limit supported in linux
@ 2002-07-28 18:28 niraj gupta
  0 siblings, 0 replies; only message in thread
From: niraj gupta @ 2002-07-28 18:28 UTC (permalink / raw)
  To: linux-kernel


i was looking at the sd driver code to see how linux does drive capacity 
recognition, it looks like linux can only support a maximum single drive 
capacity of 2TB, how would that affect using raids which are larger than 2TB.
here is how i reached the 2TB conclusion. and please do correct me if i am 
wrong.

kernel revision 2.4.18, sd.c

line 927

	 rscsi_disks[i].capacity = 1 + ((buffer[0] << 24) |
                                               (buffer[1] << 16) |
                                               (buffer[2] << 8) |
                                               buffer[3]);

which is max number of sectors = 2^32

line 940

	if (sector_size != 512 &&
                    sector_size != 1024 &&
                    sector_size != 2048 &&
                    sector_size != 4096 &&
                    sector_size != 256) {
                        printk("%s : unsupported sector size %d.\n",
                               nbuff, sector_size);
                        /*
                         * The user might want to re-format the drive with
                         * a supported sectorsize.  Once this happens, it
                         * would be relatively trivial to set the thing up.
                         * For this reason, we leave the thing in the table.
                         */
                        rscsi_disks[i].capacity = 0;
                }

which limits sector size to a max of 2^12, which may lead us to think that 
the max drive capacity would be 2^44 - 16TB, but later on

line 999
                /* Rescale capacity to 512-byte units */
                if (sector_size == 4096)
                        rscsi_disks[i].capacity <<= 3;
                if (sector_size == 2048)
                        rscsi_disks[i].capacity <<= 2;
                if (sector_size == 1024)
                        rscsi_disks[i].capacity <<= 1;
                if (sector_size == 256)
                        rscsi_disks[i].capacity >>= 1;

which would result in a max drive capacity supported to be 2TB
although this is not a issue to me personally, it just raised questions in my 
mind as to how does it do it for raids larger than 2tb

thanks for reading the rambling
niraj gupta
nirajgupta@yahoo.com

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2002-07-28 18:25 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-07-28 18:28 max scri drive size limit supported in linux niraj gupta

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®