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