Re: Adding chunks (Informix 5, under AIX 4)
Posted in 1997
In article <Pine.SOL.3.94.1.970502212904.3627A-100000@jfku.edu>, Don Miller <dmiller@jfku.edu> writes > >Hi: > >I'm relatively new to Informix, and I'm hoping somebody out there can >answer a few basic questions I've come across in adding a new chunk to an >existing database. > >First, I gather from the discussions on this news group in the past that >it's possible to add the chunk either as the block device or as the >character device, but that it is preferable to add it as the character >device - is that correct? > Yes - raw (character) devices are more reliable and slightly faster). >If so, then assuming I already have the disk space I want to use >configured as the block device ( /dev/<whatever> ), how do I add the >definition for the character device in AIX? The spaces already in use for It should be automatically created by AIX. Check for either /dev/rdsk/... or /dev/rhd.. >this one have both sorts of entries; as an example, here is one already in >place: > >In /dev : > >brw-rw---- 1 root system 26, 7 Mar 8 11:26 /dev/hd15 > >and in /usr/informix/dev: > >crw-rw---- 1 informix informix 26, 7 May 2 18:20 dbs0.1 > Looks loke someone has been silly and used mknod to create a device in /usr/informix. The correct produce is to do ln -s /dev/rhd.. /usr/informix/dev/chunk<number> i.e. use a soft link to the device. If the device name changes merely delete the link and recreate the link to point to the new device. (As recommended in teh Online Admin Guide). >I have made the partition changes to create the block device entry for the >new one: > >In /dev : > >brw-rw---- 1 root system 26, 1 May 1 11:25 /dev/hd10 > >but how do I create the comparable character special entry in >/usr/informix/dev (in this case, for a new dbs0.2 )? > Check for /dev/rhd10 and use ln -s /dev/rhd10 /usr/informix/dev/dbs<whatever> >Last, what offset is appropriate, or what factors should I consider in >deciding that? > Depends on the Operating system and version. E.g. Solaris 2.4 4K, Solaris 2.5 9K. I normally use between 80-200K. i.e. work out the partition size in K, round down to the nearest 100K gives you at least 80K unused in the partition. Then use halt this for the offset and the computed value for the partition size. E.g. partition size = 100990K -80K = 100910K to nearest 100K rounding down = 100900K = ***SIZE*** this is 90K less then the original partition size 1/2 * 90 = 45K so use 45K ***OFFSET*** Final values offset = 40K size = 100900K E.g. partition size = 200920K - 80K and round down to nearest 100K = 200800K = ***SIZE*** this is 120K less then the original partition size 1/2 * 120 = 60K so use 60K ***OFFSET*** Final values offset = 60K size = 200800K This means that last few ten of K are unused on the start of the partition and the partition size is a nice round number to make space calculation easy. Ok you waste up to ?200K but most partitions are at least 1/2 Gb so you waste 200/(500*1024) = 0.003846153846154 of the partition i.e. 0.04%! >Sorry for such 'newbie' questions - TIA for any advice. > >Don Miller > > /--------------------------------------------------------------------------\\ > | Donald S. Miller | Windows NT: | > | Network Operations | Q: What do you want to be when you grow up? | > | JFK University | A: Uh... An Operating System? | > | e-mail: |----------------------------------------------------| > | dmiller@jfku.edu | Microsoft Monopoly: Just Say NO! | > \\--------------------------------------------------------------------------/ > > -- David Williams