You are not logged in.

#1 2011-08-05 20:13:40

Miklos
Member
Registered: 2011-07-04
Posts: 13

Problem with mounting drive

I'm trying to mount partitions on my drive /dev/sda


[root@archiso]# mount -t ext3 /dev/sda3 /mnt/bup
mount: wrong fs type, bad option, bad superblock on /dev/sda3,
missing codepage or helper prorgram, or other error
in some cases useful info is found in syslog - try
dmseg | tail or so
[root@archiso]# dmseg | tail
Descriptor sense data wit sens descriptors (in hex):
                72 03 11 04 00 00 00 0c 00 0a 80 00 00 00 00 00
                00 7c 77 9e
sd 0:0:0:0: [sda] ASC=0x11 ASCQ=0x4
sd 0:0:0:0: [sda] CDB: cdb[0]=0x28: 28 00 00 7c 77 9e 00 01 00 00
end_request: I/O error, dev sda, sector 8157086
JDB: Failed to read block at offset 9236
JDB: recovery failed
EXT3-fs (sda3) error loading journal
ata1: EH complete

If I try to run fsck, fsck.ext3, etc, i get:

[root@archiso]# fsck /dev/sda
fsck.ext3: Superblock invalid, trying backup blocks…
fsck.ext3: Bad magic number in super-block while trying to open /dev/sda

The superblock could not be read or does not describe a correct ext2
filesystem If the device is valid and contains and ext2
filesystem (and not swap or ufs or something else), then the superblock 
is corrupt, and you might try running efsck with an alternate superblock
[root@archiso]# fdisk -l
Disk /dev/sda: 32.3 Gb, 32296140800 bytes
255 heads, 63 sectors/track, 3926 cylinders
Units = cylinders of 1605 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x6c00b8aa

    Dev     Boot Start             End                        Blocks      ID    System
/dev/sda1  *         1                 13                        104391     83    Linux
/dev/sda2           14                 46                       265072*    82    Linux swap / Solaris            
/dev/sda3           47              1003                     7687102*    83   Linux
/dev/sda4        1004             3926                    23478997*   83    Linux

Anyone who could help me out? Please smile

Offline

#2 2011-08-05 20:59:34

shulamy
Member
From: israel
Registered: 2010-09-11
Posts: 456

Re: Problem with mounting drive

try running fsck on the partition and not all disk.

ezik

Last edited by shulamy (2011-08-05 21:31:30)

Offline

#3 2011-08-05 21:08:50

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,804

Re: Problem with mounting drive

I would venture that /dev/sda3 is not an ext3 partition.

Try posting the output of the following:
sudo fdisk -l /dev/sda
ls -l /dev/sd*

and
mount

Thanks


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#4 2011-08-05 21:38:05

tavianator
Member
From: Waterloo, ON, Canada
Registered: 2007-08-21
Posts: 858
Website

Re: Problem with mounting drive

Miklos wrote:
[root@archiso]# dmseg | tail
Descriptor sense data wit sens descriptors (in hex):
                72 03 11 04 00 00 00 0c 00 0a 80 00 00 00 00 00
                00 7c 77 9e
sd 0:0:0:0: [sda] ASC=0x11 ASCQ=0x4
sd 0:0:0:0: [sda] CDB: cdb[0]=0x28: 28 00 00 7c 77 9e 00 01 00 00
end_request: I/O error, dev sda, sector 8157086
JDB: Failed to read block at offset 9236
JDB: recovery failed
EXT3-fs (sda3) error loading journal
ata1: EH complete

I/O error likely means that your disk is faulty.  Use smartctl -a /dev/sda to print some diagnostic output.

Offline

#5 2011-08-06 11:51:26

Miklos
Member
Registered: 2011-07-04
Posts: 13

Re: Problem with mounting drive

ewaller wrote:

I would venture that /dev/sda3 is not an ext3 partition.

Try posting the output of the following:
sudo fdisk -l /dev/sda
ls -l /dev/sd*

and
mount

Thanks

Okay, let's see

[root@archiso]# fdisk -l /dev/sda
Disk /dev/sda: 32.3 Gb, 32296140800 bytes
255 heads, 63 sectors/track, 3926 cylinders
Units = cylinders of 1605 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x6c00b8aa

    Dev     Boot Start             End                        Blocks      ID    System
