View unanswered posts    View active topics

All times are UTC - 6 hours





Post new topic Reply to topic  [ 8 posts ] 
Print view Previous topic   Next topic  
Author Message
Search for:
PostPosted: Fri Aug 15, 2008 2:20 pm 
Offline
Joined: Tue Apr 11, 2006 7:44 am
Posts: 287
Location: Los Angeles, CA
Hello,

Now that I have a new 750GB drive to supplement my 500GB drive, is there a way to move existing recording to the new drive? I have configured each drive as different storage groups. Mainly I am looking to keep the 500 GB drive for videos and the new drive for TV recordings, so I want to move most of my existing files without having to go into the database to clean up after moving the files.

I'm guessing that it isn't just as simple as "mv /myth/tv/* /myth/tv2/".

Thanks,

_________________
Tim

LinHES 8.4
HDHR3
BioStar A770, AMD X2 4050e, 2GB RAM
GigaByte GeForce 8400, Chaintech AV710
USB-UIRT


Top
 Profile  
 
 Post subject:
PostPosted: Fri Aug 15, 2008 6:00 pm 
Offline
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location: Arlington, MA
The file name in the database (column basename in table recorded in database mythconverg) is relative, with no path prefix, the path come from the recording group specified by the storagegroup column. So if you have Default which points to /myth/tv and TV2 which points to /myth/tv2 all you should need to do is move the files and change the appropriate rows in the recorded table so that their storagegroup says "TV2" (or whatever you called the new storage group). If you move them all, use your favorite method of running SQL commands to tell it:
Code:
updated recorded set storagegroup = 'TV2';

If you only move part of the files you'll need an appropriate where clause to do a selective update.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Aug 16, 2008 1:21 pm 
Offline
Joined: Tue Apr 11, 2006 7:44 am
Posts: 287
Location: Los Angeles, CA
OK, so can I move everything and then change my "Default" storage group to use the /myth/tv2 path. And then I wouldn't need to do anything with the database. Right?

_________________
Tim

LinHES 8.4
HDHR3
BioStar A770, AMD X2 4050e, 2GB RAM
GigaByte GeForce 8400, Chaintech AV710
USB-UIRT


Top
 Profile  
 
 Post subject:
PostPosted: Sat Aug 16, 2008 4:27 pm 
Offline
Joined: Wed Jan 07, 2004 12:14 pm
Posts: 425
Location: Charlotte, NC
Tim, as tjc points out you have to change the database to contain the proper path. If you just change the storage group location then only files recoded from that point forward will show up properly. You still have to update the data base for your old files...


Top
 Profile  
 
 Post subject:
PostPosted: Sat Aug 16, 2008 7:46 pm 
Offline
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location: Arlington, MA
Actually what opel70 should work as well. The path information has been separated out into the recording groups settings in the current version of MythTV. There are at least 3-4 different ways to do this, I just went with changing the storage group name because he said he'd already created it.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Aug 17, 2008 8:54 am 
Offline
Joined: Wed Jan 07, 2004 12:14 pm
Posts: 425
Location: Charlotte, NC
Curious... I tried that (simply creating a new folder, a new storage group, moving the files, and rebooting...). Old files not seen until database updated. Is the assumption that the creation of the new storage group would then remap (or update) the database entries? If so, then the folder would need to be created, then files moved before the new storage group created (not what I did...). In other words, when (and where) is the path updated?


Top
 Profile  
 
 Post subject:
PostPosted: Sun Aug 17, 2008 10:32 am 
Offline
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location: Arlington, MA
nbdwt73 - Why don't you go look at the database yourself? You'd get the answer to your questions a lot faster that way.

The path is NOT stored in the "recorded" table. The only place the (sub)string "/myth/tv" shows up in the database is in the "storagegroup" table and one (probably obsolete) record in the "settings" table "RecordFilePrefix". This indicates to me that the path names are assembled dynamically at run time, possibly as needed, or maybe cached. Restarting the BE and FE should be enough to get it recognize the changes.

So:

- Shutdown the BE and FE
- Move the files
- Purge the symlinks in /myth/pretty while you're at it
- Change the storagegroup record to refer to the new location
- Restart the BE and FE

You could also:

- Move all the files then remount the new partition as /myth/tv (Classic)
- Move all or part of the files, replace them with symlinks to the new location, and turn on the DeletesFollowLinks option in settings. (Old school hack)
- Create an extra storage group for the new location, move all or part of the files, and update the appropriate records in recorded to refer to the new storage group. (New school)


Top
 Profile  
 
 Post subject:
PostPosted: Wed Aug 27, 2008 11:05 am 
Offline
Joined: Tue Apr 11, 2006 7:44 am
Posts: 287
Location: Los Angeles, CA
Finally getting back to posting my findings. After doing some shifting around to make sure I had enough space for Olympic recordings, it seems that I didn't need to do anything with the database. Here is what I did:

1) Edit the "Default" storage group to only have my new directory (/myth/tv2)
2) Create a new "Old Drive" storage group that point to the old directory (/myth/tv)
2) Edit the "Live TV Storage group to point to the old drive (/myth/tv)

Given that my "Default" storage group now only points to the new drive, theoretically none of my existing recording should have worked. However, they all do. And I can move a recording from one drive to the other without having to update that recording's "Storage Group" in the database.

I have done this with new recordings as well. Copied the mpg and related png files from the /myth/tv2 directory to the /myth/tv directory and everything still works.

So it seems, at least in my situation, that Myth checks all Storage Groups for the recording, not just the one listed in the database. And I have done transcodes and commflaggs on moved recordings without any problems.

_________________
Tim

LinHES 8.4
HDHR3
BioStar A770, AMD X2 4050e, 2GB RAM
GigaByte GeForce 8400, Chaintech AV710
USB-UIRT


Top
 Profile  
 

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 


All times are UTC - 6 hours




Who is online

Users browsing this forum: No registered users and 21 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group

Theme Created By ceyhansuyu