Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Here is my situation:

After a sudden shutdown due to a power outage, the CentOS 5 server in my workplace will not boot.

My co-worker and I need to get an important file from the hard drive on this server before re-installing the OS.

However, when we connect the hard drive to another Linux PC and try to mount it, we get an error.

Output from fdisk -1:

Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 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       60801   488279610   8e  Linux LVM

Disk /dev/sdb: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *           1       25496   204796588+  83  Linux
/dev/sdb2           25497       60801   283587412+  8e  Linux LVM

The file I want to get is at /dev/sdb1 and /dev/sdb2.

However, when I type mount /dev/sdb1 /haccan

I get this error:

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

What do we have to do to access to the file on this hard disk?

share|improve this question

migrated from stackoverflow.com Jul 31 '12 at 8:46

This question came from our site for professional and enthusiast programmers.

    
try to do "dmesg | tail" as suggested. –  debianek Jul 31 '12 at 8:05
1  
This belongs on unix.stackexchange.com –  Let_Me_Be Jul 31 '12 at 8:10
add comment

2 Answers

up vote 1 down vote accepted

Connect your hard drive to a machine with Windows OS and Try this program: ext2explore-2.2.71

It can explore ext2/ext3/ext4 and supports supports LVM2 and EXT4. you can Save files from explorer window. I hope it works for you.

share|improve this answer
    
Sorry for late reply. This solution works perfectly. –  Vu Ngo Sep 28 '12 at 6:48
add comment

The problem is you're trying to mount the an LVM volume directly, you need to mount the LVM device, rather than the partition on the disk directly.

On a working system with the disk connected use pvscan or pvs to see the physical volumes detected by LVM.

Use vgs to see the volume groups found on the PVs and lvs to see the logical volumes contained in the VGs.

You might need to activate the volume group if it isn't done on boot with vgchange -a n [vgname] then you can mount by looking for your LV in /dev/mapper, eg:

mount /dev/mapper/[vgname]-[lvname] /mountpoint

Lots more proper documentation on LVM here: http://docs.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/6/html-single/Logical_Volume_Manager_Administration/index.html#VG_activate

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.