/dev/sda1  *         1                 13                        104391     83    Linux
/dev/sda2           14                 46                       265072*    82    Linux swap / Solaris            
/dev/sda3           47              1003                     7687102*    83   Linux
/dev/sda4        1004             3926                    23478997*   83    Linux
[root@archiso]# ls -l /dev/sd*
brw-rw---- 1 root disk         8, 0  Aug    5     20:11 /dev/sda
brw-rw---- 1 root disk         8, 1  Aug    5     18:40 /dev/sda1
brw-rw---- 1 root disk         8, 2  Aug    5     18:40 /dev/sda2
brw-rw---- 1 root disk         8, 3  Aug    6     11:26 /dev/sda3
brw-rw---- 1 root disk         8, 4  Aug    5     18:40 /dev/sda4
brw-rw---- 1 root disk         8, 16 Aug   5     18:40 /dev/sdb
brw-rw---- 1 root disk         8, 17 Aug   5     18:40 /dev/sdb1
brw-rw---- 1 root disk         8, 32 Aug   5     18:40 /dev/sdc
brw-rw---- 1 root disk         8, 33 Aug   5     18:40 /dev/sdc1
brw-rw---- 1 root disk         8, 48 Aug   5     18:40 /dev/sdd
brw-rw---- 1 root disk         8, 49 Aug   5     18:40 /dev/sdd1
brw-rw---- 1 root disk         8, 64 Aug   5     19:26 /dev/sde
brw-rw---- 1 root disk         8, 65 Aug   5     19:28 /dev/sde1
[root@archiso]# mount
none on / type aufs (rw, relatime, si=12cd3f7aaa41ba6)
udev on /dev type tmpfs (rw, nosuid, relatime, size=10240k, mode=755)
none on /proc type proc (rw, relatime)
none on /sys type sysfs (rw, relatime)
none on /dev/pts type devpts (rw)
none one /dev/shm type tmpfs (rw)
/dev/sde1 on /mnt/usbstick type ext3 (rw)

Trying fsck only on the partition gives another result, but i'm not sure how to handle it

shulamy wrote:

try running fsck on the partition and not all disk.

ezik

[root@archiso]# fsck /dev/sda3
fsck from util-inuz-ng 2.17.2
e2fsck 1.41.11 (14-Mar-2010)
/dev/sda3: recovering journal
Error reading block 927262 (Attempt to read block from filesystem resulted in short read). Ignore error<y>? yes

Force rewrite<y>? no

fsck.ext3: unable to set superblock flags on /dev/sda3
[root@archiso]# fsck /dev/sda4
fsck from util-inuz-ng 2.17.2
e2fsck 1.41.11 (14-Mar-2010)
/dev/sda4: recovering journal

fsck.ext3: unable to set superblock flags on /dev/sda4
tavianator wrote:

I/O error likely means that your disk is faulty.  Use smartctl -a /dev/sda to print some diagnostic output.

I'm running from the Arch installation media and it seems that it doesn't contain that program.

Offline

#6 2011-08-06 16:07:00

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,804

Re: Problem with mounting drive

Miklos wrote:

...
[root@archiso]# mount
none on / type aufs (rw, relatime, si=12cd3f7aaa41ba6)
...
I'm running from the Arch installation media and it seems that it doesn't contain that program.

Okay, That makes sense -- At first I was confused. 
Can you mount /dev/sda1 ?


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#7 2011-08-06 17:39:31

tavianator
Member
From: Waterloo, ON, Canada
Registered: 2007-08-21
Posts: 858
Website

Re: Problem with mounting drive

Miklos wrote:
tavianator wrote:

I/O error likely means that your disk is faulty.  Use smartctl -a /dev/sda to print some diagnostic output.

I'm running from the Arch installation media and it seems that it doesn't contain that program.

Ah, well pacman -S smartmontools from the install medium should do it.

Offline

#8 2011-08-06 21:27:27

Miklos
Member
Registered: 2011-07-04
Posts: 13

Re: Problem with mounting drive

ewaller wrote:

Okay, That makes sense -- At first I was confused. 
Can you mount /dev/sda1 ?

Yes, that I can do! But not /dev/sda3 or /dev/sda4

tavianator wrote:

Ah, well pacman -S smartmontools from the install medium should do it.

smartctl -a /dev/sda

=== START OF INFORMATION SECTION ===
Device Model: ADATA S391
FIrmware Version: J090310
User Capacity: 32,296,140,800 bytes
Sector Size: 512 bytes logical/physical
Device is: Not in smartctl database
ATA Version is: 7
ATA Standard is: Exact ATA specification draft version not indicated
SMART Support is: Available - device has SMART capability
SMART Support is: Enabled

=== START OF READ SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED

General SMART Values:
Offline data collection status: (0x00) Offline data collection never started. Auto Offline Data Collection: Disabled

Total time to complete Offline data collection: 0 seconds
Offline data collection capabilities: (0x00) Offline data collection not supported
SMART capabilities: (0x0003) Saves SMART data before entering power-saving mode. Supports SMART auto save timer.

