LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 03-22-2009, 09:44 AM   #1
frog-o
LQ Newbie
 
Registered: Nov 2008
Posts: 13

Rep: Reputation: 0
How do i recover a hard-drive after forget to unmounted it before unplugging ?


I done a major oops today. I had a hard-drive plug into a usb adapter

with it setup as follow

parttion 1

has a 1 gigabyte ext3 boot sector(a little over kill probably)

partion 2 had

had a lvm 2 930.51 gbi. with an ext4 filesystem


I just boot off the usb-drive (after fight with it) and into my system and relise i did not set my root password when it would not let me log in.

No problem i thought I just unplug it and set it with my computer in the basement.

When I try to mount on my computer in the basement it gave this


when try to mount /dev/hdc

mount -t ext3 /dev/sdc /mnt/gentoo
mount: wrong fs type, bad option, bad superblock on /dev/sdc,
missing codepage or helper program, or other error
In some cases useful info is found in syslog - try
dmesg | tail or so

and when i do vgscan

Reading all physical volumes. This may take a while...
/dev/dm-2: read failed after 0 of 4096 at 994284863488: Input/output error
/dev/dm-2: read failed after 0 of 4096 at 994284920832: Input/output error
/dev/dm-2: read failed after 0 of 4096 at 0: Input/output error
/dev/dm-2: read failed after 0 of 4096 at 4096: Input/output error
/dev/dm-2: read failed after 0 of 4096 at 0: Input/output error
/dev/dm-3: read failed after 0 of 4096 at 4835966976: Input/output error
/dev/dm-3: read failed after 0 of 4096 at 4836024320: Input/output error
/dev/dm-3: read failed after 0 of 4096 at 0: Input/output error
/dev/dm-3: read failed after 0 of 4096 at 4096: Input/output error
/dev/dm-3: read failed after 0 of 4096 at 0: Input/output error
Found volume group "MyLinuxGroup" using metadata type lvm2
Found volume group "VolGroup00" using metadata type lvm2

vgchange -a y gives

/dev/dm-2: read failed after 0 of 4096 at 0: Input/output error
/dev/dm-3: read failed after 0 of 4096 at 0: Input/output error
2 logical volume(s) in volume group "MyLinuxGroup" now active
2 logical volume(s) in volume group "VolGroup00" now active

dmesg
says

