LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Fedora (https://www.linuxquestions.org/questions/fedora-35/)
-   -   Recover LVM after Fed11 repair screwed me up!!! (https://www.linuxquestions.org/questions/fedora-35/recover-lvm-after-fed11-repair-screwed-me-up-751068/)

ericcarlson 08-29-2009 08:50 AM

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.

chrism01 08-31-2009 08:54 PM

Its there

Quote:

/dev/sdd2 26 48641 390508020 8e Linux LVM

ericcarlson 09-01-2009 01:09 AM

Quote:

Originally Posted by chrism01 (Post 3664732)
Its there

Hi & thanks. I meant in the pvscan.
I know fdisk can see the partition, all I want to do is mount it.

ericcarlson 09-01-2009 03:37 AM

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
]
}
}
}
}


All times are GMT -5. The time now is 09:55 AM.