Re: Online: Bizarre disk interactions
Posted in 1997
Hi again Cosmo,
I posted a reply to your earlier post but am mailing this as well
for expediency.
Cosmo Lee wrote:
>
> I'm troubleshooting for a client whose person that configured Online is
> long gone. I noticed that they configured their chunks to point to
> Block-"/dev/dsk/*" devices rather than Character-"/dev/rdsk/*" devices.
>
> An Informix tech suggessted that I *might* be able to simply redirect
> the symbolic links that the chunks use from the Block to the Character
> devices. I'm trying this out on a test system (Unixware 2.1.2, Online
> 7.10.UC2), so as not to look stupid blowing away a client's DB.
This will only work if when the chunks were added into online in the
first
place, the symbolic link was used as the pathname. You can see what
chunk pathname(s) OnLine is using by running 'onstat -d'.
> To test the effect of using Block devices, I took an existing Online
> system and redirected the pointer of the rootdbs symbolic link from its
> Character filename to the corresponding Block filename (/dev/rdsk -->
> /dev/dsk). I started the Online server, and it seems to run fine. I'm
> able to query & update the DB OK. (Though, I know I'm not guaranteed
> that this switching of devices will work the opposite way around at my
> client's.)
>
> But when I run `oncheck -pe`, the output still shows the rootdbs to be
> using the raw "/dev/rdsk/*" Character devices. To make sure that I was
> doing the right thing, I made updates to data in the database tables.
> Indeed, the filename for the Block device showed a updated timestamp
> reflecting access to the device (I brought Online down to make sure data
> got flushed from the buffers to disk).
oncheck -pe will display the chunk pathnames from the reserver pageswithin OnLine. These are the pathnames OnLine will use to access the
chunks. Are these pathnames sybolic links or real device files?
If using symolic links to define chunks (a good idea) it is best to
make links in some special directory (/chunks maybe) and give them
meaningful names. Don't create links in /dev as this can become
very confusing.
> Just to make sure, I changed the permissions on the previously
> pointed-to Character devices (ones that should not be used any longer)
> to have no read-write-execute permissions. I was still able to access
> database files. So I figured that this proved I had Online accessing
> the expected device files.
Yes, it would seem that way.
> To test my assertion, I also changed the permissions to remove
> read&write&execute from the Block devices (the ones now pointed to by
> the symbolic links). I should *not* now be able to access the
> database. But darn it if I could *Still* access the database! I even
> changed the owner and group on the devices to "root" with *NO* Read,
> Write or eXecute permissions. I was *Still* able to access the database
> files!
Did you shut down the OnLine server and restart it after changing the
permissions? OnLine only check chunk permissions when it first opens
them. Typically this is at startup.
> What the heck gives with that???
>
> 1 - What is the effect of using Block rather than Character devices?
All I/O to the device passes through the Unix filesystem cache. This
increases
the memory usage of the Unix cache and requires memory to memory copies
for
each transfer. Both are unnecessary overhead.
> 2 - Why does `oncheck -pe` still show that Online is using a character
> device, when it is actually using a block device?
I'd need more details to explain this but it is probably correct!
> 3 - How is it that Online can access data on devices user Informix does
> not own, and which have NO read, write or execute permissions?
It can't. Something is inconsistent here.
Send me an onstat -d output and an ls -l of *all* devices involved.
--
------------------------------------------------------------
Chris Jenkins, Advanced Technology Group, Informix Software
Standard disclaimers apply