Re: is (rscsi_disks[i].sector_size != 512) ok ?

From: Andries.Brouwer@cwi.nl
Date: Wed Apr 12 2000 - 11:07:27 EST


On Wed, Apr 12, 2000 at 08:13:34PM +0530, sara@procsys.com wrote:

> We have a custom storage controller. It has configurable sector_size.
> When configured to 1K, fdisk goes through ok. Buf mkfs gives errors shown
> below.
>
> Does Linux kernel support non 512 sector_size. Does tools
> mkfs/fsck and filesystems run properly on such storage devices?

I think that roughly speaking the answers to all these questions are Yes.
However, of course, uncommon hardware may occur tickle bugs not seen otherwise.

You may try to separate filesystem and partition table problems
from I/O problems by just doing "dd if=/dev/sda of=/dev/null"
and/or "dd if=/dev/zero of=/dev/sda" (assuming your disk is sda).
If this fails then you need not think about fdisk and mkfs/fsck,
and either the disk is bad or there is a kernel problem.
If this succeeds then there may be a problem with fdisk or mke2fs.

[Your statement "fdisk goes through ok" is not informative enough.
At some point in time it was decided that probably the partition table
should be interpreted in sectorsize units, rather than in units of 512 bytes.
So from that moment on, fdisk used the BLKSSZGET ioctl to ask the kernel
about the sector size. But the precise value returned by this ioctl also
changed at some point in time - there are various concepts of `sector size'
around. So, what fdisk did (use sectorsize 512 or 1024) will be clear only
if you specify fdisk and kernel version, or look carefully at its output.
(It is best not to rely on BLKSSZGET and give the sectorsize explicitly
with the -b option.)]

Andries

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sat Apr 15 2000 - 21:00:19 EST