[mythtv-users] Need to manage my HDD usage, any way to tell where a recording resides?

Michael T. Dean mtdean at thirdcontact.com
Fri Nov 14 01:04:22 UTC 2008

On 11/13/2008 07:25 PM, stuart wrote:
> Michael T. Dean wrote:
>> On 11/13/2008 10:47 AM, stuart wrote:
>>> I need to manage my HDD usage.  I have a MBE and SBE and need to reduce 
>>> disk usage on the MBE by about 170GBytes in order to start removing a 
>>> Physical Volume out of my 1 Logical Volume (BTW, don't do like I did and 
>>> collapse all your mythtv files into 1 Logical Volume).
>>> Is there a way (i.e. while looking at recording in mythweb for instance) 
>>> to tell where (the MBE or the SBE) a recording resides?
>> IMHO, the best approach is to use mythrename.pl --link to create a 
>> directory full of links, then grep an ls.
>> ls -l /path/to/symlinks/dir | grep 
>> '/path/to/directory/on/hard/drive/to/empty'
> Thank you for your response to my posting.  But will this work for me? 
> I have everything on my MBE in 1 Logical Volume (my bad).

Re-read the above statement.

>   I'm thinking 
> that all links will be to the same directory no matter which hard drive 
> they actually are on.
> Regardless, what I really need is a way to tell if the recording is on 
> the SBE or the MBE machine.

Now re-read the statement you just re-read, above.  Isn't that saying, 
"[you] have everything on [your] MBE?"

>  As I only want to reduce disk usage on the 
> MBE machine. I'm thinking that the mythrename.pl script will not be able 
> to create links to a file on a different machine.

It only creates links to files available through the "local" 
filesystem--even if that filesystem is actually a remote filesystem 
available through a network file system, such as NFS or CIFS.

However, if you have multiple filesystems, they /must/ necessarily be 
mounted at different mount points, so you could tell by directory, even 
if you're using NFS/CIFS.  If you have all your recordings on a single 
filesystem, that filesystem exists on the machine with all the hard 
drives in it...

> In the end, I have yet to hear of a easy way to manage mythtv disk usage 
> (i.e. there is not an easy way to tell where a given recording resides).

The only other thing I can think of that you might be asking is, "I have 
a single filesystem with all my recordings and I need to shrink the LVM, 
but before doing so, I wish to move some of the recordings to an extra 
hard drive in my MBE that I will /not/ be sharing to other backends 
using NFS/CIFS, so how can I choose recordings whose hostname is the 
MBE's (i.e. that are supposed to exist on the MBE)?"

If that's the question you're asking, I'd again recommend mythrename.pl 
--link.  Use, specifically, something like:

mkdir ~/temporary_links
mythrename.pl --link ~/temporary_links --underscores --format '%T-%S-%hn'

To get a bunch of links that include the hostname, i.e.

lrwxrwxrwx  1 me me    59 2008-11-13 19:59 
Smallville-_Toxic-_hostname.mpg -> 

Then, you can grep an ls for the hostname to find files that are meant 
to be on the MBE (and that can be moved to any directory on the 
MBE--even if it's not accessible by other hosts--that's specified in the 
appropriate storage group without having to edit the DB).


More information about the mythtv-users mailing list