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

KnoppMyth with LVM
http://forums.linhes.org/viewtopic.php?f=1&t=941
Page 1 of 1

Author:  jeff [ Mon Mar 08, 2004 12:19 pm ]
Post subject:  KnoppMyth with LVM

I need to rebuild my Myth box and I was considering using KnoppMyth instead of building it by hand. I'm using KnoppMyth on a frontend system and it works like a charm.

My concern though is that I want to use an LVM for my video storage as I have 3 disks. I've read in the forum that this is doable but that you can't then upgrade using KnoppMyth. I'm not sure whether this means you can never upgrade (using the CD) or whether it means you need some manual intervention.

For instance if I let KnoppMyth create its partitions and then mount my LVM as /tv (or is it /myth/tv) would that work? During an upgrade I could unmount my LVM and create an empty /myth/tv (or /tv?) directory so KnoppMyth wouldn't get update?

Author:  cesman [ Mon Mar 08, 2004 3:11 pm ]
Post subject: 

Well if I had LVM, before upgrading, I'd copy the LVM config file(s) to /myth/backup. After the upgrade is complete, I wouldn't reboot right away. I'd mount hda1 and hda4. I'd copy the config files to /mnt/hda1/etc. I'd chroot /mnt/hda1 and run update-rc.d lvm[i[blah[/i] defaults... exit out of chroot then reboot. That is just what I'd do... Upgrading only wipes clean /dev/hda1.

Author:  jeff [ Wed Mar 10, 2004 5:10 pm ]
Post subject: 

Instead of copying the lvm configuration file is there some reason not to use vgscan to rebuild the LVM database and then vgchange -ay to bring the LVM online?

There are also the vgcfgbackup/vgcfgrestore commands that read/write files in /etc/lmfconf/ to preserve volume set information. I assume you mean that you would use vgcfgbackup to create the .conf file and then preserve this before the KnoppMyth upgrade. After the upgrade you would restore this file and run vgcvgrestore to make the LVM known to the upgraded system.

I'm not sure why there are two mechanisms, whether they're equivilent or whether one tends to be more reliable than the other.

Author:  cesman [ Wed Mar 10, 2004 5:49 pm ]
Post subject: 

As I don't use LVM, I don't know what vgvhange is...Whatever method works.

Author:  jeff [ Thu Mar 11, 2004 3:26 pm ]
Post subject: 

Thanks.

I'll give it a shot.

Author:  frustrated [ Sun May 09, 2004 6:49 am ]
Post subject: 

I recently had to reinstall knoppmyth, and setting it up to use the drives that were using lvm was a suprisingly simple. Here is what I did:
1. vgscan (doing this will automatically set up my volume groups (/dev/vg) and volumes (/dev/vg/myth))
2. change /etc/fstab to mount your drive (In my case, I commented out the /dev/hda4 mount and mounted /dev/vg/myth as /myth)
3. update-rc.d lvm start 26 S . stop 82 1 . (To have lvm start on bootup)

Author:  splashd [ Thu Oct 14, 2004 11:03 pm ]
Post subject: 

That was a great tip--worked for me, thanks

Author:  Liv2Cod [ Fri Oct 15, 2004 1:58 am ]
Post subject: 

I did exactly the same as "frustrated", but then I made the original hda4 a physical volume and added it to the logical volume comprising my other two disks. I now have about 700G file space. (But you'd be surprised how it gets eaten up.)

We really need to work on cesman to make hda4 an LVM volume out of the box. There are no downsides I can think of, and it really makes it painless to add storage later. How do we convince you cecil? Can I do something to help?

Joe

Author:  cesman [ Fri Oct 15, 2004 5:42 am ]
Post subject: 

Liv2Cod wrote:
How do we convince you cecil? Can I do something to help?
Joe
Contribute code.

Author:  Liv2Cod [ Fri Oct 15, 2004 10:35 am ]
Post subject: 

OK, I'll bite. What code do we need to make LVM the standard for hda4? LVM is written already, no code there. I guess there's some code in the installation scripts, where you use fdisk or whatever now. I would be happy to take a crack that those, but I have no idea how the installation of Knoppix is customized. Can we get a Wiki page going on the structure of installation files for KnoppMyth so newbie developers have a chance at finding and modding the right scripts?

Author:  cesman [ Fri Oct 15, 2004 8:13 pm ]
Post subject: 

Email be and we can dicuss things.

Author:  red321 [ Sun Oct 31, 2004 5:49 am ]
Post subject: 

I'm a bit nervous about virtual filesystems. What happens if one physical partition or Hardrive dies/is wiped by an idiot user/ is needed in another machine ?

I am not clear whether LVM is used as a striped or random array, where loss of one drive may lose a bit of every recorded show. :?:

Author:  Xsecrets [ Sun Oct 31, 2004 9:57 am ]
Post subject: 

think of LVM as JBOD (just a bunch of disks) no striping or reduncancy. However making it the default for that partition shouldn't hurt anything, as it will be one partition to begin with just like it currently is, it would just make it easier to add another disk for storage, and expand that partition on the fly.

Author:  Liv2Cod [ Sun Oct 31, 2004 11:32 am ]
Post subject: 

To augment Xsecrets response -- you can set up LVM to stripe across multiple disks, but I do not recommend it. I tried it but found that it didn't improve speed markedly, and it has the disadvantage mentioned -- your data is spread across multiple disks making all recordings vulnerable should one disk fail. It also has the disadvantage that you can't easily add volumes to a striped array, defeating the main purpose of using LVM with Myth.

For my HDTV Myth system I started with three 250G disks. I took 50G from one to install Linux and Mythtv. I then took two 250G drives and made them my /myth filesystem using LVM (see LvmHowTo). I still have 200G from my original disk to add to my LVM partition when space gets close. It's a nice feeling to know you have room to expand when you need it.

Author:  red321 [ Sun Oct 31, 2004 1:14 pm ]
Post subject: 

Thanks for the replys.

I have 2 160 Gb in my machine, and have a 140 and a 100 GB partition running under LVM now.

I guess I am being a little paranoid, but if you treat both HD as a single disk, and you use it for a while, with Gb size files, dont you soon end up with fragmentation leading to bits of files all over the place , even without stripeing ? I am not worried about losing 1 disk, lose 50% of your recordings, but lose 1 disk lose 90% would be sad.

It is nice to have 250GB of space to fill though :D

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