Dbspace creation
Posted in 2008
A user on RHEL 5 with IDS 11 tried to add dbspaces on cooked ext3 partitions (/dbspace2, /dbspace3) after initialising rootdbs successfully, but onspaces -c -d ... failed with "The file /dbspace2/db1 does not exist", and a partition appeared to change type after reboot. Responders asked for version, permissions, ownership, raw-vs-cooked details, and advised using symlinks to devices rather than the device files, plus caution with journalled filesystems. The final post's ls output shows /dbspace2 as drw-rw---- — the directory lacks the execute bit, which would block access to the chunk file — but no confirmed fix or follow-up is recorded in the thread.
Auto-generated by DrWatson from the posts below — may be imperfect; read the full thread.
Topics: Storage & Space Management, Server Administration
Hi,
I have 3 hard disk partitions hda5, hda6, hda7.
I would like to create dbspace in each of this file system partitions.
hda5 - dbspace1
hda6 - dbspace2
hda7 - dbspace3
We wish the dbspaces to have the size equivalent to the partition size.
I have created the dbspace1 using onconfig file.
To create the dbspace2 and 3, i used the following commands, which gets failed.
onspaces -c -d dbspace2 -p /dev/hda6 -o 0 -s 2000000
onspaces -c -d dbspace3 -p /dev/hda7 -o 0 -s 2000000
Can you guide me, where i am going wrong?
The size maybe ?
J.
2008/11/19 LAKSHMI DEVI PALANISSAMY <lakshmidevip@hcl.in>
> Hi,
>
> I have 3 hard disk partitions hda5, hda6, hda7.
>
> I would like to create dbspace in each of this file system partitions.
>
> hda5 - dbspace1
> hda6 - dbspace2
> hda7 - dbspace3
>
> We wish the dbspaces to have the size equivalent to the partition size.
>
> I have created the dbspace1 using onconfig file.
>
> To create the dbspace2 and 3, i used the following commands, which gets
> failed.
> onspaces -c -d dbspace2 -p /dev/hda6 -o 0 -s 2000000
> onspaces -c -d dbspace3 -p /dev/hda7 -o 0 -s 2000000>
> Can you guide me, where i am going wrong?
>
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
Th onspaces commands look right. Questions:
Is the engine online (I assume with /dev/hda5 as the ROOTPATH chunk?
IDS Version?
Platform?
How big ARE the hda6 and hda7 partitions?
What are the own, group, and permissions on the files?
Are these RAW (character) or COOKED (block) device files?
Note: You should NOT be using the actual device file links as the chunk
paths. You should create a link to those links/devices in another location
and use those links instead. That way if there is a physical crash you
could easily restore the instance to another drive or even spread the chunks
over several drives by recreating the links. In IDS 10.00 and later, you
can redirect the chunks at restore time, but, it's still a good idea -
making such recovery easier, and you don't state your version so...
Art
On Wed, Nov 19, 2008 at 7:05 AM, LAKSHMI DEVI PALANISSAMY <
lakshmidevip@hcl.in> wrote:
> Hi,
>
> I have 3 hard disk partitions hda5, hda6, hda7.
>
> I would like to create dbspace in each of this file system partitions.
>
> hda5 - dbspace1
> hda6 - dbspace2
> hda7 - dbspace3
>
> We wish the dbspaces to have the size equivalent to the partition size.
>
> I have created the dbspace1 using onconfig file.
>
> To create the dbspace2 and 3, i used the following commands, which gets
> failed.
> onspaces -c -d dbspace2 -p /dev/hda6 -o 0 -s 2000000
> onspaces -c -d dbspace3 -p /dev/hda7 -o 0 -s 2000000>
> Can you guide me, where i am going wrong?
>
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
--
Art S. Kagel
Oninit (www.oninit.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, Oninit, the IIUG, nor any other organization
with which I am associated either explicitly or implicitly. Neither do
those opinions reflect those of other individuals affiliated with any entity
with which I am affiliated nor those of the entities themselves.
The IDS version is 11.0 and the OS is RHEL 5.0
Size of partition is hda5 - 2.5GB, hda6, hda7 - 10GB
Mount point /dev/hda5 dbspace1, /dev/hda6 dbspace2, /dev/hda7 dbspace3
The permission is 660 and it is owned by informix.
Also it belongs to the group informix
These are cooked file system partitions (ext3)
We need a single instance of database (online) able to connect to 3 databases
(db1, db2 and db3)
db1 should reside in dbspace2
db2 and db3 should reside in dbspace3
touch /dbspace1/rootdbs
chmod 660 /dbspace1/rootdbs
chown informix /dbspace1/rootdbs
chgrp informix /dbspace1/rootdbs
In the onconfig file, we had the ROOTTPATH as /dbspace1/rootdbs and the
ROOTNAME as rootdbs. Upon giving oninit iyv, the informix started.
Then we used the same procedure to create the db1.
touch /dbspace2/db1
chmod 660 /dbspace2/db1
chown informix /dbspace2/db1
chgrp informix /dbspace2/db1
Then we used the following command to initialize the database db2.
onspaces -c -d db1 -p /dbspace2/db1 -o 0 -s 2000000
Upon running this command, the system throws the following error
The file /dbspace2/db1 does not exists
If the system is rebooted after this failure, the partition type is changed
from ext3 to raw automatically
Any idea why the system changes the file system type?
Sorry!!!! A little big explanation :-)
I do not know anything about IDS 11.0
Can you post output of:
df
mount
fdisk -l /dev/hda
ls -laR /dbspace?
After oninit -ivy, please post
onstat -dAnd before onspaces please post
/dbspace2/db1
What do you mean by "the partition type is changed from ext3 to raw
automatically"?
Have you formatted your partitions? (after creating with fdisk)
HTH
Hrvoje
> -----Original Message-----
> From: ids-bounces@iiug.org [mailto:ids-bounces@iiug.org] On
> Behalf Of LAKSHMI DEVI PALANISSAMY
> Sent: Thursday, November 20, 2008 3:07 PM
> To: ids@iiug.org
> Subject: Re: Dbspace creation [14064]
>
> The IDS version is 11.0 and the OS is RHEL 5.0 Size of
> partition is hda5 - 2.5GB, hda6, hda7 - 10GB Mount point
> /dev/hda5 ? dbspace1, /dev/hda6 ? dbspace2, /dev/hda7 ?
> dbspace3 The permission is 660 and it is owned by informix.
> Also it belongs to the group informix
> These are cooked file system partitions (ext3)
>
> We need a single instance of database (online) able to
> connect to 3 databases (db1, db2 and db3)
> db1 should reside in dbspace2
> db2 and db3 should reside in dbspace3
>
> touch /dbspace1/rootdbs
> chmod 660 /dbspace1/rootdbs
> chown informix /dbspace1/rootdbs
> chgrp informix /dbspace1/rootdbs
>
> In the onconfig file, we had the ROOTTPATH as
> /dbspace1/rootdbs and the ROOTNAME as rootdbs. Upon giving
> ?oninit ?iyv?, the informix started.
>
> Then we used the same procedure to create the db1.
> touch /dbspace2/db1
> chmod 660 /dbspace2/db1
> chown informix /dbspace2/db1
> chgrp informix /dbspace2/db1
>
> Then we used the following command to initialize the database db2.
> onspaces -c -d db1 -p /dbspace2/db1 -o 0 -s 2000000>
> Upon running this command, the system throws the following
> error ?The file /dbspace2/db1 does not exists?
>
> If the system is rebooted after this failure, the partition
> type is changed from ext3 to raw automatically
>
> Any idea why the system changes the file system type?
>
> Sorry!!!! A little big explanation :-)
>
>
> **************************************************************
> *****************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
On Wed, Nov 19, 2008 at 4:05 AM, LAKSHMI DEVI PALANISSAMY
<lakshmidevip@hcl.in> wrote:
> I have 3 hard disk partitions hda5, hda6, hda7.
> I would like to create dbspace in each of this file system partitions.
>
> hda5 - dbspace1
> hda6 - dbspace2
> hda7 - dbspace3
>
> We wish the dbspaces to have the size equivalent to the partition size.
>
> I have created the dbspace1 using onconfig file.
>
> To create the dbspace2 and 3, i used the following commands, which gets
> failed.
> onspaces -c -d dbspace2 -p /dev/hda6 -o 0 -s 2000000
> onspaces -c -d dbspace3 -p /dev/hda7 -o 0 -s 2000000>
> Can you guide me, where i am going wrong?
It would be helpful if you included the error messages. It could be
permissions on the device files, it could be the size, it could be ...
well, there are a number of things it could be...
Don't omit the important information when asking for questions -
provide enough context for people to be able to answer them.
--
Jonathan Leffler #include <disclaimer.h>
Email: jleffler@earthlink.net, jleffler@us.ibm.com
Guardian of DBD::Informix v2008.0513 -- http://dbi.perl.org/
"Blessed are we who can laugh at ourselves, for we shall never cease
to be amused."
NB: Please do not use this email for correspondence.
I don't necessarily read it every week, even.
Complete information - thank you!
On Thu, Nov 20, 2008 at 6:07 AM, LAKSHMI DEVI PALANISSAMY
<lakshmidevip@hcl.in> wrote:
> The IDS version is 11.0 and the OS is RHEL 5.0
> Size of partition is hda5 - 2.5GB, hda6, hda7 - 10GB
> Mount point /dev/hda5 dbspace1, /dev/hda6 dbspace2, /dev/hda7 dbspace3
> The permission is 660 and it is owned by informix.
> Also it belongs to the group informix
> These are cooked file system partitions (ext3)
These partitions going to mounted and accessed as cooked files.
Your mount points are, presumably, /dbspace1, /dbspace2, /dbspace3
rather than the relative names quoted here.
> We need a single instance of database (online) able to connect to 3 databases
> (db1, db2 and db3)
> db1 should reside in dbspace2
> db2 and db3 should reside in dbspace3
> touch /dbspace1/rootdbs
> chmod 660 /dbspace1/rootdbs
> chown informix /dbspace1/rootdbs
> chgrp informix /dbspace1/rootdbs
You should be able to combine the last two into one:
chown informix:informix /dbspace1/rootdbs
Just shorter - no other difference.
> In the onconfig file, we had the ROOTTPATH as /dbspace1/rootdbs and the
> ROOTNAME as rootdbs. Upon giving "oninit iyv", the informix started.
OK - so far, so good.
> Then we used the same procedure to create the db1.
> touch /dbspace2/db1
> chmod 660 /dbspace2/db1
> chown informix /dbspace2/db1
> chgrp informix /dbspace2/db1
>
> Then we used the following command to initialize the database db2.
> onspaces -c -d db1 -p /dbspace2/db1 -o 0 -s 2000000
This is initializing (creating) a dbspace (not a database), and the
dbspace name is db1 (not db2).
> Upon running this command, the system throws the following error
> "The file /dbspace2/db1 does not exists"
That is odd. Assuming the touch/chmod/chown/chgrp commands reported
no error, then the error message makes no obvious sense. Have you
checked the permissions on /dbspace2 (the directory) itself? Who is
running the 'onspaces' command - root or informix?
We need to see the output from:
ls -ld / /dbspace2 /dbspace2/db1
> If the system is rebooted after this failure, the partition type is changed
> from ext3 to raw automatically
Is it?
> Any idea why the system changes the file system type?
Probably means that some trampling occurred on the control information
which would tell it that it is an ext3 file system.
> Sorry!!!! A little big explanation :-)
Isn't an ext3 file system journalled? (Answer: yes.)
Generally speaking, be very cautious about using journalled file
systems for IDS.
--
Jonathan Leffler #include <disclaimer.h>
Email: jleffler@earthlink.net, jleffler@us.ibm.com
Guardian of DBD::Informix v2008.0513 -- http://dbi.perl.org/
"Blessed are we who can laugh at ourselves, for we shall never cease
to be amused."
NB: Please do not use this email for correspondence.
I don't necessarily read it every week, even.
Output for /dbspace2 and /dbspace2/db1 drw-rw---- 3 informix informix 4096 Nov 7 07:31 /dbspace2 -rw-rw---- 1 informix informix 0 Nov 7 07:31 /dbspace2/db1
Related threads
- IDS 10 table-level restore
- Informix Development Webinar December 11, 2007
- ontape -p/r with changed ROOTPATH
- Migrate from HP PA-RISC to HP ITANIUM by ontape