LinHES Forums
http://forums.linhes.org/

LVM / 019 - Don't Panic!
http://forums.linhes.org/viewtopic.php?f=17&t=9055
Page 1 of 1

Author:  thornsoft [ Sat Mar 18, 2006 2:51 pm ]
Post subject:  LVM / 019 - Don't Panic!

Hi All,
R5B7 went smoothly with a couple of bumps that I expected.

Minor: Overscan chops off some of the prompts. I had originally set up with a PC monitor, but now it's on my big TV that has too much overscan.

Medium: It re-ordered my input cards, so I'm going to trash and start over with new scans. i.e. DVB0 was my HD3000, not it's the Air2PC. No biggie.

Major: Shows and such missing, due to missing LVM. DON'T PANIC!
Everything was there, I just had to teach the system how to find it again.
I had previously used the LVM How-To to add a second drive using an LVM, spanning both drives (the entire new drive, and the /myth partition of the original drive).
http://knoppmythwiki.org/index.php?page=LvmHowTo
Once again, the LVM How-To was helpful.

I ran vgscan, and it showed my vg. Good!
And it also knew about my "myth" logical volume IN the vg. Great!
And it showd up as 402GB in vgdisplay. Phew!
I tried step 4, but it said that the LV was already there. Ok.
Step 5 has you do a mke2fs. That scared me, because it looked like it would wipe out my data. So I skipped to step 6, mounting the lv. Didn't work. Right- I skipped step 5! Luckily, I decided to go and read, instead of pounding away at the keys.
I found another writeup on LVM: http://www.tldp.org/HOWTO/html_single/LVM-HOWTO/#activatevgs
which had this:
13.6.5. Activate the volume group
So I ran: vgchange -ay vg
to activate the vg. IIRC, NOW I could mount it.

