[mythtv-users] [OT] directory structure for myth backend / storage
server
chris at cpr.homelinux.net
chris at cpr.homelinux.net
Tue Jul 26 16:22:02 EDT 2005
On Tue, Jul 26, 2005 at 01:38:49PM -0400, Micah.Wedemeyer at gtri.gatech.edu wrote:
> I'm putting together a storage server for my house. I'd like to
> integrate it with the mythbackend, since that seems logical. I would
> like some advice on how to logically set up the directory structures.
> I'm not too familiar with the Linux standard directories (like /usr and
> /etc) and so am a little confused where to put things.
It's mostly a matter of personal preference unless you are trying to
integrate more than one access method. My current arrangement is:
Two Maxtor drives (hda, hdc) and a WD drive (hde) partitioned as:
/dev/hda1 24Mb FAT16 (DOS rescue)
/dev/hda2 24Mb ext2 (/boot)
/dev/hda3 149Gb raid autodetect
/dev/hda5 512Mb swap
/dev/hdc1 149Gb raid autodetect
/dev/hdc5 512Mb swap
/dev/hde1 149Gb raid autodetect
/dev/md0 raid5 {hda3 hdc1 hde1} xfs (/)
Yes, you CAN put your root directory on RAID-5. You just have to build
a kernel with static RAID-5 support instead of using modules. You also
need to put the kernel somewhere that lilo or grub can find it, which
is why I have an ext2 boot partition. Since I still have lots of space
left on hda and hdc (the Maxtor 160's are about 4Gb larger than the WD
160) I may create a RAID-1 array for /boot as lilo and grub both know
how to boot from RAID-1.
The directory structure on the back-end looks a bit like:
/var/cache/mythtv = spool for live TV (installation default)
/var/lib/mythtv = storage for .nuv files (installation default)
/home/samba/multimedia/dvd = ripped DVDs
/home/samba/multimedia/music = mp3s
/home/samba/multimedia/thumbs = bitmaps used by mythvideo listing
/home/samba/multimedia/video = mpegs from internet or nuvexport
/nfs/music -> /home/samba/multimedia/music
/nfs/thumbs -> /home/samba/multimedia/thumbs
/nfs/video -> /home/samba/multimedia/video
I run nfs because I use two front-end machines and one stand-alone
back-end machine with no video-out capability. All three of them look
for content in /nfs (for the sake of consistency), with the only
difference being that the two front-end machines mount the directories
using nfs whereas the back-end machine just follows the symbolic links
to the storage area.
Running Samba allows me to view non-Myth content (including files that
have been run through the nuvexport process) using Windows Media Player
on one of the desktops when the XBOX and big-screen TV are otherwise
engaged and I don't want to start a fight or reboot my desktop into
Linux.
Yes, I could have used smbmount and just skipped nfs entirely, but
where's the geek-factor in *that*? :-P To be honest, I'd be
interested in hearing back from people about the relative safety of the
two mounting methods when a network failure occurs. Which filesystem
blocks versus failing, and does either impact the kernel? Older
versions of nfs used to panic the kernel....
Before I switched to RAID I used to mount the second or third hard
drives using an abbreviated device name in the root directory and then
sym-link whatever content they were supposed to hold. For example, I
would mount /dev/hdc1 as /hdc1 and then make sym-links from /home to
/hdc1/home, /var to /hdc1/var, etc. The reason I used this method was
so that all of the redirected directories would share the pool of free
space and I wouldn't have to think about wasted drive space when /home
was full and /var was still half empty.... I got all the benefits of a
single partition with the benefits of splitting some directories onto
other drives. Think of it as a poor man's LVM. :-)
More information about the mythtv-users
mailing list