Database rebuild question

Posted by: wfaulk

Database rebuild question - 08/08/2002 17:24

Okay, so now that I'm sure that it's not my force-single-drive thing that's causing problems, it seems that, despite my thoughts to the contrary, I don't understand how database rebuilds work.

Oliver sent me a drive temporarily to test RAID stuff. I thought that I'd go ahead and plug it up and make sure it worked and see what he had on it, just for kicks. Well, I hooked it up and telnetted into the empeg. The drive had mounted, but none of his music showed up in emplode. So I said, ``Oh, yeah. I have to force it to rebuild databases and whatnot.''

So I deleted the database, tags, and playlists files on both drives. Then, when it rebooted, it spent quite a while on the rebuilding databases part, so I assumed that it was working like I thought.

But the only differences emplode showed were that a couple of my original playlists had been duplicated and there were about 70 unreferenced tracks. So I tried rebuilding the databases multiple times, all to no avail.

What am I missing? (Not that it really makes that much difference. I'm going to wipe the drive anyway. I'm just curious now.)
Posted by: peter

Re: Database rebuild question - 09/08/2002 04:13

What am I missing?

It's not a case of what you're missing, but a case of what you've got two of. You'll have a fid 100 on each drive, a fid 110 on each drive, and so on. The only things you'll see from the second drive, are fids which don't exist on the first drive (those will be the unreferenced tracks).

No wonder the database is confused. It won't be sensible again until you've wiped one of the drives.

Peter
Posted by: pgrzelak

Re: Database rebuild question - 09/08/2002 05:31

...or renamed the files on one of the drives, from fid 100 to, say, a0100, etc. This could be done in a shell script, making it a quick fix. (The a0 prefix was chosen as a randomly high number, adjust accordingly.) By the way, did you get the other drive yet?
Posted by: peter

Re: Database rebuild question - 09/08/2002 06:00

or renamed the files on one of the drives, from fid 100 to, say, a0100, etc. This could be done in a shell script, making it a quick fix.

Good point, yes. That should work fine. All the second drive's fids will be orphaned, of course, but you could fix even that by adding fid a0100 to the root playlist (appending to the 100 file and changing the length tag in the 101 file).

Peter
Posted by: wfaulk

Re: Database rebuild question - 09/08/2002 07:04

Well, I guess what I was missing is that fids have to be unique across both drives. That explains it, though. Thanks.
Posted by: wfaulk

Re: Database rebuild question - 10/08/2002 07:44

Hmmm. Adding the a0 prefix didn't work. It now seems to crash the player during the ``Rebuilding Database'' portion of emplode's initial connection. It seems to do it right during the (I suppose) in-memory database on boot. I've even tried going in via telnet and adding a swapfile manually, but that doesn't seem to help.

Is a0 too big? Maybe I should have just added the topmost drive1 fid instead of a0000?
Posted by: pgrzelak

Re: Database rebuild question - 10/08/2002 09:14

Greetings!

Perhaps that is too big. Have you tried a lower starting point?
Posted by: wfaulk

Re: Database rebuild question - 10/08/2002 10:55

Yeah. I changed them all to 1???? instead of a???? and it worked better, but the databases got all munged together, and I simply didn't care enough to sort it all out, so I just deleted everything.

I guess that what this all comes down to is don't try to combine two empegs together in this manner.