So anyway, before I went and mounted the old /myth over the new /myth, I copied the /myth stuff over to /cache. 'cause cache isn't used now, and that was a good-looking spot to stick stuff for now.
mkdir /cache/tempmyth
cp -p -r /myth/* /cache/tempmyth

Then I mounted, and copied back, according to the wiki writeup.

I rebooted, and it was gone again. Didn't read the wiki far enough.
Steps 8,9,10 in the wiki.

NOW I'm all set.
Hey, thanks everyone who worked on 0.19! Looking good.

Author:  tjc [ Sat Mar 18, 2006 4:02 pm ]
Post subject:  Re: LVM / 019 - Don't Panic!

thornsoft wrote:
Major: Shows and such missing, due to missing LVM. DON'T PANIC!
Everything was there, I just had to teach the system how to find it again.
I had previously used the LVM How-To to add a second drive using an LVM, spanning both drives (the entire new drive, and the /myth partition of the original drive).
http://knoppmythwiki.org/index.php?page=LvmHowTo
Once again, the LVM How-To was helpful.

I need to go update the wiki. R5B7 comes with a recreate_lvm.sh script that does all of this for you. OK, the KnoppMythUpgradeWithLVM is now updated...

Please see this thread for a full set of R5B7 upgrade hints: http://mysettopbox.tv/phpBB2/viewtopic.php?t=9069

Author:  ceenvee703 [ Sat Mar 18, 2006 4:07 pm ]
Post subject: 

The recreate_lvm.sh script does indeed work great for upgrading a machine already using LVM.

Just to be specific on the steps, do an auto-upgrade, let the machine reboot, then when the KnoppMyth desktop appears and a window asks for your root password, press control-alt-F1. Then log in as root and type "recreate_lvm.sh", let it do its thing, then when it finishes, control-alt-F7 back to continue installation.

I had some snags of my own upgrading but this was definitely not one of them thanks to tjc and his script.

Author:  thornsoft [ Sat Mar 18, 2006 4:16 pm ]
Post subject:  Re: LVM / 019 - Don't Panic!

tjc wrote:
OK, the KnoppMythUpgradeWithLVM is now updated...

Cool - thanks. I'll probably need it again! It was a good mental excercise for me, anyway.

Author:  entourage [ Sun May 14, 2006 8:04 pm ]
Post subject: 

I've just ran into problems with the R5B7 upgrade.
I followed tjc's directions from this post: http://mysettopbox.tv/phpBB2/viewtopic.php?t=9069
I backed up the installation and ran the "Auto Upgrade" It completed and when I got to the point where it wanted me to enter my password I did the CTRL ALT F1 and typed in recreate_lvm.sh.
Immediately I got errors:
Code:
recreate_lvm.sh
Reading all physical volumes.  This may take a while...
Unmounting drives
Fixing up /etc/fstab
Restoring /dev/vg/myth
Unable to find volume group "vg"
Shutting down LVM Volume Groups...
Setting up LVM Volume Groups...
Reading all physical volumes.  This may take a while...
mount: special device /dev/vg/myth does not exist
Setting LVM to start on boot.

Reading the LVMHowTo I tried a vgscan and got this:
Code:
Reading all physical volumes.  This may take a while...
Unable to find volume group "vg"

So...now I'm stumped. I was running R5A30.2 before the upgrade. I did a standard "Auto Install" originally and set everything default so I presume following your instructions would do the trick.
If there is something I'm missing, please let me know. I have a few recorded programs I'd like to get, otherwise I would do a complete clean installation.
Thanks in advance!

Author:  Irishcream [ Sun May 14, 2006 8:15 pm ]
Post subject: 

is there any chance that you called your volume group something other than vg during setup? that script is specific to the vg name

Author:  tjc [ Sun May 14, 2006 8:35 pm ]
Post subject: 

The script just automates the manual directions found here: http://www.knoppmythwiki.org/index.php?page=KnoppMythUpgradeWithLVM

IrishCream's comment is also correct. If you called you voulume group something else, you'll either need to edit the script or use the manual process.

Oh, and is the storage for the volume group on a device that's not accessible, like a USB drive or a SATA drive that hasn't had it's drivers loaded yet?

Author:  entourage [ Mon May 15, 2006 5:03 am ]
Post subject: 

From reading your postings, I knew the volume group had to be named "vg"or else it wouldn't work. (and, as you said, would need to be manally edited)
When I setup the installation the first time around, I don't remember ever changing that or naming it at all. I had knoppmyth automatically create all partitions for me.

My HDD is just a simple 160GB IDE drive split into 4 partitions. If I run cfdisk I can see all 4:
hda1 Primary Linux ext3 [root] 3981.04
hda2 Primary Linux swap /solaris 806.08
hda3 Primary Linux 10758.67
hda4 Primary Linux ext3 [myth] 144493.50

So I presume it's named something else and I'm not aware of it...
Hope this helps and thanks again!

Author:  entourage [ Mon May 15, 2006 8:37 pm ]
Post subject: 

Still no luck. I think I'm closer though.
I was able to run
Code:
pvcreate /dev/hda4
which said it was created successfully.

I then ran
Code:
vgcreate vg /dev/hda4
Again, successful.

I checked the vg with
Code:
vgdisplay
and I can see my volume group.
Code:
---Volume Group---
VG Name VG
System ID
Format lvm2
...
VG Size 134.57 GB
PE Size 4.00MB
Total PE 34449
Alloc PC / Size  0/0
Free PE / Size  34449/134.57 GB

I can't tell if I even have my old data on this partition anymore. I'm sure I ran the "Upgrade" and not the "Install"
Does this look right?

Author:  stevenj [ Sat May 27, 2006 1:12 am ]
Post subject: 

Entourage, did you figure this out yet? From your partition table it doesn't look like you have an LVM partition. Your FS Type in CFdisk would say "Linux LVM" if it's LVM. And you said you just did a standard Auto Install originally so that wouldn't create an LVM partition. You'd have had to manually create the LVM partition (like in the lvmhowto wiki) or have run the create_lvm script.

So, what did you figure out?

Page 1 of 1 All times are UTC - 6 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/