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

Add a 2nd Hard Drive for recordings
http://forum.linhes.org/viewtopic.php?f=11&t=8264
Page 1 of 1

Author:  dave1216 [ Fri Feb 03, 2006 1:42 pm ]
Post subject:  Add a 2nd Hard Drive for recordings

Hi,

I have added a second HDD for recordings and other media. How do i tell myth to store it there instead?

Tried searching but no joy. I'm running r5a22

Thanks.

Author:  ryanpatterson [ Fri Feb 03, 2006 2:09 pm ]
Post subject: 

You can simply create a symbolic link called /myth/tv pointing to the new harddrive. Some code like this should work (as root):
Code:
mkdir /mnt/hd2a/tv
mv /myth/tv/* /mnt/hd2a/tv
ln -s /mnt/hd2a/tv /myth/tv


"/mnt/hd2a" is wherever you have mounted your second harddrive.

Use the same procedure to move any other directories (music, etc.) to the second harddrive.

Author:  ke6oms [ Fri Feb 03, 2006 2:59 pm ]
Post subject: 

I would partition it however you want, shutdown the front & back ends, mount the new parition in some temporary location (a directory in the /mnt directory is ideal for this), copy everything over from /myth to this new location, then modify the file /etc/fstab to have /myth point to the new partition. Unmount both partitions, then re-mount /myth. If you've edited /etc/fstab correctly, the new partition will be mounted in its place. Then restart the front & back ends.

I then repurposed the original partition as a new /home partition (copying everything over in a similar fashion).

Author:  bigbro [ Fri Feb 03, 2006 7:35 pm ]
Post subject: 

Quote:

PostPosted: Fri Feb 03, 2006 11:42 am Post subject: Add a 2nd Hard Drive for recordings
Hi,

I have added a second HDD for recordings and other media. How do i tell myth to store it there instead?


I found a really great LVM How To over on KnoppMythWiki.org
It was really easy to follow and allows for expansion if you so desire.

I am currently running a 250gig in that method, I initially reclaimed the space from the initial HD but then decided I needed that elsewhere so Moved that back out of the LVM.

Author:  tjc [ Fri Feb 03, 2006 10:39 pm ]
Post subject:  Re: Add a 2nd Hard Drive for recordings

dave1216 wrote:
Tried searching but no joy. I'm running r5a22

You may need remedial searching lessons. This is an FAQ. There are several pages devoted to it on the wiki, which we point someone to every week or so. Just for starters:
http://www.knoppmythwiki.org/index.php? ... driveHowTo
http://www.knoppmythwiki.org/index.php?page=LvmHowTo

EDIT - corrected a truncated link.

Author:  Dr. Hood [ Sat Feb 04, 2006 7:52 am ]
Post subject: 

Yes, there are two ways to add a second hard drive...I used the LVM method, however, instructions for us the 'traditional' method are given below.

SPANNING A VIRTUAL PARTITION ACROSS MULTIPLE HARD DISKS (LVM)

This is the method I used and it works. Instructions can be found at....

LvmHowTo at KnoppMyth Wiki

LVM HowTo at KnoppMyth Forum

IMHO, LVM has these advantages...

    1. Makes most efficient use of disk space.

    2. All information can be stored in /myth the default directory.

TRADITIONAL WAY
    1a. Install hard drive as a slave or as a master on a second controller on the motherboard.

    1b. Create a new partition on the new hard drive using the ext3 format.

    Quote:
    [root@linux2 root]# 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 for default)
    Last cylinder or +size or +sizeM or +sizeK (1-19457, default 19457):
    (Press Enter for default)
    Command (m for help): t
    Hex code (type L to list codes): 83
    Command (m for help): w


    1c. Format the New Partition
    Quote:
    [root@linux2 root]# mkfs.ext3 -b 4096 /dev/hdb1
    mke2fs 1.27 (8-Mar-2002)
    Filesystem label=
    OS type: Linux
    Block size=4096 (log=2)
    Fragment size=4096 (log=2)
    4889248 inodes, 9769520 blocks
    488476 blocks (5.00%) reserved for the super user
    First data block=0
    299 block groups
    32768 blocks per group, 32768 fragments per group
    16352 inodes per group
    Superblock backups stored on blocks:
    32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
    4096000, 7962624

    Writing inode tables: done
    Creating journal (8192 blocks): done
    Writing superblocks and filesystem accounting information: done

    This filesystem will be automatically checked every 36 mounts or
    180 days, whichever comes first. Use tune2fs -c or -i to override.

    See Partitioning and Formatting Second Hard Drive - (ext3)

    1d. Tell the OS where to mount the new drive

    Note: The steps below will mount the new drive to a directory called 'mythtv' which is where TV recording will be stored
    Quote:
    [root@linux2 root]# mkdir /mnt/mythtv
    nano /etc/fstab

    Note: Edit fstab so that it looks like the following:

    # /etc/fstab: filesystem table.
    #
    # filesystem mountpoint type options dump pass
    /dev/hda1 / ext3 defaults,errors=remount-ro 0 1
    /dev/hda3 /cache auto defaults,auto 0 2
    #/dev/hda4 /myth ext3 defaults,auto 0 2
    /dev/hdb1 /mythtv ext3 defaults,auto 0 2

    Note: Save fstab by clicking on 'ctrl+x'


    1e. Remount the fstab file

    Quote:
    [root@linux2 root]# mount -a


    1f. Copy /myth/tv to /mnt/mythtv

    Quote:
    [root@linux2 root]# cp /myth/tv/* /mnt/mythtv


    1g. Tell KnoppMyth to store TV recording in /mnt/mythtv directory


Author:  ed3120 [ Sat Feb 25, 2006 11:10 am ]
Post subject: 

The LVM HowTo works great. Just used it last night to add a second 250GB hard drive in an LVM configuration. The only problem I ran into was my machine wouldn't let me unmount ("umount") my original drive. I had to comment out any nfs/samba shares I had listed in my /etc/fstab that were mounting to the /myth directory.

Overall, the HowTo works like a charm....just read it through completely first before going through it step by step, because there are certain points where you'll say "Oh, I would have done it this way instead if I just read the whole thing, but I already started doing it the other way."

MythWeb now reports that I have 446GB of space to use for recordings!

If you have any problems following the HowTo, just reply to this thread.

Author:  ihatetivo [ Mon Oct 09, 2006 1:36 pm ]
Post subject: 

Dr. Hood described the "Traditional Way" above:

"1a. Install hard drive as a slave or as a master on a second controller on the motherboard. "

Question: I'm not too computer savvy. Does this mean that the new hard drive can not be connected to the same IDE ribbon as the primary myth hard drive? If so, why?

Author:  ryanpatterson [ Mon Oct 09, 2006 1:37 pm ]
Post subject: 

You can symbolic link as many drives into /myth/video as you want. If you have two drives just link one to /myth/video/a-m and the second drive to /myth/video/n-z. Then sort your DVDs onto the drives for easy searches.

Author:  ihatetivo [ Mon Oct 09, 2006 3:21 pm ]
Post subject:  thanks

Ryan,

That is awesome. Thanks for the tip. I haven't seen that stated on here before. Perhaps, if I get it to work, I'll try to elaborate on the idea for other newbies like myself.

Author:  tjc [ Mon Oct 09, 2006 7:11 pm ]
Post subject: 

[quote="ihatetivo"]Dr. Hood described the "Traditional Way" above:

"1a. Install hard drive as a slave or as a master on a second controller on the motherboard. "

Question: I'm not too computer savvy. Does this mean that the new hard drive can not be connected to the same IDE ribbon as the primary myth hard drive? If so, why?[/quote]
No, you can use both channels on you primary IDE with no worries. Traditionally folks were often advised not to mix device types on the primary or secondary IDE channels (i.e. - not to put a hard drive on the same cable as an optical drive), but I don't think this is still an issue with modern motherboards and IDE drives.

Author:  ihatetivo [ Fri Oct 13, 2006 6:11 am ]
Post subject:  Clarification of symbolic link function

[quote="ryanpatterson"]You can symbolic link as many drives into /myth/video as you want. If you have two drives just link one to [i]/myth/video/a-m[/i] and the second drive to [i]/myth/video/n-z[/i]. Then sort your DVDs onto the drives for easy searches.[/quote]

I'd like to clarify the concept. Assume I add 2 new hard drives to my system and symbolically link both as you described. If my Myth was previously setup to put transcoded files into /myth/video of hda, will future transcoded files still be saved to my original hard drive in the same /myth/video directory?

In other words, do these symbolic links (like to myth/video/a-m) act as folders within the original myth/video directory? (Meaning the original myth/video on hda is still used and the new hdb and hdc drives are supplemental?) The Linux tutorials that I've read say a symbolic link is "A file that contains the path to another file or directory." So, I think I'm on the right track. Still, if someone could confirm this yes/no for me, I'd appreciate it.

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