12393.499741] EXT4-fs: mballoc: 96733 blocks 12086 reqs (11441 success)
[12393.499749] EXT4-fs: mballoc: 729 extents scanned, 41 goal hits, 719 2^N hits, 0 breaks, 0 lost
[12393.499754] EXT4-fs: mballoc: 114 generated and it took 4538647
[12393.499759] EXT4-fs: mballoc: 98292 preallocated, 20527 discarded
[12446.837972] usb 6-6: USB disconnect, address 11
[13583.050168] usb 3-1: new full speed USB device using ohci_hcd and address 4
[13583.189085] usb 3-1: not running at top speed; connect to a high speed hub
[13583.202003] usb 3-1: configuration #1 chosen from 1 choice
[13583.205795] scsi8 : SCSI emulation for USB Mass Storage devices
[13583.206046] usb-storage: device found at 4
[13583.206051] usb-storage: waiting for device to settle before scanning
[13583.207955] usb 3-1: New USB device found, idVendor=152d, idProduct=2338
[13583.207963] usb 3-1: New USB device strings: Mfr=1, Product=2, SerialNumber=5
[13583.207969] usb 3-1: Product: USB to ATA/ATAPI Bridge
[13583.207973] usb 3-1: Manufacturer: JMicron
[13583.207976] usb 3-1: SerialNumber: D57CA5468196
[13588.206252] usb-storage: device scan complete
[13588.212154] scsi 8:0:0:0: Direct-Access WDC WD10 EADS-00L5B1 1A01 PQ: 0 ANSI: 2 CCS
[13588.235740] sd 8:0:0:0: [sdc] 1953525168 512-byte hardware sectors: (1.00 TB/931 GiB)
[13588.240116] sd 8:0:0:0: [sdc] Write Protect is off
[13588.240126] sd 8:0:0:0: [sdc] Mode Sense: 00 38 00 00
[13588.240144] sd 8:0:0:0: [sdc] Assuming drive cache: write through
[13588.250100] sd 8:0:0:0: [sdc] 1953525168 512-byte hardware sectors: (1.00 TB/931 GiB)
[13588.256095] sd 8:0:0:0: [sdc] Write Protect is off
[13588.256100] sd 8:0:0:0: [sdc] Mode Sense: 00 38 00 00
[13588.256105] sd 8:0:0:0: [sdc] Assuming drive cache: write through
[13588.256114] sdc: sdc1 sdc2
[13588.265632] sd 8:0:0:0: [sdc] Attached SCSI disk
[13588.265899] sd 8:0:0:0: Attached scsi generic sg2 type 0
[13609.496345] Buffer I/O error on device dm-2, logical block 242745328
[13609.496408] Buffer I/O error on device dm-2, logical block 242745328
[13609.496464] Buffer I/O error on device dm-2, logical block 0
[13609.496492] Buffer I/O error on device dm-2, logical block 1
[13609.496517] Buffer I/O error on device dm-2, logical block 2
[13609.496542] Buffer I/O error on device dm-2, logical block 3
[13609.496566] Buffer I/O error on device dm-2, logical block 4
[13609.496590] Buffer I/O error on device dm-2, logical block 5
[13609.496615] Buffer I/O error on device dm-2, logical block 6
[13609.496639] Buffer I/O error on device dm-2, logical block 7
[13609.597246] FAT: unable to read boot sector
[13699.951323] __ratelimit: 12 callbacks suppressed
[13699.951330] Buffer I/O error on device dm-2, logical block 242745328
[13699.951391] Buffer I/O error on device dm-2, logical block 242745328
[13699.951452] Buffer I/O error on device dm-2, logical block 0
[13699.951479] Buffer I/O error on device dm-2, logical block 1
[13699.951503] Buffer I/O error on device dm-2, logical block 2
[13699.951527] Buffer I/O error on device dm-2, logical block 3
[13699.951553] Buffer I/O error on device dm-2, logical block 4
[13699.951578] Buffer I/O error on device dm-2, logical block 5
[13699.951602] Buffer I/O error on device dm-2, logical block 6
[13699.951626] Buffer I/O error on device dm-2, logical block 7
[13700.042402] FAT: unable to read boot sector
[13747.567729] usb 3-1: USB disconnect, address 4
[14003.024055] hub 3-0:1.0: unable to enumerate USB device on port 1
[14014.736194] usb 6-5: new high speed USB device using ehci_hcd and address 17
[14014.852896] usb 6-5: configuration #1 chosen from 1 choice
[14014.856432] scsi9 : SCSI emulation for USB Mass Storage devices
[14014.856663] usb-storage: device found at 17
[14014.856669] usb-storage: waiting for device to settle before scanning
[14014.858272] usb 6-5: New USB device found, idVendor=152d, idProduct=2338
[14014.858279] usb 6-5: New USB device strings: Mfr=1, Product=2, SerialNumber=5
[14014.858284] usb 6-5: Product: USB to ATA/ATAPI Bridge
[14014.858288] usb 6-5: Manufacturer: JMicron
[14014.858291] usb 6-5: SerialNumber: D57CA5468196
[14019.856436] usb-storage: device scan complete
[14019.857312] scsi 9:0:0:0: Direct-Access WDC WD10 EADS-00L5B1 1A01 PQ: 0 ANSI: 2 CCS
[14019.859903] sd 9:0:0:0: [sdc] 1953525168 512-byte hardware sectors: (1.00 TB/931 GiB)
[14019.860653] sd 9:0:0:0: [sdc] Write Protect is off
[14019.860660] sd 9:0:0:0: [sdc] Mode Sense: 00 38 00 00
[14019.860665] sd 9:0:0:0: [sdc] Assuming drive cache: write through
[14019.861656] sd 9:0:0:0: [sdc] 1953525168 512-byte hardware sectors: (1.00 TB/931 GiB)
[14019.862403] sd 9:0:0:0: [sdc] Write Protect is off
[14019.862408] sd 9:0:0:0: [sdc] Mode Sense: 00 38 00 00
[14019.862412] sd 9:0:0:0: [sdc] Assuming drive cache: write through
[14019.862421] sdc: sdc1 sdc2
[14019.867566] sd 9:0:0:0: [sdc] Attached SCSI disk
[14019.867829] sd 9:0:0:0: Attached scsi generic sg2 type 0
[14601.666678] __ratelimit: 12 callbacks suppressed
[14601.666685] Buffer I/O error on device dm-2, logical block 0
[14601.666706] Buffer I/O error on device dm-2, logical block 1
[14601.666715] Buffer I/O error on device dm-2, logical block 2
[14601.666724] Buffer I/O error on device dm-2, logical block 3
[14601.666760] Buffer I/O error on device dm-2, logical block 0
[14641.890512] Buffer I/O error on device dm-2, logical block 0
[14641.890536] Buffer I/O error on device dm-2, logical block 1
[14641.890545] Buffer I/O error on device dm-2, logical block 2
[14641.890554] Buffer I/O error on device dm-2, logical block 3
[14641.890591] Buffer I/O error on device dm-2, logical block 0
[14761.786706] Buffer I/O error on device dm-2, logical block 0
[14761.786735] Buffer I/O error on device dm-2, logical block 1
[14761.786744] Buffer I/O error on device dm-2, logical block 2
[14761.786753] Buffer I/O error on device dm-2, logical block 3
[14761.786792] Buffer I/O error on device dm-2, logical block 0
[14811.394253] Buffer I/O error on device dm-2, logical block 0
[14811.394288] Buffer I/O error on device dm-2, logical block 1
[14811.394297] Buffer I/O error on device dm-2, logical block 2
[14811.394306] Buffer I/O error on device dm-2, logical block 3
[14811.394342] Buffer I/O error on device dm-2, logical block 0
[14877.923062] Buffer I/O error on device dm-2, logical block 242745328
[14877.923119] Buffer I/O error on device dm-2, logical block 242745328
[14877.923205] Buffer I/O error on device dm-2, logical block 0
[14877.923234] Buffer I/O error on device dm-2, logical block 1
[14877.923262] Buffer I/O error on device dm-2, logical block 2
[14877.923289] Buffer I/O error on device dm-2, logical block 3
[14877.923315] Buffer I/O error on device dm-2, logical block 4
[14877.923341] Buffer I/O error on device dm-2, logical block 5
[14877.923367] Buffer I/O error on device dm-2, logical block 6
[14877.923392] Buffer I/O error on device dm-2, logical block 7
[15550.101980] __ratelimit: 34 callbacks suppressed
[15550.101987] Buffer I/O error on device dm-2, logical block 242745328
[15550.102033] Buffer I/O error on device dm-2, logical block 242745328
[15550.102077] Buffer I/O error on device dm-2, logical block 0
[15550.102106] Buffer I/O error on device dm-2, logical block 1
[15550.102190] Buffer I/O error on device dm-2, logical block 2
[15550.102218] Buffer I/O error on device dm-2, logical block 3
[15550.102245] Buffer I/O error on device dm-2, logical block 4
[15550.102274] Buffer I/O error on device dm-2, logical block 5
[15550.102301] Buffer I/O error on device dm-2, logical block 6
[15550.102328] Buffer I/O error on device dm-2, logical block 7
[15848.604841] FAT: invalid media value (0xb9)
[15848.604847] VFS: Can't find a valid FAT filesystem on dev sdc.
[15857.427167] VFS: Can't find ext3 filesystem on dev sdc.
[16969.885669] VFS: Can't find ext3 filesystem on dev sdc.



