Re: cooked files ...
Posted in 1992
>Message-Id: <9204081229.8029@bay.bnr.co.uk> >From: uunet!bnr.co.uk!A.Heskett >Subject: Re: Cooked dbspace... >Date: Wed, 8 Apr 92 13:29:07 BST >X-Informix-List-Id: <list.1040> > >Will Hartung - Master Rallyeist writes: > >> A client of of ours was playing with OnLine, and created a chunk on the >> cooked file system. When he was done, he decided "Okay, I'm through." >> and did an "rm mychunk" from. Note that he didn't bother to drop the dbspace >> inside of OnLine. So now he has a dbspace that OnLine thinks it knows about, >> but which doesn't exist. > >> Any ideas on how to drop it from OnLine? We've tried the quickie >> cat /dev/null > mychunk >> and tried to drop it, but OnLine complains that it's not empty. > >Isn't the problem that, once you've added a chunk, you can't drop it ? > >I added a cooked chunk to one of our test db's a while back, to >verify that one of the guys in the field could add more db space >easily. > >Only problem was that I couldn't find any simple way of getting >rid of the cooked chunk on my test db afterwards. Very >embarrassing, took about 3 hours to unload, reinitialize >(without the cooked chunk :-) and reload. > >If there is a much better way, I'd be delighted to hear about it ... > >Cheers - Tony. > >PS. Sorry that this doesn't help ! >__________________________________________________________________________ >Tony Heskett th@bnr.co.uk Voice: (+44) 279 429531 x 2637 >BNR, London Road, Harlow, Essex, CM17 9NA Fax: (+44) 279 454187 This sort of thing is done because the OnLine training courses, in a fit of over-enthusiasm, encourage you to add a cooked chunk to a dbspace when you run out of space. The implication is that it is a temporary measure. As you now know, it is NOT a temporary measure. It is only for dire emergencies, and it has to fixed afterwards by unloading the dbspace, dropping the dbspace, rebuilding the dbspace without the cooked file and with the extra space you now need on a raw device, and then reload the tables into it. Why? Well, if you think about what a chunk represents to OnLine, you will see that a table is tied to a single dbspace, but that dbspace can consist of many chunks. If you could drop a chunk, you could be dropping random portions of all the tables located in the dbspace. This is generally regarded as bad for the referential integrity of the database :-) so OnLine only allows you drop a whole dbspace, and before you can do that, you must drop all the tables and databases created in that dbspace. And if it is your rootdbs, that means dropping everything, so you may as well re-initialize your system. So: (1) Don't add a cooked chunk to your rootdbs unless you want to use it permanently. (2) Don't add a cooked chunk to any other dbspace unless you intend to sort it out by rebuilding the dbspace later. Yours, Jonathan Leffler (johnl@obelix.informix.com)