View unanswered posts    View active topics

All times are UTC - 6 hours





Post new topic Reply to topic  [ 4 posts ] 
Print view Previous topic   Next topic  
Author Message
Search for:
PostPosted: Fri Mar 09, 2007 10:12 pm 
Offline
Joined: Thu Oct 20, 2005 5:43 pm
Posts: 134
I was following the wiki howto for lvm (this is on an R5E50 install by the way), and I had added a second physical disk /dev/hdb. I fdisked, pvcreated, vgcreated, lvcreated then put a filesystem on it then, and mounted it, all successfully.

I copied all my /myth files to it successfully. I set LVM to start at boot, and enabled DMA, all as per the howto, the rebooted.

It came up fine and working on the new LV (I put an extra test file on it to know it was using the new disk for sure).

Next I attempted to add my (now spare) old partition to the VG. I used fdisk to delete the old hda3 partition and added a new one. I pvcreated, vgextended, umounted /dev/vg/myth and lvextended, checked and resized the filesystem, then remounted it, all successfully !
I use chown and chgrp to make mythtv the owner and group as suggested.

Then I rebooted, and I saw messages about not finding vg as it booted.

Now, if I type vgdisplay or vgscan it says



Code:
root@mythtv:/var/log# vgscan
  Reading all physical volumes.  This may take a while...
  Couldn't find device with uuid 'FPtUt7-yfix-2Ibv-8nGe-1N5H-cvGA-iqDMxO'.
  Couldn't find all physical volumes for volume group vg.
  Couldn't find device with uuid 'FPtUt7-yfix-2Ibv-8nGe-1N5H-cvGA-iqDMxO'.
  Couldn't find all physical volumes for volume group vg.
  Volume group "vg" not found
root@mythtv:/var/log# vgdisplay
  Couldn't find device with uuid 'FPtUt7-yfix-2Ibv-8nGe-1N5H-cvGA-iqDMxO'.
  Couldn't find all physical volumes for volume group vg.
  Couldn't find device with uuid 'FPtUt7-yfix-2Ibv-8nGe-1N5H-cvGA-iqDMxO'.
  Couldn't find all physical volumes for volume group vg.
  Volume group "vg" not found
root@mythtv:/var/log#   


Maybe a clue to what is wrong is here. Looking at hda with fdisk I see

Code:
Command (m for help): p

Disk /dev/hda: 250.0 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hda1   *           1         609     4891761   83  Linux
/dev/hda2             610         694      682762+  82  Linux swap / Solaris
/dev/hda3             695       30401   238621477+   5  Extended


It is saying it is extended type on hda3. This is wrong isn't it?

Edit: some extra info from vgdisplay

Code:
root@mythtv:/home/mythtv# vgdisplay --partial --verbose
  Partial mode. Incomplete volume groups will be activated read-only.
    Finding all volume groups
    Finding volume group "vg"
    Wiping cache of LVM-capable devices
  Couldn't find device with uuid 'FPtUt7-yfix-2Ibv-8nGe-1N5H-cvGA-iqDMxO'.
  Couldn't find device with uuid 'FPtUt7-yfix-2Ibv-8nGe-1N5H-cvGA-iqDMxO'.
  --- Volume group ---
  VG Name               vg
  System ID
  Format                lvm2
  Metadata Areas        1
  Metadata Sequence No  4
  VG Access             read
  VG Status             resizable
  MAX LV                0
  Cur LV                1
  Open LV               0
  Max PV                0
  Cur PV                2
  Act PV                2
  VG Size               460.45 GB
  PE Size               8.00 MB
  Total PE              58937
  Alloc PE / Size       58937 / 460.45 GB
  Free  PE / Size       0 / 0
  VG UUID               jUJkkX-bZoN-OHYB-c7if-WF68-qpcD-8kdFWT

  --- Logical volume ---
  LV Name                /dev/vg/myth
  VG Name                vg
  LV UUID                qqqpC7-ONQO-H4d0-Z1Fv-iwGM-iSPP-daLeE2
  LV Write Access        read/write
  LV Status              NOT available
  LV Size                460.45 GB
  Current LE             58937
  Segments               2
  Allocation             inherit
  Read ahead sectors     0

  --- Physical volumes ---
  PV Name               /dev/hdb1
  PV UUID               5B61BJ-pZzi-qY4V-1cSP-nuGr-U3wg-GBb1mo
  PV Status             allocatable
  Total PE / Free PE    29809 / 0

  PV Name               unknown device
  PV UUID               FPtUt7-yfix-2Ibv-8nGe-1N5H-cvGA-iqDMxO
  PV Status             allocatable
  Total PE / Free PE    29128 / 0



Please help. Is there any way out of this mess?

Seems like I could try again to pvcreate the second pv and use the same uuid, but then what happens to the filesystem in the LV (can it just be repaired?)


Top
 Profile  
 
 Post subject:
PostPosted: Sat Mar 10, 2007 2:55 am 
Offline
Joined: Thu Oct 20, 2005 5:43 pm
Posts: 134
Heart in mouth, and having read many web pages on lvm stuff, I think I have fixed it.

Here's what I did. In outline. I created a logical partition, hda5, on the extended partition hda3, used pvcreate, but forced the same uuid, restored the metadata, and restarted lvm, then I was able to mount /dev/vg/myth (and all my files are there). I am now checking the file system.
Code:
Commands used

fdisk (and various subcommands to create the logical partition hda5)
pvcreate -u <uuid string from lvm config> --restorefile /etc/lvm/backup/vg
vgcfgrestore --file /etc/lvm/backup/vg vg
/etc/init.d/lvm start
mount -a

etc


Top
 Profile  
 
 Post subject:
PostPosted: Sat Mar 10, 2007 3:34 am 
Offline
Joined: Thu Oct 20, 2005 5:43 pm
Posts: 134
After much file system correction by e2fsck, it is back. Myth is running. It is using the LV.

That'll teach me to be more careful with fdisk :oops:


Top
 Profile  
 
 Post subject:
PostPosted: Sat Mar 10, 2007 5:47 am 
Offline
Joined: Fri May 21, 2004 11:55 pm
Posts: 1206
Location: Silicon Valley, CA
I feel your pain. I did not have any useful knowledge to contribute or I would have posted. I'm glad you got it un-stuffed.

_________________
Do you code to live, or live to code?
Search LinHES forum through Google


Top
 Profile  
 

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 


All times are UTC - 6 hours




Who is online

Users browsing this forum: No registered users and 66 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group

Theme Created By ceyhansuyu