Re: Adding chunks (Informix 5, under AIX 4)
Posted in 1997
>From: Don Miller <dmiller@jfku.edu> >Date: Fri, 2 May 1997 21:41:36 -0700 >X-Informix-List-Id: <news.37484> > >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? It is not a good idea to use the block device; it'll work, but it imposes a greater load on the o/s than a character device does. >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 >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 Wow. It is good that you are using the /usr/informix/dev directory. It is unusual (read bad) that you have an actual device in here. If the corresponding entry in /dev is incorrectly protected, you can end up with major problems. What normally happens is that the entry in /usr/informix/dev is a symlink to the device under /dev. >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 )? Nominally (but please don't do it this way): mknod /usr/informix/dev/dbs0.2 c 26 1 However, I'd use: ln -s /dev/rhd10 /usr/informix/dev/dbs0.2 The raw disks (character mode disk devices) usually have the same name as the block mode device except for an r somewhere strategic. On SVR4, the difference is between /dev/dsk/c0t3d0s4 and /dev/rdsk/c0t3d0s4. On Xenix, it would have been between /dev/hd0 and /dev/rhd0. Given the names you are using, I would expect /dev/rhd10 to be correct. >Last, what offset is appropriate, or what factors should I consider in >deciding that? The questions are "does the device refer to the whole physical disk or only a sub-section of the disk", and "does the bad block mapping (or VTOC or anything else) use any of the disk visible through the device". If the answer to the first question is 'the whole disk', the answer to the second is likely to be 'yes', and you should then use a non-zero offset. If the answer to the first is 'part of the disk', then the chances are that the second answer is 'no' and you can use a zero offset, but if the second answer is yes, you need to use a non-zero offset. If you are using a logical volume manager, the chances are you can use a zero offset. How big a non-zero offset? It depends, but you need to avoid having OnLine write on disk blocks which the system can use for its own purposes. Using a 20 kB offset is normally enough, I think. Yours, Jonathan Leffler (johnl@informix.com) #include <disclaimer.h>