Help me understand my Linux filesystem and how it mounts my HDDs

Cerpin Taxt

Lifer
Feb 23, 2005
11,940
542
126
When I installed Ubuntu 7.04, I used the Alternate Install CD to build a 1TB RAID0 array from 2 500GB HDD. I configured the installation to mount the entire RAID array (md0) as 1 partition at /var.

Then, on the IDE HDD (200GB) I created a 10GB partition for / (i.e. root) and a 2nd partition for the remaining space which is mounted to /home.

I'm using this machine as an HTPC running MythTV.

The issue that is bugging me is that I think the ~190GB partition that I mounted to /home will go largely unused, but at setup I didn't know what would happen if I mounted that partition to /var along with the 1TB RAID array.

How would I reconfigure my system to better utilize the ~190GB partition on my IDE HDD?

I'm thinking I would like to partition off about ~120GB into a new partition and migrate my MP3 collection onto it. Then I could simply re-direct the paths in MythTV to find the collection there. But is there an ideal place to mount the new partition?

Right now my MP3s exist in /var/lib/mythtv/music on the RAID array. Is there a way I could mount the new IDE partition on this exact path and simultaneously remove it from the RAID array? What would be cleanest way to do something like this?
 

Brazen

Diamond Member
Jul 14, 2000
4,259
0
0
You could mount the partition in a temporary location and then copy everything from /var/lib/mythtv/music to it. Then delete everything in the /var/lib/mythtv/music directory. Umount the partition then mount it at /var/lib/mythtv/music. Be sure you edit the fstab entry for that partition so it is mounted in the new location on a reboot.

Another option would be just put a symlink from /var/lib/mythtv/music to a folder on the existing mount location of the partition.
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
You should've mounted the RAID array as /home and put all of your data in there.
 

Brazen

Diamond Member
Jul 14, 2000
4,259
0
0
Originally posted by: Nothinman
You should've mounted the RAID array as /home and put all of your data in there.

/home is for user's personal data. It sounds like he is serving up data through the MythTV daemon, which would go under /var. You wouldn't move your MySQL databases from /var/lib/mysql and put them under /home would you?
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
/home is for user's personal data. It sounds like he is serving up data through the MythTV daemon, which would go under /var. You wouldn't move your MySQL databases from /var/lib/mysql and put them under /home would you?

It's a grey area to me, I would consider my videos my personal data whether they're being served by MythTV or not. I tend to look at /var as a system hierarchy so I tend to put as little as necessary under there.
 

Cerpin Taxt

Lifer
Feb 23, 2005
11,940
542
126
I really have no opinion on which suggestion is better. The only reason I picked /var was that I knew already from a previous MythTV build that the multimedia content data was stored in /var/lib/mythtv/music (or ./videos, or ./pictures, etc...) by default. I guess there was really nothing stopping me from mounting the RAID array to /home and then directing all the paths in MythTV to that.

I've read suggestions from others on MythTV forums to create a base directory exclusively for the MythTV multimedia content (i.e. /data) so that it could be more easily backed up and also mounted via NFS to the same directory on the distributed front-end machines.

So far, I've managed to mount the directories under /var/lib/mythtv to the same directory on my Ubuntu laptop which I'm using as my front-end test machine, so I guess I don't immediately see the advantages of creating a standalone directory for the data.