LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices

Reply
 
Search this Thread
Old 08-29-2009, 08:50 AM   #1
ericcarlson
Member
 
Registered: Jan 2002
Posts: 161

Rep: Reputation: 30
Recover LVM after Fed11 repair screwed me up!!!


I had an F11 setup with 4 IDE disks, all about 400G in size, all automatically managed from whatever the default LVM setup did. The first was split into a small boot partition and a larger main one. All was fine until the third one started clicking and died. I disconnected it and found I could not boot as the fstab mounted it. So after a little Googling I booted from the original F11 repair DVD and it complained about invalid fstab entries, should I fix? Great I thought, thats just what I want so said yes. Next boot and ... after about 1 inch of the loading bar everything stopped.

I pulled a spare 80G disk and did a clean F11 install. I mounted the original first disk, the one it booted from which never had problems, and think that "repair" stuffed it. I'm not familiar with LVM and despite reading around it just can't figure out what to try next.

I'm worried because when I mount any of the other volumes they are fine, e.g mount /dev/sde1 Vol5 is ok, and that used to work with the orig disk when I did mount /dev/sdd2 Vol1 but that now reports "you must specify the filesystem type". I think its possible the data is ok but that repair somehow lost the filetype on the wrong disk.

Here is the output from some commands which I think are relevant - sdd2 is the vol I want, I actually can mount the old boot partitio (sdd1):

[root@tiger data]# fdisk /dev/sdd

The number of cylinders for this disk is set to 48641.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)

Command (m for help): p

Disk /dev/sdd: 400.0 GB, 400088457216 bytes
255 heads, 63 sectors/track, 48641 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x000d1036

Device Boot Start End Blocks Id System
/dev/sdd1 * 1 25 200781 83 Linux
/dev/sdd2 26 48641 390508020 8e Linux LVM

Command (m for help):
[root@tiger data]# pvscan
PV /dev/sda2 VG vg_tiger lvm2 [74.33 GB / 0 free]
Total: 1 [74.33 GB] / in use: 1 [74.33 GB] / in no VG: 0 [0 ]

Why doesn't the disk (sdd2) appear there? Thats the new 80G I used.

Just looking for any way to mount that partition in the new system, or ideally fix it so it works as before. Thanks.
 
Old 08-31-2009, 08:54 PM   #2
chrism01
Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.5, Centos 5.10
Posts: 16,280

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Its there

Quote:
/dev/sdd2 26 48641 390508020 8e Linux LVM
 
Old 09-01-2009, 01:09 AM   #3
ericcarlson
Member
 
Registered: Jan 2002
Posts: 161

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by chrism01 View Post
Its there
Hi & thanks. I meant in the pvscan.
I know fdisk can see the partition, all I want to do is mount it.
 
Old 09-01-2009, 03:37 AM   #4
ericcarlson
Member
 
Registered: Jan 2002
Posts: 161

Original Poster
Rep: Reputation: 30
Actually I made a little more progress. This just reinforces my thinking the data is ok. I followed this: http://www.linuxjournal.com/article/8874 which shows you can issue a dd command to extract the vol metadata as a text file. It came over ok, so after tidying it up I have the file, I called it may.txt after the timestamp. When I try to recover from it as described this is what happens

[root@tiger backup]# vgcfgrestore -f may.txt VolGroup01
Can't process text format file - missing contents field.
Restore failed.
[root@tiger backup]#

Here is the full file - what is this "missing contents field" and am i on the right track here please?

VolGroup01 {
id = "q0Uw5f-838p-qDcf-zYO1-814G-q5jl-mZIvhY"
seqno = 4
status = ["RESIZEABLE", "READ", "WRITE"]
flags = []
extent_size = 65536
max_lv = 0
max_pv = 0

physical_volumes {

pv0 {
id = "aGktTJ-uP90-0aPo-dERu-WkM3-e2ji-YLnYMX"
device = "/dev/sdd2"

status = ["ALLOCATABLE"]
flags = []
dev_size = 781016040
pe_start = 384
pe_count = 11917
}
}

logical_volumes {

LogVol01 {
id = "aF1O6J-fHUU-kYVN-98Xg-33ws-Bxwa-9U8z9a"
status = ["READ", "WRITE", "VISIBLE"]
flags = []
segment_count = 1

segment1 {
start_extent = 0
extent_count = 62

type = "striped"
stripe_count = 1 # linear

stripes = [
"pv0", 11854
]
}
}
}
}
 
  


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 Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Repair LVM partition megerdin Linux - Newbie 7 02-24-2009 08:30 AM
Recover & Repair bad Sectors ahmed_as8 Linux - Newbie 1 02-02-2009 02:42 AM
recover/repair ubuntu 7.10 Jayla Linux - Newbie 4 02-27-2008 04:31 PM
cant boot cant repair, cant reinstall... can i recover my files?? AnimaSola Suse/Novell 4 08-07-2007 07:58 PM
Suse 9.0; screwed up KDE and wants to repair this gaytan Linux - Newbie 1 05-07-2004 11:15 AM


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

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration