I'm building a home server that will run a MythTV backend, zoneminder and a NAS that will stream audio content to various players and images to various viewers, including Digikam users, as well as for general data backup from laptops, etc.
Its based on a i5 K2500 processor in a MB with an H67 6 channel SATA interface. (4x SATA II + 2 x SATA 3) It has 8 GB of RAM which can easily be bumped to 16 GB. I've added a PCI 4 channel SATA I controller as well. Both the MB and the controller support their own flavor of software RAID.
I put all this in an Obsidian 650 case outfitted with a 4 bay trayless hot swap cage, in addition to the single hot swap slot built into the case itself.
I also equipped it with a dual layer BD burner.
People on the MythTV user group tell me that I need to keep the Myth recording/playback hard drive separate from other drives on the machine so that interruptions in disk IO from other applications don't stall the streaming of content to the myth Front Ends or writing data from the 2 HD PVR devices. (Max 17 Mb/sec each)
Similarly, the image files should probably also have their own drive so that when the Digikam user pulls down 200 20 MB images in a directory s/he doesn't stall the music streaming to other devices around the house.
I have a single 500 GB 7200 RPM drive for the OS which is F15.
In summary, i5, 8 GB RAM 2 SATA III channels 4 SATA II channels 4 SATA I channels 4 trayless hot swap bays in a cage 1 trayless hot swap bay in the case 8 non hot swap bays 1 OS hard drive At least 1 MythTV hard drive At least 1 images hard drive 1 audio files hard drive more hard drives as needed.
Questions
1) Where should I physically put each drive in the machine ? Which hard drives get hot swap and which don't.
2) Which drive should get which SATA channel ?
3) How does one mount the drives for the OS to access ? I know all about the mount command and auto mounting, etc, but how do I reference the drives ?
For example, lets say that for some reason I pull the drive that normally occupies /dev/sdc and reboot. The drive that was /dev/sdd will now be /dev/sdc and thus with a "static" mount reference will mount in the wrong mount point ????? Is LVM supposed to handle this ? It would be nice if I could "label" a drive MythBackup and plug it into any one of the hot swap bays and have it mount in the correct mountpoint to be used as anticipated by its name.
SATA hotswap seems to complicate this ? I've never had hot swapping devices before, save USB drives that I manually plugged in and mounted.
4) How should I approach data backup ? Right now I have about 250 GB of nearly irreplaceable digital images. RAID ? Periodic backup to a (rotated, stored off site) hard drive via the hot swap slot in the case ?
5) The drives, BIOS and controllers are all SMART capable. What use would you make of that ?
Any and all wisdom greatly appreciated.
Thanks !
On 09/29/2011 12:26 AM, linux guy wrote:
I'm building a home server that will run a MythTV backend, zoneminder
...
Questions
- How does one mount the drives for the OS to access ? I know all
about the mount command and auto mounting, etc, but how do I reference the drives ?
mount the drives by UUID or by Label - just like fedora installer does.
Use the 'e2label' command to label a disk and simply put something like this in your fstab (for example)
LABEL=MythBackup /mnt/mythback ...
If you prefer UUID the blkid command will help.
- How should I approach data backup ? Right now I have about 250 GB of
nearly irreplaceable digital images. RAID ? Periodic backup to a (rotated, stored off site) hard drive via the hot swap slot in the case ?
whether you RAID or not, I'd suggest backing up to 1 or more USB drives using rdiff-backup (or just rsync if you prefer).
I double backup to USB drives .. if using rdiff-backup you may want to trim the incrementals to the last few months or whatever.
gene
On Wed, Sep 28, 2011 at 11:26 PM, linux guy linuxguy123@gmail.com wrote:
- How should I approach data backup ? Right now I have about 250 GB of
nearly irreplaceable digital images. RAID ? Periodic backup to a (rotated, stored off site) hard drive via the hot swap slot in the case ?
My method is more complicated than most but probably less than some.
I run BackupPC on my desktop which backs up all the pictures and music on my MythTV box as well as my wife's entire home directory. I also backup my Documents directory (The backup data is stored on my system drive and I use a dedicated home drive). At least that helps in case of a single drive failure.
Then I have an external firewire drive I power on only for archiving all of my backups about every 1-2 months and then twice a year I burn all the critical stuff to DVD.
I also use SpiderOak as my "off site" backup of critical files since they have a pretty nice linux client and 2GB free access.
Richard
On Thu, Sep 29, 2011 at 5:45 AM, Genes MailLists lists@sapience.com wrote:
On 09/29/2011 12:26 AM, linux guy wrote:
I'm building a home server that will run a MythTV backend, zoneminder
...
Questions
- How does one mount the drives for the OS to access ? I know all
about the mount command and auto mounting, etc, but how do I reference the drives ?
mount the drives by UUID or by Label - just like fedora installer does.
I saw it did that. Pretty neat.
Use the 'e2label' command to label a disk and simply put something like this in your fstab (for example)
LABEL=MythBackup /mnt/mythback ...
Excellent. That is exactly what I am looking for. Thanks.
Mount point management.
Is there an easy was to know if a disk is mounted and act accordingly or prevent data from being written to a mountpoint ? Or to have the mount point disappear when its not mounted ?
Example
Lets say I create a mount point /home/me/myth and that /home/me resides on /dev/sda3.
Lets say that a disk labelled MYTH normally gets mounted there. But lets say that someone accidentally unplugs the MYTH disk and thus nothing is mounted. Lets say the myth backend starts recording and in the process writing data to /home/me/myth. If MYTH isn't mounted there, then that data is going to get written to the mount point dir, ie /dev/sda3.
Is there any way to prevent that ?
Or how about this ?
Lets say I create a disk labelled IMAGE_BACKUP. Lets say fstab mounts it to /home/me/image_backup. Lets say that I want cron to copy all the files from /home/me/images to IMAGE_BACKUP at midnight when its mounted. How does cron know that IMAGE_BACKUP is mounted to /home/me/image_backup so it doesn't write data to /dev/sda3 ? Ditto for rsync ?
Thanks
Am 29.09.2011 15:46, schrieb linux guy:
Mount point management.
Is there an easy was to know if a disk is mounted and act accordingly or prevent data from being written to a mountpoint ? Or to have the mount point disappear when its not mounted ?
Example
Lets say I create a mount point /home/me/myth and that /home/me resides on /dev/sda3.
Lets say that a disk labelled MYTH normally gets mounted there. But lets say that someone accidentally unplugs the MYTH disk and thus nothing is mounted. Lets say the myth backend starts recording and in the process writing data to /home/me/myth. If MYTH isn't mounted there, then that data is going to get written to the mount point dir, ie /dev/sda3.
Is there any way to prevent that ?
/bin/mount $MOUNTPOINT 2> /dev/null > /dev/null mount | grep $MOUNTPOINT > /dev/null if [ $? -ne 0 ] then echo "DISK NOT MOUNTED" exit fi
On 29 September 2011 23:46, linux guy linuxguy123@gmail.com wrote:
Is there an easy was to know if a disk is mounted and act accordingly or prevent data from being written to a mountpoint ?
Here is how I prevent data accidentally being written to a unmounted mountpoint. You must first ensure that "/example/mountpoint" is an empty directory. Then
chattr -V +i /example/mountpoint
so for your example: chattr -V +i /home/me/myth
I started doing this for all my mountpoints after I read about the immutable bit. See:
man chattr
Re detecting if a disk is mounted, in older versions of fedora, the package sysvinit-tools provided the '\bin\mountpoint' command which implements this. Try:
man mountpoint
to see if it is available on your system.