as i've said, we've been using the LVs this way since RH6 times, i.e. for 10+ years (and maybe even longer; i joined the company 10 year ago). And we have few hundreds of instances ... i'm not saying there are no caveats or cons, but we didn't notice any so far.
Original Message:
Sent: Wed February 25, 2026 09:51 AM
From: mark collins
Subject: Changing from raw to cooked
Hello Tomas,
Thanks for confirming.
I'm working through in my mind the various pros and cons of such an approach. I would presume that you gain a bit of efficiency in that you have the entire LV available for Informix use. There would be no superblock and no inode table, and no space consumed by the actual directory file. And since it is not a file system, you do not have to mount it. And since it's not mounted, no one can see the files using 'ls'.
Basically, it's like using raw devices, but using the block device file rather than the character device.
I am trying to recall the reason that we were told way back when to use the character device rather than block device. Was it to avoid OS buffering duplicating the Informix buffere cache? If so, the DIRECT_IO (O_DIRECT) would eliminate that concern.
I'm trying to see if there are any negatives to this approach.
Thanks.
Mark
------------------------------
mark collins
Original Message:
Sent: Wed February 25, 2026 03:57 AM
From: Tomas Zahradnik
Subject: Changing from raw to cooked
Hi Mark,
your understanding is correct - while creating the dbspace and/or adding a chunk we use the block device directly (even though via several symlinks); we don't use extendable chunks, so yep, one LV per chunk; offset=0 and the size of the chunk equals to size of LV (but i believe using the offsets would work as well, from my experience the LV behaves exactly as a raw partition). And we add new LVs (as new chunks) if needed.
-tz-
------------------------------
-tz
Original Message:
Sent: Tue February 24, 2026 10:16 AM
From: mark collins
Subject: Changing from raw to cooked
Hello Tomas,
If I understand, you're simply creating logical volumes and then allocating a chunk directly to the block device file, rather than creating a file system and using cooked files within the file system. Is that correct?
And it looks like you create LVs of differing sizes to accommodate chunks that are different sizes as well. Do you place a single chunk on each LV? If so, do you make the chunk the same size as the LV? Or do you leave some space to allow the chunk to expand if it fills?
If your instance grows over time, rather than adding more LVs to the file system to increase size, you plan to simply create another LV and place a new chunk there?
Thanks.
Mark
------------------------------
mark collins
Original Message:
Sent: Tue February 24, 2026 04:39 AM
From: Tomas Zahradnik
Subject: Changing from raw to cooked
Hi Mark,
just my 2 cents ... you don't need to go for real cooked files in a filesystem. We're using the LVM logical volumes as Informix chunks (basically in the same way as raw devices) since RH6:
[informix@<hostname>:~] $ uname -a
Linux <hostname> 5.14.0-611.24.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Sat Jan 10 05:12:47 EST 2026 x86_64 x86_64 x86_64 GNU/Linux
[informix@<hostname>:~] $ cat /etc/redhat-release
Red Hat Enterprise Linux release 9.6 (Plow)
[informix@<hostname>:~] $ onstat -d | grep rootdbs
48da3028 1 0x1 1 1 2048 N B informix rootdbs_1
48da3280 1 1 0 1048576 1040021 PO-B-- /opt/informix/devlink/1/rootdbs_1_1
[informix@<hostname>:~] $ ll /opt/informix/devlink/1/rootdbs_1_1
lrwxrwxrwx 1 informix informix 28 Aug 8 2025 /opt/informix/devlink/1/rootdbs_1_1 -> /dev/dginfordb01/rootdbs_1_1
[informix@<hostname>:~] $ ll /dev/dginfordb01/rootdbs_1_1
lrwxrwxrwx 1 root root 7 Feb 4 18:19 /dev/dginfordb01/rootdbs_1_1 -> ../dm-7
[informix@<hostname>:~] $ ll /dev/dm-7
brw-rw---- 1 informix informix 253, 7 Feb 24 10:25 /dev/dm-7
From LVM perspective:
[root@<hostname> ~]# vgs dginfordb01
VG #PV #LV #SN Attr VSize VFree
dginfordb01 1 10 0 wz--n- <1000.00g <368.00g
[root@<hostname> ~]# lvs dginfordb01
LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert
...
llogdbs_1_1_1 dginfordb01 -wi-ao---- 6.00g
llogdbs_1_2_1 dginfordb01 -wi-ao---- 6.00g
plogdbs_1 dginfordb01 -wi-ao---- 4.00g
rootdbs_1_1 dginfordb01 -wi-ao---- 2.00g
sysdbs_1_1 dginfordb01 -wi-ao---- 2.00g
tempdbs_1_1_1 dginfordb01 -wi-ao---- 6.00g
tempdbs_1_2_1 dginfordb01 -wi-ao---- 6.00g
And the LVs/chunks are automatically opened using O_DIRECT flag:
[informix@<hostname>:~] $ onstat -g glo | grep "^ 1 .*cpu"
1 2213 cpu 1132.55 1825.31 2957.86 18450.26 16%
[root@<hostname> ~]# ll /proc/2213/fd | grep dm-7
lrwx------ 1 root root 64 Feb 4 18:20 257 -> /dev/dm-7
[root@<hostname> ~]# cat /proc/2213/fdinfo/257
pos: 0
flags: 0150002 (i.e. O_LARGEFILE | O_DIRECT | O_DSYNC | O_RDWR as per /usr/include/asm-generic/fcntl.h )
mnt_id: 22
ino: 640
HTH, -tz-
------------------------------
-tz
Original Message:
Sent: Mon February 23, 2026 03:26 PM
From: mark collins
Subject: Changing from raw to cooked
As many of you know, RH dropped support for raw devices starting in RH9. I know, I know - they've dropped support in the past and then added it back in. This time, so far as I know, they have not added it back. One source claimed that Linus finally got his way and support for raw was removed from the Linux kernel that is used in RH9 and later. That would imply that other Linux distributions also will lose support for raw devices as they migrate to that version (or later) of the kernel.
So we're going to have to migrate from raw to cooked. Some of our instances will be migrated by doing a level 0 archive of the raw environment, shutting down, creating cooked chunks, and restoring to those cooked chunks. Other instances will create mirror chunks on cooked files, then swap raw primary and cooked mirror chunks, then drop the raw chunks.
I've viewed Art Kagel's presentation on the various Linux file system types. Based on that, it looks like XFS is the best choice we have on RH9.
On raw devices, we frequently had multiple chunks on the same device, using the '-o' option in onspaces to specify an offset. We will not be doing that when we moved to cooked, as we'll be using a separate cooked file for each chunk.
My questions today are about the best practices for cooked chunks. First, how many file systems should we create? Does it matter if we use just one file system for all Informix cooked chunks, or should we create multiple? If multiple, how many? Does it vary based on the number of chunks, or the total size of the file system, or one file system per dbspace, or some other factor? Does Linux spread I/O across multiple file systems in some way?
Are there specific parameters that need to be used for mkfs.xfs when setting up the file systems? Does the block size need to match the dbspace page size? Does the sector size need to match page size? Is there any performance benefit to specifying fewer inodes (assuming we'll only have a few dozen chunks in the file system)? Do we need to specify any '-m' (global metadata option) -d (data section options), or '-l' (log section options)? I need to know what to tell our Linux sys admin if we need anything other than the defaults.
Next up - when it comes time to actually allocate a cooked file for a chunk, I know that if the instance is running and we run 'onspaces -c -d dbspace_name -p /path/to/cooked/file -o 0 -s 5000000', Informix will create the file and fill it up to the specified size. For the situation where we are going to restore an archive to the cooked files, is there any advantage to us manually filling the files to the correct size via 'dd' or some similar utility? I'm thinking back to the days of DOS computers where the files would start of small and then grow, leading to fragmentation on the disk, and I'm trying to prevent something like that from happening here. Thinking that if the file is already the correct size when the restore runs, it will just use the existing space.
Am I overthinking things here? Everything these days is virtualized, with VMs using space that SAN administrators carve up and distribute to the various hosts. With all of these layers of abstraction, it seems impossible to structure the layout for performance like we did in the old days. Given that, should I just create the zero-byte files and let the OS and the SAN just decide where to put things?
One last question - of the platforms that current versions of Informix run on, which ones are left that still support raw devices, now that Linux has eliminated them?
Thanks in advance.
------------------------------
mark collins
------------------------------