[mythtv-users] LVM Problem -- Please Help

Tom+Dale tdmyth at yahoo.com
Fri Aug 18 04:13:56 UTC 2006


"gLaNDix (Jesse Kaufman)" <glandix at lloydnet.org> wrote: Tom+Dale wrote:

> Right, I believe that we grown the volume group to include the new 
> drive.  I did not say that in my first message because LVM is all new to 
> me so I'm not really sure how far we got, technically.  Functionally, I 
> know that we gave up before figuring out why MythTV only recognized the 
> original disk space (excluding the new drive).

that makes sense that myth (and the os in general) would not see the 
space on that drive yet, since the logical volume has grown, but the 
filesystem has not yet ... think of it as kinda similar to the 
"standard" partitioning schemes ... let's say you have a 100GB drive and 
create a 75GB partition on it ... that 25GB left over is still there, 
but since it's unpartitioned space, nothing will "see" it ...


> As newbies struggling to get a clue in the wee hours of Saturday 
> morning, we adjourned at that point, planning to do more research 
> later.  When I checked things Saturday afternoon, I discovered the 
> clicking sound of the new drive and suspected other trouble.

yeah, i know how that goes ... until this weekend, all i knew about lvm 
was copy/paste of commands from http://www.tldp.org/HOWTO/LVM-HOWTO (a 
very good resource, by the way).  when i had the missing physical volume 
error, i googled and that's how i found out about the --removemissing 
argument to vgreduce.

you can actually run 'vgreduce -t [volumeGroup] /dev/sda' (-t means 
"test") and it will tell you if it can't remove the physical volume 
because it is still used... you can also run 'vgreduce -t 
--removemissing [volumeGroup]' and it will tell you what exactly will be 
removed (according to the man page)...

also, according to the man page, it mentions a '--partial' option which 
will do it's best to use the physical volumes it is able to find and 
will use /dev/ioerror in place of any missing drives ... that may let 
you be able to at least access your data ... maybe 'vgchange -ay 
--partial [volumeGroup]' will let you activate it to make sure all your 
data is there and do any backups?  if it's all there, you could most 
likely replace /dev/sda with a new drive and give it the old drive's 
UUID (make sure to write down what it is before doing anything!)  it's 
definitely worth a shot! :)

anyway, i'm in no way claiming to be an expert on this ... after this 
weekend, i had to read and read and read all the man pages and docs on 
lvm to fix my problem and i at least think i have a decent understanding 
... remember, almost any lvm command will accept the --test/-t option so 
you can do a "dry-run" to see what might have happened if you did it for 
real ...

when googling, i ran across this nice "simple introduction to lvm" ... 
you might find it helpful, too: 
http://www.debian-administration.org/articles/410

-g-
_______________________________________________
mythtv-users mailing list
mythtv-users at mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
Well, that nasty thing called "work" got in the way of my troubleshooting until now.  I have tried a few of your suggestions with what appears to be limited success, though I cannot be sure.

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 at mythserver ~]# 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 succes. I'm floundering here...can anyone suggest anything else to try?  Did I somehow lose the data?  It seems to me that I should be able to access it still.  I feel like 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.

Thanks everyone!

Other commands and responses that I got today:

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

[root at mythserver ~]# 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 at mythserver ~]# vgscan
  Reading all physical volumes.  This may take a while...
  Found volume group "VolGroup00" using metadata type lvm2

[root at mythserver ~]# 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


 		
---------------------------------
Yahoo! Messenger with Voice. Make PC-to-Phone Calls to the US (and 30+ countries) for 2¢/min or less.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mythtv.org/pipermail/mythtv-users/attachments/20060817/f25296e3/attachment.htm 


More information about the mythtv-users mailing list