[mythtv-users] LVM Problem -- Please Help

gLaNDix (Jesse Kaufman) glandix at lloydnet.org
Wed Aug 16 06:16:49 UTC 2006


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-


More information about the mythtv-users mailing list