LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 11-03-2010, 06:34 PM   #1
swbac
LQ Newbie
 
Registered: Nov 2010
Posts: 1

Rep: Reputation: 0
Retrieving files from damaged LVM disk on CentOS 5.5


I'm running CentOS 5.5.

A couple of weeks ago, my 500 GB disk crashed after suffering an accelerating error rate for a couple of days.

Now that I have a new disk in place, I want to mount my old disk,
which is (was) an LVM disk, as a second disk and recover files
from it if possible.

The question is, how do I go about this?

If I mount the old disk:

# mount /dev/sdb1 /sdb1

the top-level directory shows only two subdirectories:

lost+found, which is empty;
restored, which is an image of files recovered from old disk's predecessor.

'df' shows (or appears to show) that the disk is 11% full.
Sorry, I don't recall how full the disk was before it crashed.

How do I get the system to recognize the LVM structure on the old disk & mount it?

Or is the directory structure too corrupted? Do I need to send the disk out to a recovery service?

-- Thanks!

P.S. Have aleady done some poking around with lvmdiskscan, which shows the old disk whether it's mounted or not, and vgchange -ay, which doesn't appear to do anything.
 
Old 11-04-2010, 08:29 PM   #2
tommylovell
Member
 
Registered: Nov 2005
Distribution: Raspbian, Debian, Ubuntu
Posts: 380

Rep: Reputation: 103Reputation: 103
Quote:
If I mount the old disk:

# mount /dev/sdb1 /sdb1

the top-level directory shows only two subdirectories:

lost+found, which is empty;
restored, which is an image of files recovered from old disk's predecessor.
If /dev/sdb is your old disk and you were were able to mount sdb1, something is wrong and that partition is no longer an LVM Physical volume.

If it is an LVM PV, a mount of it would give you message something like "mount: unknown filesystem type 'lvm2pv'". And in that case, when you are looking at /sdb1 you are looking at data in that mountpoint directory not in the mounted filesystem.

What you really need to be doing is mounting the LVM Logical Volumes that are in the Volume Group on that Physical Volume. Something like 'mount /dev/<VG>/<LV> /<somemountpoint>' or 'mount /dev/mapper/<VG>-<LV> /<somemountpoint>'. Be aware that activating that VG may be a problem if the VG name on the old disk is the same as a VG name that is already active on your system. (There are ways around it, ie. changing the VG name on the old disk before you activate it.)

Please supply the output of your 'lvmdiskscan', a 'pvscan', and a 'vgchange -ay -vv'. And the output from 'mount' and 'df' would be helpful as well.

Last edited by tommylovell; 11-04-2010 at 08:34 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
Adding an LVM hard disk to a system already running/using LVM firewiz87 Linux - Hardware 5 08-15-2010 12:59 AM
Recovering deleted files from vfat partition on damaged disk kresho Linux - Hardware 2 10-31-2008 03:06 AM
Check hda (disk with centos) for bad blocks (LVM) c087 Linux - Hardware 3 09-11-2008 06:37 PM
Accessing LVM Files stored on a USB Disk ruckman17 Linux - Hardware 3 10-19-2006 11:03 PM
hard disk damaged aral Linux - Hardware 1 10-19-2006 06:02 PM

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

All times are GMT -5. The time now is 04:16 AM.

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