Click to See Complete Forum and Search --> : Problem with new disk and LVM


traar
08-15-2006, 09:36 AM
Greetings. I am hoping that someone here can assist me in resolving a potential data loss situation. I am running Fedora Core 4 on a new Biostar mobo with a Sempron 3200+ that had two IDE drives of 80GB & 320GB. About 40GB of the smaller drive was combined with the large drive in an LVM using XFS. On Friday, I added a brand new SATA drive of 250GB. At the start, everything seemed fine and I successfully added the new drive to the logical volume. Although I had not put any data on it yet, it appeared to be a successful addition.

On Saturday, I noticed that the new drive was clicking loudly and running extremely hot. I surmised that there may be something wrong with it and I decided to shut down, disconnect the new drive, and reboot. Of course, the entire logical volume was now inaccessible because part of the volume was not found. Unfortunately, when I reconnected the drive, the volume was still not accessible. More research into the problem suggests to me that the drive failed, and in fact the BIOS does not see the drive on boot now.

I have made arrangements to RMA the new drive (thanks to NewEgg's great customer service). So these questions weigh heavily on my mind:

1) Will I lose ~200GB of data from the still functioning drives that were part of this LVM?

2) Or will I be able to put in an identical, functioning replacement and give it a UUID that the LVM likes in order to access my original drives?

3) If the new drive is added to the system, how would I go about re-linking the original UUID to the new physical volume?

Here are some details:

[root@server ~]# pvdisplay
Couldn't find device with uuid 'fxlccO-4li0-nmyD-9avZ-Vc60-GGWX-jUhqOv'.
Couldn't find device with uuid 'fxlccO-4li0-nmyD-9avZ-Vc60-GGWX-jUhqOv'.
--- Physical volume ---
PV Name /dev/hda5
VG Name VolGroup00
PV Size 66.12 GB / not usable 0
Allocatable yes (but full)
PE Size (KByte) 4096
Total PE 16926
Free PE 0
Allocated PE 16926
PV UUID 317l2C-oay1-TWFG-5NTX-XJS3-vLal-Xh5bBL

--- Physical volume ---
PV Name /dev/hdb
VG Name VolGroup00
PV Size 298.09 GB / not usable 0
Allocatable yes (but full)
PE Size (KByte) 4096
Total PE 76311
Free PE 0
Allocated PE 76311
PV UUID nfLxS1-0u3t-5Zr9-57iu-1oZe-Bkkd-75SERQ

--- Physical volume ---
PV Name unknown device
VG Name VolGroup00
PV Size 232.88 GB / not usable 0
Allocatable yes
PE Size (KByte) 4096
Total PE 59617
Free PE 225
Allocated PE 59392
PV UUID fxlccO-4li0-nmyD-9avZ-Vc60-GGWX-jUhqOv

[root@server ~]# vgdisplay
Couldn't find device with uuid 'fxlccO-4li0-nmyD-9avZ-Vc60-GGWX-jUhqOv'.
Couldn't find all physical volumes for volume group VolGroup00.
Couldn't find device with uuid 'fxlccO-4li0-nmyD-9avZ-Vc60-GGWX-jUhqOv'.
Couldn't find all physical volumes for volume group VolGroup00.
Couldn't find device with uuid 'fxlccO-4li0-nmyD-9avZ-Vc60-GGWX-jUhqOv'.
Couldn't find all physical volumes for volume group VolGroup00.
Couldn't find device with uuid 'fxlccO-4li0-nmyD-9avZ-Vc60-GGWX-jUhqOv'.
Couldn't find all physical volumes for volume group VolGroup00.
Volume group "VolGroup00" doesn't exist

[root@server ~]# pvcreate -u fxlccO-4li0-nmyD-9avZ-Vc60-GGWX-jUhqOv /dev/sda
Device /dev/sda not found.

[root@server ~]# vgcfgrestore -tnVolGroup00 /dev/VolGroup00
Test mode: Metadata will NOT be updated.
Couldn't find device with uuid 'fxlccO-4li0-nmyD-9avZ-Vc60-GGWX-jUhqOv'.
Couldn't find all physical volumes for volume group VolGroup00.
Restore failed.

happybunny
08-15-2006, 10:16 AM
i dont have time to write up more than this but:

http://www.justlinux.com/forum/showthread.php?t=146232

ill come back later and see if that helped you

traar
08-18-2006, 09:41 AM
Well, that nasty thing called "work" got in the way of my troubleshooting until now. Thanks for your post, Mike. Elsewhere, I was led to believe that I did not need to wait for my RMA to solve the problem. Since all of the data that I want to recover is on the original two physical volumes (the 80 & 320GB drives), it made sense to me to try to recover that portion of the volume group. I tried the following steps without achieving ultimate success.

I am hopeful that someone can tell me if I made things worse, better, or neither; and if you see that I am missing something that might be important, please let me know. Of course, if it still makes sense to try the suggestions made in the link from your first post, I will attach the replacement SATA drive and try those; however, it seems like the volume group is in tact now with just the original drives, so I’m not sure it makes sense anymore. As always, I sincerely appreciate your assistance!

First, I tried "vgreduce --removemissing VolGroup00" which seemed to work. Then, I tried "vgchange -ay --partial VolGroup00" which also appeared to complete successfully. Next I tried "ls /video" which reported nothing in the directory (this would not be correct if the volume group was working). Next, I tried:

[root@server ~]# mount -a
mount: special device /dev/VolGroup00/LogVol00 does not exist

Now I didn't know what else to try so I guessed at a few commands without any success. It seems to me that I still should be able to access the data. I think I just need to tell the system how to find the logical volume LogVol00. It doesn't show up under /dev, but I don't know if that matters.

Other commands and responses that I got today:

[root@server ~]# vgchange -a y VolGroup00
0 logical volume(s) in volume group "VolGroup00" now active

[root@server ~]# pvdisplay
--- Physical volume ---
PV Name /dev/hda5
VG Name VolGroup00
PV Size 66.12 GB / not usable 0
Allocatable yes
PE Size (KByte) 4096
Total PE 16926
Free PE 16926
Allocated PE 0
PV UUID 317l2C-oay1-TWFG-5NTX-XJS3-vLal-Xh5bBL

--- Physical volume ---
PV Name /dev/hdb
VG Name VolGroup00
PV Size 298.09 GB / not usable 0
Allocatable yes
PE Size (KByte) 4096
Total PE 76311
Free PE 76311
Allocated PE 0
PV UUID nfLxS1-0u3t-5Zr9-57iu-1oZe-Bkkd-75SERQ

[root@server ~]# vgscan
Reading all physical volumes. This may take a while...
Found volume group "VolGroup00" using metadata type lvm2

[root@server ~]# vgck -vv VolGroup00
Setting global/locking_type to 1
Setting global/locking_dir to /var/lock/lvm
File-based locking enabled.
Using volume group(s) on command line
Locking /var/lock/lvm/V_VolGroup00 RB
Finding volume group "VolGroup00"
/dev/sda: No label detected
/dev/hda1: No label detected
/dev/hda2: No label detected
/dev/hda3: No label detected
/dev/hda5: lvm2 label detected
/dev/hdb: lvm2 label detected
/dev/hda5: lvm2 label detected
/dev/hdb: lvm2 label detected
/dev/hda5: lvm2 label detected
/dev/hdb: lvm2 label detected
/dev/hda5: lvm2 label detected
/dev/hdb: lvm2 label detected
Unlocking /var/lock/lvm/V_VolGroup00