Bad magic number and
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@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
Hi... On Wed, Dec 26, 2012 at 12:19 PM, sham pavman <shampavman.cg@gmail.com> wrote:
<SNIP> mkfs -t ext4 /dev/sdb mke2fs 1.42 (29-Nov-2011)
try using mkfs.ext4 instead.... -- regards, Mulyadi Santosa Freelance Linux trainer and consultant blog: the-hydra.blogspot.com training: mulyaditraining.blogspot.com
I've tried that as well.. and the result is the same. I've little idea on how to start debugging. If you can provide some info it would be great. Thanks On Fri, Dec 28, 2012 at 6:37 AM, Mulyadi Santosa <mulyadi.santosa@gmail.com>wrote:
Hi...
On Wed, Dec 26, 2012 at 12:19 PM, sham pavman <shampavman.cg@gmail.com> wrote:
<SNIP> mkfs -t ext4 /dev/sdb mke2fs 1.42 (29-Nov-2011)
try using mkfs.ext4 instead....
-- regards,
Mulyadi Santosa Freelance Linux trainer and consultant
blog: the-hydra.blogspot.com training: mulyaditraining.blogspot.com
On Thu, Dec 27, 2012 at 8:29 PM, sham pavman <shampavman.cg@gmail.com>wrote:
I've tried that as well.. and the result is the same. I've little idea on how to start debugging. If you can provide some info it would be great.
What does dumpe2fs -h give ? Thanks - Manish
Thanks
On Fri, Dec 28, 2012 at 6:37 AM, Mulyadi Santosa < mulyadi.santosa@gmail.com> wrote:
Hi...
On Wed, Dec 26, 2012 at 12:19 PM, sham pavman <shampavman.cg@gmail.com> wrote:
<SNIP> mkfs -t ext4 /dev/sdb mke2fs 1.42 (29-Nov-2011)
try using mkfs.ext4 instead....
-- regards,
Mulyadi Santosa Freelance Linux trainer and consultant
blog: the-hydra.blogspot.com training: mulyaditraining.blogspot.com
_______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
-- Thanks - Manish
Hi, On Fri, Dec 28, 2012 at 10:57 AM, Manish Katiyar <mkatiyar@gmail.com> wrote:
On Thu, Dec 27, 2012 at 8:29 PM, sham pavman <shampavman.cg@gmail.com> wrote:
I've tried that as well.. and the result is the same. I've little idea on how to start debugging. If you can provide some info it would be great.
Check your mkfs and mount commands. You have specified the whole disk instead of partition. It should be... mkfs -t ext4 /dev/sdb1 mount -t ext4 /dev/sdb1 /mnt/test Regards.
Here is the output # dumpe2fs -h /dev/sdb dumpe2fs 1.42 (29-Nov-2011) dumpe2fs: Bad magic number in super-block while trying to open /dev/sdb Couldn't find valid filesystem superblock. On Fri, Dec 28, 2012 at 10:57 AM, Manish Katiyar <mkatiyar@gmail.com> wrote:
On Thu, Dec 27, 2012 at 8:29 PM, sham pavman <shampavman.cg@gmail.com>wrote:
I've tried that as well.. and the result is the same. I've little idea on how to start debugging. If you can provide some info it would be great.
What does dumpe2fs -h give ?
Thanks - Manish
Thanks
On Fri, Dec 28, 2012 at 6:37 AM, Mulyadi Santosa < mulyadi.santosa@gmail.com> wrote:
Hi...
On Wed, Dec 26, 2012 at 12:19 PM, sham pavman <shampavman.cg@gmail.com> wrote:
<SNIP> mkfs -t ext4 /dev/sdb mke2fs 1.42 (29-Nov-2011)
try using mkfs.ext4 instead....
-- regards,
Mulyadi Santosa Freelance Linux trainer and consultant
blog: the-hydra.blogspot.com training: mulyaditraining.blogspot.com
_______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
-- Thanks - Manish
Hi, On Fri, Dec 28, 2012 at 11:35 AM, sham pavman <shampavman.cg@gmail.com> wrote:
Here is the output
# dumpe2fs -h /dev/sdb dumpe2fs 1.42 (29-Nov-2011) dumpe2fs: Bad magic number in super-block while trying to open /dev/sdb Couldn't find valid filesystem superblock.
Try $partprobe $fdisk -l Regards
On Fri, Dec 28, 2012 at 11:44 AM, Prashant Shah <pshah.mumbai@gmail.com>wrote:
Hi,
On Fri, Dec 28, 2012 at 11:35 AM, sham pavman <shampavman.cg@gmail.com> wrote:
Here is the output
# dumpe2fs -h /dev/sdb dumpe2fs 1.42 (29-Nov-2011) dumpe2fs: Bad magic number in super-block while trying to open /dev/sdb Couldn't find valid filesystem superblock.
Try
$partprobe $fdisk -l
No use.. # partprobe root@Not-Specified:/home/z# 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 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: 0x00000000 <--------------------------------------- Does this look fishy? Disk /dev/sdb doesn't contain a valid partition table
Regards
On Wed, Dec 26, 2012 at 12:19 PM, sham pavman <shampavman.cg@gmail.com> wrote:
<SNIP> mkfs -t ext4 /dev/sdb
I support what Prashant said (I am not careful here), you should use: mkfs.ext4 /dev/sdb1 then mount /dev/sdb1 -- regards, Mulyadi Santosa Freelance Linux trainer and consultant blog: the-hydra.blogspot.com training: mulyaditraining.blogspot.com
participants (4)
-
Manish Katiyar -
Mulyadi Santosa -
Prashant Shah -
sham pavman