View unanswered posts    View active topics

All times are UTC - 6 hours





Post new topic Reply to topic  [ 18 posts ] 
Go to page 1, 2  Next

Print view Previous topic   Next topic  
Author Message
Search for:
 Post subject: LVM HowTo
PostPosted: Thu Feb 19, 2004 4:38 pm 
Offline
Joined: Wed Jan 07, 2004 5:21 pm
Posts: 116
I decided to go with LVM because I have heard that it gives you greater flexibillity, such as being able to easily add or take away space from partitions or being able to add additional space to a mount from the free space on another hard drive.

Here are the steps I took to setup LVM on a second Hard Drive, which will be used entirely for /myth. As as reference I used http://tldp.org/HOWTO/LVM-HOWTO. Any sugestions for improving what I did would be greatly appreciated, as I only did the minimum required to set it up. The following instructions assume you have Knoppyth R4V2 set up on your primary drive (hda), and your second drive is the slave (hdb).

1. Partition the drive.
The following assumes your drive currently has no partitions set up. Also, when creating the partition, we need to make sure to change the type of the partion we create to 8e (Linux LVM).
fdisk /dev/hdb
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-19457, default 1): Press Enter
Last cylinder or +size or +sizeM or +sizeK (1-19457, default 19457): Press Enter
Command (m for help): t
Hex code (type L to list codes): 8e
Command (m for help): w

2. Initialize Disk (Creating the Physical Volume).
The following command creates a volume group descriptor at the start of the partition /dev/hdb1.
pvcreate /dev/hdb1

3. Create a volume group vg (/dev/vg)
vgcreate vg /dev/hdb1

4. Use vgdisplay to find the "Total PE" size to create a logical volume that uses the entire volume group. Then use the size displayed to create the logical volume named myth.
vgdisplay vg | grep "Total PE"
Total PE 4768
lvcreate -l 4768 vg -n myth

5. Create the ext3 filesystem for the logical volume (/dev/vg/myth) you created. I used the recommendation from the manual install section of the Knoppmyth installation instructions page.
mke2fs -j -O sparse_super -m0 -i8000000 -L myth /dev/vg/myth

6. Mount your logical volume.
I chose to mount it to /mnt/hdb1 since it was allready created for me. If /mnt/hdb1 does not exist, just do mkdir /mnt/hdb1.
mount /dev/vg/myth /mnt/hdb1

