Re: Moving Chunks/ Patching Pseudo Tables ?
Posted in 1998
Sigrid Ehrenreich wrote: > > > I have an Informix Database on cooked disk space. Now I would like to > > change the path to the chunks (datafiles). Is there any way except > > unload/load the whole data? > Thanks a lot for your help so far. What I am looking for is a way to > change the pathnames of the chunks without having to move the data. I > found a pseudo table named syschktab, that contains the pathnames of the > chunks. Is there any way to manipulate the information in the pseudo > tables? I would like to do something like "update syschktab set > fname=<new path> where chknum=3". NO! Do not touch the sysmaster tables! You can change the information in the root chunk (with the engine offline) if you are very brave and know the disk structure of the reserved pages and how the chunk pages are layed out. This is not for the faint of heart! Having done it myself several times to shrink the size of filenames in 5.0x so I could add more chunks, and screwing it up once too, I can attest to the difficulties. And if you screw it up heaven help you because tech support certainly will not! Did you use symbolic links for the original chunks as the manual STRONGLY recommends? If so just shutdown the engine, relink the links, copy the data (unless you are relinking to the same device, ie major/minor device numbers, just the /dev/rdsk instead of the /dev/dsk in which case the data is already there), and restart the engine. Voila! If you used the real file/device names then the best strategy is to bring the engine offline, rename the original files, create links to the new devices, copy the data (again with the caviat about the same device ie major/minor number), and restart the engine. If you are using a Volume Manager you may have to have the rename/relink commands placed in the system startup (rc) files because Volume Managers typically create their devices from scratch at each boot up. You can use dd to copy data from one device/file to another. Art S. Kagel