Using raw I/O in AIX
Posted in 2010
A user migrating Informix 11.50 from Tru64/Alpha to AIX 6.1 on Power 6 asked how to set up raw I/O, and in particular how to split a disk into several separately addressable raw devices. Answers: AIX puts devices directly in /dev with an 'r' prefix for the raw version (e.g. /dev/rhdisk2), and AIO is on by default in 6.1. For partitioning, use AIX's Logical Volume Manager (smit storage or mklv) to create logical volumes and symlink chunks to them. Keith Simmons warned that the AIX LVM reserves roughly 8K at the start of each logical volume, so the first chunk should be created with an offset to avoid trouble during OS/volume recovery. The poster confirmed success, and Art noted AIX is a relatively small part of the Informix user base.
Auto-generated by DrWatson from the posts below — may be imperfect; read the full thread.
Topics: Platform-Specific Issues
For years we have been running Informix on the Alpha Platform with Tru64 Unix. We have always used raw I/O using soft links to the physical device files (/dev/rdisk/dsk4g). I am in the process of testing Informix 11.50.FC6 on a Power 6 with AIX 6.1. I have been looking for information on using raw I/O on AIX but have been unable to find simple and direct instructions on how to do this. Does anyone have any information or a link on how to set this up in AIX? Thanks, Darryl Tverberg
It's been a while since I worked on an AIX system, but it is similar to the TRU64. Since AIX is based on BSD rather than on SystemV.4 the location of device drivers is just a bit different. Instead of /dev/dsk and /dev/rdsk subdirectories containing the cooked and raw devices, all of the devices are located directly in /dev. The RAW device corresponding to a particular COOKED device will just have an 'r' prepended to its name. So the RAW sibling of /dev/dsk23 is /dev/rdsk23. Art Art S. Kagel Advanced DataTools (www.advancedatatools.com) IIUG Board of Directors (art@iiug.org) Disclaimer: Please keep in mind that my own opinions are my own opinions and do not reflect on my employer, Advanced DataTools, the IIUG, nor any other organization with which I am associated either explicitly, implicitly, or by inference. Neither do those opinions reflect those of other individuals affiliated with any entity with which I am affiliated nor those of the entities themselves. On Wed, Sep 15, 2010 at 4:37 PM, DARRYL TVERBERG < darryl.tverberg@wisealloys.com> wrote: > For years we have been running Informix on the Alpha Platform with Tru64 > Unix. > We have always used raw I/O using soft links to the physical device files > (/dev/rdisk/dsk4g). > > I am in the process of testing Informix 11.50.FC6 on a Power 6 with AIX > 6.1. I > have been looking for information on using raw I/O on AIX but have been > unable > to find simple and direct instructions on how to do this. Does anyone have > any > information or a link on how to set this up in AIX? > > Thanks, > Darryl Tverberg > > > > ******************************************************************************* > Forum Note: Use "Reply" to post a response in the discussion forum. > > --0016362836e071a3ea049057c4ee
Thanks Art, I was able to use the device /dev/rhdisk2 and configure a new instance. In AIX 6.1, AIO is enabled by default, so not much to do there. What I was really looking for was a way to partition this drive and reference each partition with a different device file. What I was expecting was something like this: /dev/rhdisk2a -> partition A /dev/rhdisk2b -> partition B /dev/rhdisk2c -> partition C etc... Also, I don't see many discussions on Informix and AIX. I would have thought more people were using Informix on IBM's hardware and OS, but that doesn't appear to be the case. Would you agree that this is a small group in the Informix community and is there any migration to this HW and OS? Thanks again, Darryl
You can use the AIX partitioning software to partition the drive or buy a third party disk manager and that will create a device file for each partition which is what you want. Yes, relatively few use AIX. Even on IBM hardware there is a tendency now to use Linux since IBM makes it available and supports it on most of their systems. Art Art S. Kagel Advanced DataTools (www.advancedatatools.com) IIUG Board of Directors (art@iiug.org) Disclaimer: Please keep in mind that my own opinions are my own opinions and do not reflect on my employer, Advanced DataTools, the IIUG, nor any other organization with which I am associated either explicitly, implicitly, or by inference. Neither do those opinions reflect those of other individuals affiliated with any entity with which I am affiliated nor those of the entities themselves. On Fri, Sep 17, 2010 at 2:33 PM, DARRYL TVERBERG < darryl.tverberg@wisealloys.com> wrote: > Thanks Art, > I was able to use the device /dev/rhdisk2 and configure a new instance. In > AIX > 6.1, AIO is enabled by default, so not much to do there. What I was really > looking for was a way to partition this drive and reference each partition > with a different device file. What I was expecting was something like this: > /dev/rhdisk2a -> partition A > /dev/rhdisk2b -> partition B > /dev/rhdisk2c -> partition C > etc... > > Also, I don't see many discussions on Informix and AIX. I would have > thought > more people were using Informix on IBM's hardware and OS, but that doesn't > appear to be the case. Would you agree that this is a small group in the > Informix community and is there any migration to this HW and OS? > > Thanks again, > Darryl > > > > ******************************************************************************* > Forum Note: Use "Reply" to post a response in the discussion forum. > > --00163628375234d98004907939b8
Art is correct you can use the Logical Volume Manager in AIX (smit or smitty) to manage it. We use a lot of AIX boxes and have all the chunks as logical volumes with symbolic links to them If you go to aix you can type "smit storage" then select logical volumes Or the command line: /usr/sbin/mklv -y log_chnk1 myvg 16 [ mklv the lvname vgname #PP's ] John A. Chauvin > -----Original Message----- > From: ids-bounces@iiug.org [mailto:ids-bounces@iiug.org] On Behalf Of Art > Kagel > Sent: Friday, September 17, 2010 14:04 > To: ids@iiug.org > Subject: Re: Using raw I/O in AIX [21343] > > You can use the AIX partitioning software to partition the drive or buy a > third party disk manager and that will create a device file for each > partition which is what you want. > > Yes, relatively few use AIX. Even on IBM hardware there is a tendency now > to use Linux since IBM makes it available and supports it on most of their > systems. > > Art > > Art S. Kagel > Advanced DataTools (www.advancedatatools.com) > IIUG Board of Directors (art@iiug.org) > > Disclaimer: Please keep in mind that my own opinions are my own opinions and > do not reflect on my employer, Advanced DataTools, the IIUG, nor any other > organization with which I am associated either explicitly, implicitly, or by > inference. Neither do those opinions reflect those of other individuals > affiliated with any entity with which I am affiliated nor those of the > entities themselves. > > On Fri, Sep 17, 2010 at 2:33 PM, DARRYL TVERBERG < > darryl.tverberg@wisealloys.com> wrote: > > > Thanks Art, > > I was able to use the device /dev/rhdisk2 and configure a new instance. In > > AIX > > 6.1, AIO is enabled by default, so not much to do there. What I was really > > looking for was a way to partition this drive and reference each partition > > with a different device file. What I was expecting was something like this: > > /dev/rhdisk2a -> partition A > > /dev/rhdisk2b -> partition B > > /dev/rhdisk2c -> partition C > > etc... > > > > Also, I don't see many discussions on Informix and AIX. I would have > > thought > > more people were using Informix on IBM's hardware and OS, but that doesn't > > appear to be the case. Would you agree that this is a small group in the > > Informix community and is there any migration to this HW and OS? > > > > Thanks again, > > Darryl > > > > > > > > > ************************************************************************ ******* > > Forum Note: Use "Reply" to post a response in the discussion forum. > > > > > > --00163628375234d98004907939b8 > > > ************************************************************************ ******* > Forum Note: Use "Reply" to post a response in the discussion forum. >
One thing to be aware of, the AIX LVM does require space at the beginning of each logical volume for its own use, therefore the first chunk in each volume needs to be offset into the volume. 8k is the usual length of this 'header'. Not essential, but if you do have to recover the O/S from tape, or do some esoteric things with the volume manager, it will probably save you having to restore your database :-(( Keith On 17 September 2010 21:51, John Chauvin <John.Chauvin@mediware.com> wrote: > Art is correct you can use the Logical Volume Manager in AIX (smit or > smitty) to manage it. > > We use a lot of AIX boxes and have all the chunks as logical volumes > with symbolic links to them > > If you go to aix you can type "smit storage" then select logical volumes > > Or the command line: /usr/sbin/mklv -y log_chnk1 myvg 16 [ mklv the > lvname vgname #PP's ] > > John A. Chauvin >> -----Original Message----- >> From: ids-bounces@iiug.org [mailto:ids-bounces@iiug.org] On Behalf Of > Art >> Kagel >> Sent: Friday, September 17, 2010 14:04 >> To: ids@iiug.org >> Subject: Re: Using raw I/O in AIX [21343] >> >> You can use the AIX partitioning software to partition the drive or > buy a >> third party disk manager and that will create a device file for each >> partition which is what you want. >> >> Yes, relatively few use AIX. Even on IBM hardware there is a tendency > now >> to use Linux since IBM makes it available and supports it on most of > their >> systems. >> >> Art >> >> Art S. Kagel >> Advanced DataTools (www.advancedatatools.com) >> IIUG Board of Directors (art@iiug.org) >> >> Disclaimer: Please keep in mind that my own opinions are my own > opinions and >> do not reflect on my employer, Advanced DataTools, the IIUG, nor any > other >> organization with which I am associated either explicitly, implicitly, > or by >> inference. Neither do those opinions reflect those of other > individuals >> affiliated with any entity with which I am affiliated nor those of the >> entities themselves. >> >> On Fri, Sep 17, 2010 at 2:33 PM, DARRYL TVERBERG < >> darryl.tverberg@wisealloys.com> wrote: >> >> > Thanks Art, >> > I was able to use the device /dev/rhdisk2 and configure a new > instance. In >> > AIX >> > 6.1, AIO is enabled by default, so not much to do there. What I was > really >> > looking for was a way to partition this drive and reference each > partition >> > with a different device file. What I was expecting was something > like this: >> > /dev/rhdisk2a -> partition A >> > /dev/rhdisk2b -> partition B >> > /dev/rhdisk2c -> partition C >> > etc... >> > >> > Also, I don't see many discussions on Informix and AIX. I would have >> > thought >> > more people were using Informix on IBM's hardware and OS, but that > doesn't >> > appear to be the case. Would you agree that this is a small group in > the >> > Informix community and is there any migration to this HW and OS? >> > >> > Thanks again, >> > Darryl >> > >> > >> > >> > >> > ************************************************************************ > ******* >> > Forum Note: Use "Reply" to post a response in the discussion forum. >> > >> > >> >> --00163628375234d98004907939b8 >> >> >> > ************************************************************************ > ******* >> Forum Note: Use "Reply" to post a response in the discussion forum. >> > > > ******************************************************************************* > Forum Note: Use "Reply" to post a response in the discussion forum. > >