Hi all,<br><br>I&#39;m  having a problem with a SCSI driver...<br><br>When I load the module (from dmesg) I see that everything has worked fine.<br>and the output of fdisk -l shows the <br><br>&lt;SNIP&gt;<br> sudo fdisk -l<br>
<br>Disk /dev/sda: 60.0 GB, 60022480896 bytes<br>255 heads, 63 sectors/track, 7297 cylinders, total 117231408 sectors<br>Units = sectors of 1 * 512 = 512 bytes<br>Sector size (logical/physical): 512 bytes / 512 bytes<br>I/O size (minimum/optimal): 512 bytes / 512 bytes<br>
Disk identifier: 0x000539c8<br><br>   Device Boot      Start         End      Blocks   Id  System<br>/dev/sda1   *        2048    78125055    39061504   83  Linux<br>/dev/sda2        78127102    82124799     1998849    5  Extended<br>
/dev/sda5        78127104    82124799     1998848   82  Linux swap / Solaris<br><br>Disk /dev/sdb: 300.1 GB, 300101401088 bytes  &lt;-- this is the guy<br>255 heads, 63 sectors/track, 36485 cylinders, total 586135549 sectors<br>
Units = sectors of 1 * 512 = 512 bytes<br>Sector size (logical/physical): 512 bytes / 512 bytes<br>I/O size (minimum/optimal): 512 bytes / 512 bytes<br>Disk identifier: 0xffffffff<br><br>Disk /dev/sdb doesn&#39;t contain a valid partition table<br>
<br>&lt;SNIP&gt;<br><br>So i used fdisk on &quot;sdb&quot; to manually write the tables in and it succeeded<br>&lt;SNIP&gt;<br> Command (m for help): n<br>Partition type:<br>   p   primary (0 primary, 0 extended, 4 free)<br>
   e   extended<br>Select (default p): p<br>Partition number (1-4, default 1): 1<br>First sector (2048-586135548, default 2048):<br>Using default value 2048<br>Last sector, +sectors or +size{K,M,G} (2048-586135548, default 586135548):<br>
Using default value 586135548<br><br>Command (m for help): w<br>The partition table has been altered!<br><br>Calling ioctl() to re-read partition table.<br>Syncing disks.<br>&lt;SNIP&gt;<br><br>THen i used mkfs to create a new ext4 partition and even that went fine.<br>
&lt;SNIP&gt;<br> mkfs -t ext4 /dev/sdb<br>mke2fs 1.42 (29-Nov-2011)<br>/dev/sdb is entire device, not just one partition!<br>Proceed anyway? (y,n) y<br>Filesystem label=<br>OS type: Linux<br>Block size=4096 (log=2)<br>Fragment size=4096 (log=2)<br>
Stride=0 blocks, Stripe width=0 blocks<br>18317312 inodes, 73266943 blocks<br>3663347 blocks (5.00%) reserved for the super user<br>First data block=0<br>Maximum filesystem blocks=4294967296<br>2236 block groups<br>32768 blocks per group, 32768 fragments per group<br>
8192 inodes per group<br>Superblock backups stored on blocks:<br>        32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,<br>        4096000, 7962624, 11239424, 20480000, 23887872, 71663616<br><br>Allocating group tables: done<br>
Writing inode tables: done<br>Creating journal (32768 blocks): done<br>Writing superblocks and filesystem accounting information: done<br><br>root@ocz-Not-Specified:/home/ocz/Shampavman/OCZ_XEN_Final_Source_code# echo $?<br>
0<br>&lt;SNIP&gt;<br><br>But then when i tried to mount it on /mnt things fail.<br>&lt;SNIP&gt;<br> mount -t ext4 /dev/sdb /mnt/test<br>mount: wrong fs type, bad option, bad superblock on /dev/sdb,<br>       missing codepage or helper program, or other error<br>
       In some cases useful info is found in syslog - try<br>       dmesg | tail  or so<br><br>------------------------------------<br>dmesg.....<br>[495515.858203] EXT4-fs (sdb): VFS: Can&#39;t find ext4 filesystem<br>----------------------------<br>
&lt;SNIP&gt;<br>=====================<br><br>Some pointers, While diving into this issue i figured out that the magic number on this device is not the same as &quot;EXT4_SUPER_MAGIC&quot; macro that is checked for in the super.c (fs/ext4/super.c) .<br>
<br>Can anyone please help me in figuring out a solution for this.?<br><br>Thanks<br>