[mythtv-users] OT: best way to connect IDE harddrives and dvd
Alan Chandler
alan at chandlerfamily.org.uk
Sun Sep 17 10:14:27 UTC 2006
On Sunday 17 September 2006 10:11, Yann Lehmann wrote:
> Hi,
>
> I am ready to set up my first mythtv system, and I need an advice on how
> to connect the different ide drives.
>
> The system will have a 60GB hd (/boot, /, swap and /home), a 250GB hd
> for mythtv and a dvd, all drives are IDE (or PATA).
>
> Should I connect both hd to the first IDE controller (one as master, the
> other as slave) and the dvd as master on the second controller, or have
> one hd per controller, both as masters, with the dvd as slave (but on
> which controller) ?
>
My reasoning would go like this.
1) YOu say you want to mirror /home. I assume by that you mean use software
RAID 1 to achieve this. To get best protection, you want these two disks on
different IDE channels.
[At this point I would say why not go a bit further and use some more of the
space on your 250GB to make a more comprehensive raid. In rough terms, you
need 32MB for /boot, about 4GB for / (you need a getout for some extra
things, but see below) and whatever you need for /home. You need some swap
space (probably 1G is enough). I would then partition the disks as follows
60GB /dev/hda
hda1 32M boot partition - define as type raid
hda2 4G root partion - define as type raid
hda3 500M swap partion
because of logical partions you don't have hda4
hda5 big enough to hold /home and some spare - define as type raid.
(you might want to avoid logical partiions altogether by just tacking the size
of /home onto the root partition. The downside is that you cannot resize
home as circumstances change, whereas this way you can)
hda6 remainer of disk define as type lvm
250GB /dev/hdc (on another ide channel to hda)
hdc1 32M boot partition - define as type raid
hdc2 4G root partion - define as type raid
hdc3 500M swap
hdc5 same size as hda5
hdc6 remainder of disk as defined as type lvm
I would raid1 hda1 and hdc1 (I would also install grub on the boot sectors of
both to boot up from hda1 or hdc1 as appropriate - so you can boot either
disk in the event of failure of the other)
I would raid hda2 and hdc2 and make that the root (make use your initrd image
starts raid)
I would define two swap partions /dev/hda3 and /dev/hdc3. Linux will use them
for max performance.
I would raid /dev/hda5 and /dev/hdc5 (which if my maths is correct will be
called /dev/md3). I would then turn /dev/md3 into an lvm volume with
pvcreate /dev/md3
vgcreate mirror /dev/md3
you can now create a logical volume for home
lvcreate -L xG -n home mirror
which will give you /dev/mirror/home
similarly I would turn /dev/hda6 and /dev/hdc6 into another volume group
pvcreate /dev/hda6
pvcreate /dev/hdc6
vgcreate single /dev/hda6 /dev/hdc6
and create logical volumes for your mythtv recordings
lvcreate -L 200G -n video single
to give you /dev/single/video
(you might not want to cover two disks with the single volume group, but be
inclined to make two separate ones. This is particularly true of you want to
rip dvd files into some files. However, if that is the case, I would just
create a logical volume for it, and specify specifically which disk you want
the logical volume to be created)
then if you ever look like running out of space in root, you can also use
either volume group (dependent on whether you want to raid it or not to
create logical volumes for parts of /var (typically I use ./var/cache,
or /var/log )
]
2) I would put the DVD as /dev/hdb
My reasoning is that whilst actually playing a dvd, you should not expect much
activity on root or the other partitions, although you might want to save
data from the dvd into the larger space on the 200GB disk, so again it would
be better to put the dvd and this disk on separate channels
--
Alan Chandler
http://www.chandlerfamily.org.uk
More information about the mythtv-users
mailing list