* [gentoo-user] [OT] Problem with disk: cannot mount as ext3 but can as ext2
@ 2006-10-08 9:03 gregory.sacre
2006-10-09 22:56 ` Richard Fish
0 siblings, 1 reply; 2+ messages in thread
From: gregory.sacre @ 2006-10-08 9:03 UTC (permalink / raw
To: gentoo-user
Hello,
I had a hard disk attached on an old RedHat PC formatted and mounted
as ext3 filesystem.
I removed the hard disk from the PC and plugged it in my Gentoo box. I
tried to mount it as ext3 file system and got this error:
--------------------------------------------------------------------------------
| # mount -t ext3 /dev/hdd1 /jukebox
| mount: wrong fs type, bad option, bad superblock on /dev/hdd1,
| missing codepage or other error
| In some cases useful info is found in syslog - try
| dmesg | tail or so
--------------------------------------------------------------------------------
I then tried to see the partition type with fdisk:
--------------------------------------------------------------------------------
| Command (m for help): p
|
| Disk /dev/hdd: 81.9 GB, 81964302336 bytes
| 16 heads, 63 sectors/track, 158816 cylinders
| Units = cylinders of 1008 * 512 = 516096 bytes
|
| Device Boot Start End Blocks Id System
| /dev/hdd1 1 158816 80043232+ 83 Linux
--------------------------------------------------------------------------------
My next step was to try to repair it with fsck.ext3:
--------------------------------------------------------------------------------
| # fsck.ext3 -p /dev/hdd
| fsck.ext3: Bad magic number in super-block while trying to open /dev/hdd
| /dev/hdd:
| The superblock could not be read or does not describe a correct ext2
| filesystem. If the device is valid and it really contains an ext2
| filesystem (and not swap or ufs or something else), then the superblock
| is corrupt, and you might try running e2fsck with an alternate superblock:
| e2fsck -b 8193 <device>
--------------------------------------------------------------------------------
I tried what was written with e2fsck:
--------------------------------------------------------------------------------
| # e2fsck -b 8193 /dev/hdd
| e2fsck 1.39 (29-May-2006)
| e2fsck: Bad magic number in super-block while trying to open /dev/hdd
|
| The superblock could not be read or does not describe a correct ext2
| filesystem. If the device is valid and it really contains an ext2
| filesystem (and not swap or ufs or something else), then the superblock
| is corrupt, and you might try running e2fsck with an alternate superblock:
| e2fsck -b 8193 <device>
--------------------------------------------------------------------------------
After googling for a while, and not really finding an answer, I tried
to mount it as readonly, and because of a typo, I mounted it as
ext2... and it worked!!! I tried then to mount it normally, not
anymore as read-only with ext2 format... and it worked!!!
So my first question is: how come?
I'm sure the filetype is ext3 as it can be seen in my old fstab:
--------------------------------------------------------------------------------
| [...]
| /dev/hdb5 swap swap defaults 0 0
| #/dev/hdc1 /jukebox ext3 defaults
1 1 --> this is the one ;-)
| [...]
--------------------------------------------------------------------------------
I thought maybe I could try to repair it with the normal fsck:
--------------------------------------------------------------------------------
| # fsck /dev/hdd1
| fsck 1.39 (29-May-2006)
| e2fsck 1.39 (29-May-2006)
| /dev/hdd1: Attempt to read block from filesystem resulted in short
read while reading block 525
|
| /dev/hdd1: Attempt to read block from filesystem resulted in short
read reading journal superblock
|
| fsck.ext3: Attempt to read block from filesystem resulted in short
read while checking ext3 journal for /dev/hdd1
--------------------------------------------------------------------------------
Is there anything wrong with my hardware? Is it a super-block problem?
Is there a way to solve it?
Thank you in advance!
Greg
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [gentoo-user] [OT] Problem with disk: cannot mount as ext3 but can as ext2
2006-10-08 9:03 [gentoo-user] [OT] Problem with disk: cannot mount as ext3 but can as ext2 gregory.sacre
@ 2006-10-09 22:56 ` Richard Fish
0 siblings, 0 replies; 2+ messages in thread
From: Richard Fish @ 2006-10-09 22:56 UTC (permalink / raw
To: gentoo-user
On 10/8/06, gregory.sacre@gmail.com <gregory.sacre@gmail.com> wrote:
> | In some cases useful info is found in syslog - try
> | dmesg | tail or so
This was good advice....
> | # fsck.ext3 -p /dev/hdd
> | fsck.ext3: Bad magic number in super-block while trying to open /dev/hdd
> | /dev/hdd:
Should have used /dev/hdd1 here....
> | # e2fsck -b 8193 /dev/hdd
> | e2fsck 1.39 (29-May-2006)
> | e2fsck: Bad magic number in super-block while trying to open /dev/hdd
...and here...
> ext2... and it worked!!! I tried then to mount it normally, not
> anymore as read-only with ext2 format... and it worked!!!
> So my first question is: how come?
Possibly a disk error on the blocks that would normally be reserved
for the ext3 journal...
> | /dev/hdd1: Attempt to read block from filesystem resulted in short
> read while reading block 525
> |
> | /dev/hdd1: Attempt to read block from filesystem resulted in short
> read reading journal superblock
...which is sort of what this message says.
> Is there anything wrong with my hardware? Is it a super-block problem?
> Is there a way to solve it?
First, check the dmesg output after running "fsck.ext3 /dev/hdd1".
That may show read errors on the disk, and if so, I'm guessing those
blocks are now bad. You can also use smartctl (emerge smartmontools)
to query the SMART information from the drive, or to run a SMART
self-test of the disk.
I believe you can also convert the filesystem to ext2, with "tune2fs
-O ^has_journal /dev/hdd1". This should allow you to run fsck.ext2 on
the filesystem, to check it for other consistency errors.
-Richard
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-10-09 23:02 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-10-08 9:03 [gentoo-user] [OT] Problem with disk: cannot mount as ext3 but can as ext2 gregory.sacre
2006-10-09 22:56 ` Richard Fish
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox