Replacing block device to character device
Posted in 2020
SangGyu Jeong asked whether chunk symlinks pointing to block raw devices can be switched to character raw devices (AIX 7.1). Hrvoje Zokovic and Art Kagel said it works if it is the same device and the instance is down; Art advised having a backup first. Jacob Salomon related a block-device slowdown case, and Vladimir Kolobrodov advised checking owner and mode.
Auto-generated by Claude from the posts below — may be imperfect; read the full thread.
Topics: Storage & Space Management
Hello All, I found that a block raw device is being used in chunks on a customer's Informix server. Is it okay to use the device by replacing it with the character raw device path? The chunk is using symbolic links, so we plan to create a new symbolic link pointing to the character raw device path. Thanks, ------------------------------ SangGyu Jeong Software Engineer Infrasoft Seoul Korea, Republic of ------------------------------ #Informix
If you create exact copy it is OK - it is file as everyhing on UNIX is file :) Ofc you have to do it when instance is down or you can use Informix mirroring. So you should be OK with replacing device. HTH Hrvoje ------------------------------ Hrvoje Zokovic ------------------------------
Thanks Hrvoje, I'll try it. ------------------------------ SangGyu Jeong Software Engineer Infrasoft Seoul Korea, Republic of ------------------------------
I have done a direct replacement of the character device for block device with the same device numbers on a 'real' Unix system and it worked just fine. I've never tried it with a Linux block -> character, but it should just work. Just make sure that you have an archive and log files before you try. Art Art S. Kagel, President and Principal Consultant ASK Database Management www.askdbmgt.com Blog: http://informix-myview.blogspot.com/ Disclaimer: Please keep in mind that my own opinions are my own opinions and do not reflect on 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.
Thanks Art. Level 0 and logical log backups are being performed daily. I would like to avoid a full restore as much as possible. :) ------------------------------ SangGyu Jeong Software Engineer Infrasoft Seoul Korea, Republic of ------------------------------
SangGyu: I also prefer to avoid restores, but you know what I always say: "Good DBAs are paranoid DBAs!" B^) Art Art S. Kagel, President and Principal Consultant ASK Database Management www.askdbmgt.com Blog: http://informix-myview.blogspot.com/ Disclaimer: Please keep in mind that my own opinions are my own opinions and do not reflect on 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.
Oh, the memories! While I was still at Informix (a long, long time ago), I was sent to Kingston overnight to help a client. Their problem: periodically - several times each hour - there would be a dramatic slowdown on all processing. Some monitoring tool (AIX was pretty good with those) showed that the buses were being deluged with data and preventing memory access at the hardware level. It turned out that all their chunks' symlinks were referencing block raw devices instead of the character devices. What the difference? I/O to the block device would go through the Unix cache and, of course, character would not. The crazy use of the buses was a checkpoint flushing the buffer pool to the disk but that I/O going through the much smaller Unix cache and the OS frantically trying to flush the OS cache to the disk. It was probably leaving some buffers unflushed, which is, of course, quite bad. I think their solution was a bit more complicated than just swapping the symlink to the character device; I think there was an offset (in that release of AIX) at the start of each raw character device where the block access started. It's a pretty good bet AIX has outgrown that requirement by now. Also, even using flat files as the chunks, our engines now routinely skip the cache for access to the chunk data. But I don't think that option was available under release 7 or that release of AIX. -- A grizzled veteran reminiscing... Please humor. :-) -- Jacob S.
Hello Jacob, Thank you for sharing your case at Kingston. :) The customer plans to replace the machine on the Informix server from IBM E850 to E950. Disk storage does not change. In preparing for work, I discovered that some chunks of Informix were using block raw devices. My client is using Informix server on AIX 7.1 and each raw device chunk has an offset. If possible, I would like to migrate the data after removing the chunks using the block raw device, but due to the size of the data, it will be difficult to have that much downtime. Of course, changing the symbolic link will be done after the Informix process has stopped. If I am not lucky, I may have to do a full restore. ------------------------------ SangGyu Jeong Software Engineer Infrasoft Seoul Korea, Republic of ------------------------------
Just make sure that character devices pointed to by links after change have informix as owner and group and confirm that mode allows group to read and write - sometimes it's overlooked. Setting proper owner and mode to block special device does not affect character devices. To confirm - you can do "/bin/ls -lL /link/used/by/informix/for/chunks" And keep the fingers crossed, of course. :-) Good luck! ------------------------------ Vladimir Kolobrodov ------------------------------
Vladimir: Thanks for the advice. The -lL option of the ls command may also be useful. ------------------------------ SangGyu Jeong Software Engineer Infrasoft Seoul Korea, Republic of ------------------------------