LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 07-24-2011, 08:24 AM   #1
gskidmor
LQ Newbie
 
Registered: Jul 2006
Location: Cleveland OH
Distribution: Ubuntu, CentOS
Posts: 12

Rep: Reputation: 0
can't mount old hard drive


My old centos 5.5 server stopped working so I setup a new one and I can't mount it to get the data off (if you're curious, I do have a NAS, but because of renovations it was accidentally shut-off July 2...)

here's the fdisk -l:

[root@localhost ~]# fdisk -l

Disk /dev/sda: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 * 1 13 104391 83 Linux
/dev/sda2 14 121601 976655610 8e Linux LVM

Disk /dev/sdb: 73.4 GB, 73498693632 bytes
255 heads, 63 sectors/track, 8935 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sdb1 * 1 13 104391 83 Linux
/dev/sdb2 14 8935 71665965 8e Linux LVM

Anyways, when I attach the old harddrive to the new server, I can mount the boot partition using this:

mount /dev/sdb1 /newdisk

This works and I can go in and see all of the files, but if I do this (after doing umount /newdisk of course):

mount /dev/sdb2 /newdisk

I get an error saying I have to specify the filesystem type. so if I do:

root@localhost ~]# mount -t ext3 /dev/sdb2 /newdisk
mount: wrong fs type, bad option, bad superblock on /dev/sdb2,
missing codepage or other error
In some cases useful info is found in syslog - try
dmesg | tail or so

[root@localhost ~]# dmesg | tail
SCSI device sdc: 4014080 512-byte hdwr sectors (2055 MB)
sdc: Write Protect is off
sdc: Mode Sense: 00 00 00 00
sdc: assuming drive cache: write through
sdc: sdc1
sd 5:0:0:0: Attached scsi removable disk sdc
sd 5:0:0:0: Attached scsi generic sg2 type 0
usb-storage: device scan complete
hfs: unable to find HFS+ superblock
VFS: Can't find ext3 filesystem on dev sdb2.

Is this harddrive just toast?
 
Old 07-24-2011, 08:28 AM   #2
alfredo10
Member
 
Registered: Sep 2010
Location: Algarve
Distribution: Linux Multiboot
Posts: 295

Rep: Reputation: 15
Hi!
Some distris allow "parted".
What is the output (as root)?
Code:
parted -l print
alfredo
 
Old 07-24-2011, 08:53 AM   #3
gskidmor
LQ Newbie
 
Registered: Jul 2006
Location: Cleveland OH
Distribution: Ubuntu, CentOS
Posts: 12

Original Poster
Rep: Reputation: 0
Here's the output:

[root@localhost ~]# parted -l print

Model: ATA WDC WD1001FALS-0 (scsi)
Disk /dev/sda: 1000GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number Start End Size Type File system Flags
1 32.3kB 107MB 107MB primary ext3 boot
2 107MB 1000GB 1000GB primary lvm



Model: FUJITSU MAS3735NC (scsi)
Disk /dev/sdb: 73.5GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number Start End Size Type File system Flags
1 32.3kB 107MB 107MB primary ext3 boot
2 107MB 73.5GB 73.4GB primary lvm


So I was reading up on parted, would I simply type:

parted /dev/sdb2
 
Old 07-24-2011, 08:59 AM   #4
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: CentOS
Posts: 4,535

Rep: Reputation: 2077Reputation: 2077Reputation: 2077Reputation: 2077Reputation: 2077Reputation: 2077Reputation: 2077Reputation: 2077Reputation: 2077Reputation: 2077Reputation: 2077
Partition 2 is an LVM container with one or more logical volumes inside. That is where your file systems are. What does "lvscan" show?
 
Old 07-24-2011, 09:03 AM   #5
gskidmor
LQ Newbie
 
Registered: Jul 2006
Location: Cleveland OH
Distribution: Ubuntu, CentOS
Posts: 12

Original Poster
Rep: Reputation: 0
well I was just playing around a little more and it looks like the partition tables are gone:

[root@localhost ~]# fdisk -l /dev/sdb

Disk /dev/sdb: 73.4 GB, 73498693632 bytes
255 heads, 63 sectors/track, 8935 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sdb1 * 1 13 104391 83 Linux
/dev/sdb2 14 8935 71665965 8e Linux LVM
[root@localhost ~]# fdisk -l /dev/sdb2

Disk /dev/sdb2: 73.3 GB, 73385948160 bytes
255 heads, 63 sectors/track, 8922 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/sdb2 doesn't contain a valid partition table

Is there anyway I can restore this? Will parted do this or gpart?
 
Old 07-24-2011, 10:48 AM   #6
michaelk
Moderator
 
Registered: Aug 2002
Posts: 21,210

Rep: Reputation: 3972Reputation: 3972Reputation: 3972Reputation: 3972Reputation: 3972Reputation: 3972Reputation: 3972Reputation: 3972Reputation: 3972Reputation: 3972Reputation: 3972
There is nothing wrong with the partition table. There are not any partitions in sdb2 which is why fdisk -l /dev/sdb2 fails. In a nutshell LVMs are containers for logical volumes and can not be mounted like a regular partition. Its not possible to mount a LV with the same name so you might need to change system (sda2). Here are some links to help you get going.

http://www.idevelopment.info/data/Un...lVolumes.shtml
http://www.inlet.co.nz/tutorials/lin...lvm-partitions
http://www.whoopis.com/howtos/linux_lvm_recovery.html
 
Old 07-24-2011, 12:28 PM   #7
gskidmor
LQ Newbie
 
Registered: Jul 2006
Location: Cleveland OH
Distribution: Ubuntu, CentOS
Posts: 12

Original Poster
Rep: Reputation: 0
I think I've made some great progess. I was messing around and tried to boot right from the old drive - I entered interactive mode and said no to most every service that it asked about and it came up - in pure command line mode, but it came up. Question now is, how do I get it to mount a USB thumb drive so I can copy over the data I need?
 
Old 07-24-2011, 12:50 PM   #8
gskidmor
LQ Newbie
 
Registered: Jul 2006
Location: Cleveland OH
Distribution: Ubuntu, CentOS
Posts: 12

Original Poster
Rep: Reputation: 0
I think I got it - it seems if I start the acahi and the local service it hangs saying mount.cifs failed with code -11 but if in intreactive mode I don't start those two, I can get it booting and it looks like I will just be able to SCP the files off that I want/need (though some are huge so that has me worried, but it's what I'm about to try)
 
Old 07-24-2011, 01:03 PM   #9
gskidmor
LQ Newbie
 
Registered: Jul 2006
Location: Cleveland OH
Distribution: Ubuntu, CentOS
Posts: 12

Original Poster
Rep: Reputation: 0
got over all the files that I can think of right now that I want to preserve, so I guess this is solved.

IF anyone knows why the local service is causing this problem I would love to hear from you
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
udev rules to mount external hard drive at mount point akamikeym Gentoo 3 03-31-2010 01:12 PM
Removed bad hard drive from computer, now flash drive won't mount. checkmate3001 Linux - Hardware 6 08-15-2008 12:03 AM
Help writing script file to mount / mount hard drive Rustylinux Linux - General 6 06-27-2006 09:34 AM
Where to mount second hard drive Harimwakairi Linux - Newbie 3 08-11-2003 04:29 PM
Have hard drive- help mount? saxblue Linux - General 10 08-02-2003 07:46 PM

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

All times are GMT -5. The time now is 06:09 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