7. Copy over the files from /myth to /mnt/hdb1.
cp -p -r /myth/* /mnt/hdb1

8. Edit /etc/fstab.
Comment out or change /dev/hda to /dev/vg/myth.
#/dev/hda4 /myth auto defaults,auto 0 2
/dev/vg/myth /myth auto defaults,auto 0 2


9. Set LVM to start up at boot.
An lvm script is allready installed in /etc/init.d/lvm.
update-rc.d lvm start 26 S . stop 82 1 .

10. Reboot
After rebooting your box should now be using the second drive as the /myth mount.



Things to add to HowTo/Questions/ToDo:
- What is the difference between initializing the disk with pvcreate /dev/hdb (descriptor added to the begining of drive) and pvcreate /dev/hdb1 (descriptor added to the begining of partition)? Any advantages to using one over the other?
- Is Knoppmyth using LVM 1 or LVM 2?
- When I get an additional hard drive, how would I use LVM to setup the drives in Raid 0 (striped LVM)?
- How to add an additional drive (for example hdc) using LVM to increase the capacity of hdb?


Top
 Profile  
 
 Post subject: LVM Upgrade Concern
PostPosted: Fri Feb 20, 2004 8:19 pm 
Offline
Joined: Mon Jan 26, 2004 8:46 pm
Posts: 7
Location: New Jersey
I too went the LVM route, I was looking for the added flexability. However, now that R4V2 is out, I am concerned about upgrading with respect to the LVM volume. Will it boot with my LVM parameters intact, or will I lose all of my data and have to start from scratch again?

_________________
The early bird may get the worm...but the second mouse gets the cheese!


Top
 Profile  
 
 Post subject:
PostPosted: Sat Feb 21, 2004 4:21 am 
Offline
Joined: Fri Sep 19, 2003 7:05 pm
Posts: 5088
Location: Fontana, Ca
You will lose it.. If R4 is working find for you, why upgrade? Take a look at the changelog.http://mysettopbox.tv/CHANGELOG.txt

_________________
cesman

When the source is open, the possibilities are endless!


Top
 Profile  
 
 Post subject:
PostPosted: Sat Feb 21, 2004 8:19 am 
Offline
Joined: Mon Jan 26, 2004 8:46 pm
Posts: 7
Location: New Jersey
Picture quality is the main reason, I still get jaggies on my screen when watching recorded shows.

_________________
The early bird may get the worm...but the second mouse gets the cheese!


Top
 Profile  
 
 Post subject:
PostPosted: Sat Feb 21, 2004 1:33 pm 
Offline
Joined: Mon Jan 05, 2004 1:30 pm
Posts: 139
Location: New Hope, MN
As an alternative to upgrading via the r4v2 image, you might consider following the instructions for updating via the debs to mythtv 0.14.

I think there are a few differences between that upgrade and what gets installed as part of an upgrade via an iso for r4v2, but I am not the person to ask what those differences are.

-Rusty

_________________
Master:
- AMD 1800XP on a MSI KT4V motherboard, via KT400 bios
- 120 G Segate Baracuda /, /cache, /myth, swap
- 200 G Segate Baracuda /myth/tv
- 3 Haupauge! WinTV PVR250s
- 19" Daewoo Monitor (1280x1024 ni)


Top
 Profile  
 
 Post subject:
PostPosted: Sat Feb 21, 2004 1:50 pm 
Offline
Joined: Fri Sep 19, 2003 7:05 pm
Posts: 5088
Location: Fontana, Ca
mobilemetal wrote:
Picture quality is the main reason, I still get jaggies on my screen when watching recorded shows.
Have you tried to eliminate the jaggies? The higher res you are using the more likely you'll see jaggies..

_________________
cesman

When the source is open, the possibilities are endless!


Top
 Profile  
 
 Post subject:
PostPosted: Sat Feb 21, 2004 4:11 pm 
Offline
Joined: Mon Jan 26, 2004 8:46 pm
Posts: 7
Location: New Jersey
I am watching on a 30" Samsung HDTV via the S-Video connector. And I think I already upgraded the 0.14 debs.

_________________
The early bird may get the worm...but the second mouse gets the cheese!


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jun 11, 2004 7:14 am 
Offline
Joined: Tue Apr 13, 2004 6:51 pm
Posts: 890
Location: Groton, MA
Thanx for the LVM HowTo. Worked great. I did have one issue. During the vgcreate step, I got the following error:
Code:
 vgcreate -- ERROR "lvm_tab_read(): size" inserting volume group "vg"

A google search came up with this solution:
https://www.redhat.com/archives/linux-lvm/2000-October/msg00052.html

Quote:
delete /etc/lvmtab and then run vgscan


After these two step, I was able to run vgcreate and continue on with your procedure with out issue.

Thanx

_________________
R5F1 - Dell P4 2.4Ghz 500MB - PVR250 x 2 - GeForce FX 5200 - Onboard sound/NIC 80GB ATA/250GB ATA/400GB SATA


Top
 Profile  
 
PostPosted: Thu Aug 05, 2004 2:05 am 
Offline
Joined: Fri May 21, 2004 11:55 pm
Posts: 1206
Location: Silicon Valley, CA
It would really make it easy to add volumes for additional storage. I don't see any reason why the base Knoppmyth installation shouldn't be LVM. Is there any drawback? It seems like it would be really, really good to have for the main storage.

I have a 200G main disk plus two 250G aux disks in my pool. I want to rip all my DVDs to my Knoppmyth box and use it for a DVD changer as well as an HDTV recorder. It takes disk, man!

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


Top
 Profile  
 
 Post subject:
PostPosted: Thu Aug 05, 2004 2:24 am 
Offline
Site Admin
Joined: Fri Sep 19, 2003 6:37 pm
Posts: 2659
Location: Whittier, Ca
Contribute.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Sep 06, 2005 1:13 pm 
Offline
Joined: Thu Jun 16, 2005 2:17 pm
Posts: 38
Would this be the same for R5A16?


Top
 Profile  
 
 Post subject:
PostPosted: Tue Sep 06, 2005 3:44 pm 
Offline
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location: Arlington, MA
The directions on the Wiki are what I used under R5A16. There is one minor thing you have to skip (maybe the modprobe?) and if your total volume size is going to be over 500Gb you need to double the PE size setting mentioned there. I've posted about this before so a search for postings by me which include the word "lvm" should provide more detail.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Sep 06, 2005 4:33 pm 
Offline
Joined: Fri May 21, 2004 11:55 pm
Posts: 1206
Location: Silicon Valley, CA
Hey tjc -- I hear these dang "wiki" things are actually EDITABLE! You might wander over and see if you can improve the state of the LVM HowTo page! Sounds like you've got some very current info on getting it working...

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


Top
 Profile  
 
 Post subject:
PostPosted: Tue Sep 06, 2005 6:15 pm 
Offline
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location: Arlington, MA
Who me? Edit something on the wiki? Oh, I couldn't possibly do that! I'm far too timid! ;-)

Sigh... Yeah, I should probably do that, but the last time I looked at it it needed more time than I could give it right then... I don't recall exactly why...

OK, there. I've made a quick update to the LVM howto.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Sep 10, 2005 2:45 pm 
Offline
Joined: Thu Jun 16, 2005 2:17 pm
Posts: 38
right now i have a 400GB hard drive in my mythtbox and i ordered a 250 to add to it. i dont know if ill ever go over a terabyte but if i do can i change the PE size or do i have to reformat the whole thing?


Top
 Profile  
 

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 18 posts ] 
Go to page 1, 2  Next



All times are UTC - 6 hours




Who is online

Users browsing this forum: No registered users and 10 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