[mythtv-users] How to add an additional disk drive to Myth

David Zanetti dave2 at wetstring.net
Sun Jan 11 19:11:53 EST 2004


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Sun, 11 Jan 2004, John F DeLuca wrote:

> I think separating the OS from the recordings is the best course of 
> action....am I right?

Generally a good idea, given they have different filesystem needs.

> So now my real question.  What do I need to do for Linux and Myth to 
> see/use the new drive for live buffer and recordings?
[clip, LVM]

Remember mythtv can't be running when this gets done, so you might want to
put the machine into singleuser mode (`telinit 1`).

Dist-agnostic way (ie, I know this will work on any dist, but there are
probably silyl GUI tools to help some of the steps, depending on your
dist) would be:

1. fdisk up the 120G, make it one big partition. If you're using LVM, you
   can skip this step if you like and just use the whole device, but 
   I personally like to partition it anyway. Just mark it as LVM in fdisk.

2. If you're using LVM, now is the time to set up your PEs on the 120G,
   and create the volume group and volume. Be aware that the size of the
   PEs determines the maximum size the volume group can contain, so
   you will want to read the LVM docs about what size to make your PEs.

3. Make a new filesystem on the partition/LVM volume. What filesystem to 
   use is a matter of personal preference. If you're using ext3, make sure
   you use "-T largefile" or "-T largefile4" to reduce the overheads from
   allocating by 4kb-blocks by default. We're writing big files only.
   You'll want to use a journalling filesystem, it'll make fsck on 
   reboot a lot quicker most of the time.

4. Mount the new filesystem somewhere handy, eg (replace /dev/hdc1 as 
   appropriate for hardware/LVM):
   	mount /dev/hdc1 /mnt/newstore 

5. Copy the data across. Many ways to do this, simplest and probably least
   efficient is just:
	cp -a /mnt/store/* /mnt/newstore/. 

6. If you're happy it copied all of it, delete the old store content, and
   make the directory again:
	rm -rf /mnt/store; mkdir /mnt/store

7. Unmount the new store:
	umount /mnt/newstore

8. Update /etc/fstab so the new store mount is available, add something
   like:
	/dev/hdc1 /mnt/store ext3 defaults 0 2
   Replace /dev/hdc1 as appropriate, replace ext3 as appropriate for the
   filesystem type you chose. See fstab(5) for more info on the options
   you can have here.

9. Mount it:
	mount /mnt/store

10. Configure mythtv to use something under /mnt/store for livetv buffer.
   You can do this from the setup tool (it's not configurable from the
   front-end..)

That should be it. Might want to give it a reboot just to check it comes
up okay without problems. 

- -- 
David Zanetti           |  (__)             
#include <geek/unix.h>  |  ( oo    Mooooooo 
http://hairy.geek.nz/   |  /(_O ./         
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: Made with pgp4pine 1.75-6

iD8DBQFAAeZLT21+qRy4P+QRArsyAJ45lw+GDeh3jqWbIXFN7xR770THvwCg6GXT
IxmeOL+qVZFqpClZL3WmlYs=
=AXfU
-----END PGP SIGNATURE-----




More information about the mythtv-users mailing list