User:Posde
Contents
Partition The First Disk
Currently, the installer does not work with previously created software RAID devices. Therefor, one of the three disks is used to create the boot device. [[1]]
Create a RAID 1
As the boot partition we will create a raid 0 array. First create partitions on two of the disks using fdisk
fdisk /dev/sda n - new partition 1 - start of partition +80000M - we take about 80GB of space. Enough for the initial / of LinuxMCE and a couple of MDs t - change type of partition fd - to a raid array w - write changes to disk.
same for /dev/sdb.
Now we create the raid devices
mdadm --create /dev/md0 --level=1 --raid-devices=2 /dev/sda1 /dev/sdb1
If you receive an error, device /dev/md0 not found, make sure, the kernel module md is loaded, do
modprobe md
and try mdadm --create again.
Now, wait for the array creation to finish. Watch it with
cat /proc/mdstat
Now we have the initial device for LinuxMCE. Look at the wiki page [[2]] regarding custom partitioning, and create the three relevant partitions within the device /dev/md0 instead of /dev/sda and the relevant file and dir.
Now it is time to install LinuxMCE as outlined in the above wiki. When done, come back here.
Create a RAID-5 MD with LVM2 on top
LinuxMCE is installed and Sarah did his show and dance, and most of the stuff is configured. Now we will setup the array for the media. This array will be the foundation for an LVM2. Ontop of LVM2 will be an xfs file system. This will ensure ease in growing our media repository.
Install LVM2
aptitude install lvm2
takes of care of installing the needed programs
Create LVM2
A logical volume consists of physical volume groups and logical volume groups. First we mark our big RAID 5 array as a physical volume.
pvcreate /dev/md1
Next we need to create a volume group consisting of our array
vgcreate mediapv /dev/md1
The name 'mediagroup' is purely out of the blue. Name it pamela if you like. Next, after assigning the RAID array to the volume group, we add a logical volume group ontop of that volume group of physical volumes
lvcreate --name medialv --size 1700G mediapv
If you get an error during the above command, make sure the module dm_mod is loaded. Now we have an LVM2 partition, that we can format. As we will put mostly large files ontop the drive, and use lots of disk space, we choose xfs
mkfs.xfs /dev/mediapv/medialv
If you get an error during the above command, saying command not found, install the xfsprogs using aptitude install Compared to formatting an ext2 or ext3 file system, the creation of the filesystem with xfs is very fast, as only a little bit of information is written to the disk.