Error logging capability: (0x00) Error logging NOT supported. No General Purpose Logging support.

SMART Attributes Data Structure revision number: 1280
Vendor Specific SMART Attributes with Thresholds:

ID# ATTRIBUTE_NAME               FLAG      VALUE      WORST        THRESH   TYPE        UPDATED    WHEN_FAILED   RAW_VALUE
12   Power_Cycle_Count         0x0032         100       100         000  Old_age         Always             -    62
9     Power_On_Hours           0x0032         100       100         000  Old_age         Always             -    0
194 Temperature_Celsius        0x0007         032       100         000  Pre-fail        Always             -    0
229 Unknown_Attribute          0x0002         100       000         000  Old_age         Always             -    71692291724780
232 Available_Reservd_Space    0x0002         100       048         000  Old_age         Always             -    9041714819129
233 Media_Wearout_Indicator    0x0002         100       000         000  Old_age         Always             -    14845477462
234 Unknown_Attribute          0x0002         100       000         000  Old_age         Always             -    17196694016
235 Unknown_Attribute          0x0002         100       000         000  Old_age         Always             -    671105054

SMART ERROR Log not supported
SMART Self-test Log not supported
Device does not support Selective Self Tests/Logging

Offline

#9 2011-08-08 11:47:20

Miklos
Member
Registered: 2011-07-04
Posts: 13

Re: Problem with mounting drive

I used mke2fs to find all the superblock backups on /dev/sda3, then running "fsck -b XXXXX /dev/sda3" with all of them, without luck.

Superbock needs_recovery flag is clear, but journal has data.
Recovery flag not set in backup superblock, so running journal anyway.
e2fsck: unable to set superblock flags on /dev/sda3

My final solution was to try photorec and just try to recover everything, but no luck there either.

photorec: error while loading shared libraries: libntfs-3g.so.81. cannot open shared object file: No such file or directory

I googled around a little, but I only found similiar problems when using the Knoppix Live cd.

Any ideas?

Offline

#10 2011-08-08 12:50:11

lolilolicon
Member
Registered: 2009-03-05
Posts: 1,722

Re: Problem with mounting drive

The libntfs-3g.so.81 error means you need to install the correct version of ntfs-3g, meaning `pacman -S ntfs-3g`.

The I/O error happens at sector 8157086, which falls in sda3, which explains the fact you can mount sda1 and sda2, I think.
I'm not sure if this means a failing disk, but if the data is important to you, you probably should image the disk (using ddrescue) first, then do all the operations on the image (or even a copy of the image).


This silver ladybug at line 28...

Offline

#11 2011-08-08 16:09:29

Miklos
Member
Registered: 2011-07-04
Posts: 13

Re: Problem with mounting drive

lolilolicon wrote:

The libntfs-3g.so.81 error means you need to install the correct version of ntfs-3g, meaning `pacman -S ntfs-3g`.

The I/O error happens at sector 8157086, which falls in sda3, which explains the fact you can mount sda1 and sda2, I think.
I'm not sure if this means a failing disk, but if the data is important to you, you probably should image the disk (using ddrescue) first, then do all the operations on the image (or even a copy of the image).

I tried to use ddrescue to copy the partitions

ddrescue /dev/sda3 /mnt/usbstick/bup.img

Press Ctrl-C to interrupt
rescued:      2318 MB,    errorsize:              0 B,   current rate:        3954 kB/s
   ipos:      2318 MB,       errors:              0,     average rate:        4424 kB/s
   opus:      2318 MB,                 time from last successful read:           0s
journal commit I/O error…
rescued:      2340 MB,    errorsize:              0 B,   current rate:       22216 kB/s
   ipos:      2340 MB,       errors:              0,     average rate:        4458 kB/s
   opus:      2340 MB,                 time from last successful read:           0s

ddrescue: write error: Read-only file system

No idea about what's happening

$ cd /mnt/usbstick
$ls -la
ls : reading directiory.: Input/output error
total 0
$ umount /mnt/usbstick
EXT3-fs (sde1): error: ext3_put_supe: Couldn't clean up the journal

Suddenly /dev/sde1 is replaced by /dev/sdf1

What is going on?

Offline

#12 2011-08-08 16:35:02

lolilolicon
Member
Registered: 2009-03-05
Posts: 1,722

Re: Problem with mounting drive

Probably the USB stick got accidentally unplugged and replugged, I guess. Is there anyting like that in dmesg?

BTW, you should have use a log file for ddrescue, in which case you would be able to resume copying using the log. Read `info ddrescue', especially the "Examples" chapter.


This silver ladybug at line 28...

Offline

Board footer

Powered by FluxBB