I know this is a dumb mistake cause buy forget to unmount it.

Can any one tell how do i repair it or if it can be fix. I only got a basic under standing of partions any good link would be help two.
I spent hour in the past using Google try to fix this type of stuff but never had much luck ay help would be appreciated.

I treid
/sbin/fsck.ext4 -p /dev/MyLinuxGroup/root

and it give me
/sbin/e2fsck: No such file or directory while trying to open /dev/hdc
Attempt to read block from filesystem resulted in short read while trying to open /dev/MyLinuxGroup/root
Could this be a zero-length partition?

Last edited by frog-o; 03-22-2009 at 10:03 AM.
 
Old 03-22-2009, 10:28 AM   #2
frog-o
LQ Newbie
 
Registered: Nov 2008
Posts: 13

Original Poster
Rep: Reputation: 0
I Just found some with with the same problem reboot the cumputer seem to fix it. I apparently forgot to umount it from the computer down stair two. This teach me how importance it is to umount things.
 
Old 03-22-2009, 11:43 AM   #3
Robhogg
Member
 
Registered: Sep 2004
Location: Old York, North Yorks.
Distribution: Debian 7 (mainly)
Posts: 653

Rep: Reputation: 97
Quote:
Originally Posted by frog-o View Post
when try to mount /dev/hdc

mount -t ext3 /dev/sdc /mnt/gentoo
mount: wrong fs type, bad option, bad superblock on /dev/sdc,
missing codepage or helper program, or other error
In some cases useful info is found in syslog - try
dmesg | tail or so
One point - here you are trying to mount the device, rather than a partition on the device (not likely to work). Try:

mount -t ext3 /dev/sdc1 /mnt/gentoo

Rob
 
Old 03-22-2009, 11:54 AM   #4
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
If this is a new installation, then you probably will want to reinstall. For a filesystem on an external device, use ext3 instead of ext4. Ext3 has a short cache time. Other filesystems like ext4 & xfs will cache the files in memory longer so to be more efficient for programs that read what they've just written.

LVM can make things more difficult as well, especially for a newbie. If this is Fedora you are installing, you can opt for non-lvm based installation at the partitioning stage of the installation. You need to mount a logical volume that's on the physical volume (The volume group on /sdc2). If you won't be making lvm snapshots for backups, or add physical volumes to a logical volume, you don't really need LVM.

I've had problems with an external device where the filesystem wouldn't show up at all, and I needed to power cycle the drive. If Linux detects a "boot device" instead of an external drive, the is the problem I had.

Good Luck.

Last edited by jschiwal; 03-22-2009 at 12:32 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Oh Crap. *Hard Drive Unmounted* yoman82 Linux - General 8 02-18-2008 10:56 AM
Please help me recover from Hard Drive failure... ArthurDent Linux - Newbie 5 03-24-2007 06:29 PM
Recover files from hard drive crawford69 Linux - General 8 03-23-2007 01:14 AM
how to recover data from a dead hard drive mariav Linux - General 3 03-19-2007 05:37 AM
How can I recover hard drive on NT and Linux Lynn Linux - Software 1 03-20-2001 01:06 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 11:02 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration