Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Trouble adding chunk to linked location

Status
Not open for further replies.

GripS321

Technical User
Sep 24, 2008
5
US
I am trying to add a chunk to a location that is symlinked. The phyiscal location of the chunk is in /var/opt/informix/mounts/c0d1p1/inst0/data. The link resides in /var/opt/informix/inst0/data. When attempting to add the chunk using onspaces i am getting the following:

The file /var/opt/informix/inst0/data/chunk06 does not exist.

Here's the link in said directory:

lrwxrwxrwx 1 root root 50 Mar 25 10:20 chunk06 -> /var/opt/informix/mounts/c0d1p1/inst0/data/chunk06

There already is a chunk05 in existence that is symlinked the same. Here's the syntax for adding the chunk:

onspaces -a datadbs01 -o 0 -s 2000000 -p /var/opt/informix/inst0/data/chunk06

Can someone tell me what i'm doing wrong?
 
I forgot to mention the OS is Red Hat 6.2 and the informix version is IDS 9.20.UC1
 
Not familiar with RedHat but I use a similar symbolic link setup on AIX and I have the raw file owned by informix, group is informix and the symbolic link is owned by informix, group is informix.

I'm logged in as informix to run the ln command that creates the symbolic link.

 
I don't think you can create the target of a symlink.
Why didn't you symlinked /var/opt/informix/inst0/data -> /var/opt/informix/mounts/c0d1p1/inst0/data ?

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Hello my friend

First: you have to sure the file exists.

please, verify to this is file exist.

use:
ls -l /var/opt/informix/inst0/data/chunk06

Second:
if you file exist. You have to create symbolic link.
Example:
phyiscal location of file: /var/opt/informix/inst0/data/chunk06

Directory of links:
Example: /ifmxdata
I am going to create a symbolic link in /ifmxdata the name chunk06 to link the physical location /var/opt/informix/inst0/data/chunk06

cd /ifmxdata
ln -s /var/opt/informix/inst0/data/chunk06 chunk06




 
PHV: I did not initially setup this DB. Had I been the one to set it up to begin with I would not have installed on a disk that is so small. It does look like a chunk was added successfully in the manner that I am trying to add one.

Here's the existing chunk04 and 05 that are residing in /var/opt/informix/mounts/c0d1p1/inst0/data:


-rw-rw---- 1 informix informix 2048000000 Mar 26 12:59 chunk04
-rw-rw---- 1 informix informix 2048000000 Mar 26 02:50 chunk05

and the links in /var/opt/informix/inst0/data:

lrwxrwxrwx 1 root root 50 Jun 14 2005 chunk04 -> /var/opt/informix/mounts/c0d1p1/inst0/data/chunk04
lrwxrwxrwx 1 root root 50 Mar 12 16:28 chunk05 -> /var/opt/informix/mounts/c0d1p1/inst0/data/chunk05

svelasco:

ls -l /var/opt/informix/inst0/data/chunk06
lrwxrwxrwx 1 root root 50 Mar 25 10:20 /var/opt/informix/inst0/data/chunk06 -> /var/opt/informix/mounts/c0d1p1/inst0/data/chunk06


which appears to be linked the same as existing chunk04 and 05:

ls -l /var/opt/informix/inst0/data/chunk04
lrwxrwxrwx 1 root root 50 Jun 14 2005 /var/opt/informix/inst0/data/chunk04 -> /var/opt/informix/mounts/c0d1p1/inst0/data/chunk04


Thanks for the replies. Still not able to add a chunk. Would it be ok for me to just add the chunk to the mounted directory using this syntax? Or does the chunk need to be symlinked from the /var/opt/informix/inst0/data directory?

onspaces -a datadbs01 -o 0 -s 2000000 -p /var/opt/informix/mounts/c0d1p1/inst0/data/chunk06




 
onspaces -a datadbs01 -o 0 -s 2000000 -p /var/opt/informix/mounts/c0d1p1/inst0/data/chunk06
The above should be OK.

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Does chunk6 already exist in /var/opt/informix/mounts/c0d1p1/inst0/data? It must exist before you can symbolically link to it from /var/opt/informix/inst0/data.
 
I just wanted to follow up on this one. A couple of issues I discovered. The new chunks in the directory were not accessible by the informix user. It's almost as if someone changed perms on the directories after they added the chunks. This is what ultimately allowed me to add the chunks the way i was trying to do it from the start:

1. /var/opt/informix/mounts/c0d1p1/inst0/data was not accessible to the informix user. So it's not that the chunk didn't exist. Informix just couldn't get to it. A "permission denied" error would have been helpful. Anyway, I set perms to 755 and created the chunk06 file.

2. After creating the file I created the symlink in the /var/opt/informix/inst0/data directory

After doing the above steps I was able to add the chunk using the onspaces command without issue.

I appreciate the responses here and it appears I didn't look at things at the most basic level before asking for help here. Lesson learned.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top