Problem when removing a resource

283 views
Skip to first unread message

Shaofeng Liu

unread,
Apr 1, 2008, 7:39:00 PM4/1/08
to irod-chat
Hi,

I met a problem when I tried to remove a resource.

user@server:~/program/iRODS> ils
/tempZone/home/rods:
user@server:~/program/iRODS> iadmin
iadmin>lr
demoResc
Test
iadmin>rmresc Test
ERROR: Level 0: resource 'Test' contains one or more dataObjects
ERROR: rcGeneralAdmin failed with error -835000 CAT_RESOURCE_NOT_EMPTY
iadmin>


Thank you very much!

Best,
Leo

Wayne Schroeder

unread,
Apr 1, 2008, 7:50:29 PM4/1/08
to iROD...@googlegroups.com
Hi,


Thank you very much!

Best,
Leo

Leo,

The error CAT_RESOURCE_NOT_EMPTY means that the Resource has some data
objects stored in it. (The CAT_ means that this error was returned
from the catalog routines (ICAT).) This is even explained more, via
the level 0 message: resource 'Test' contains one or more dataObjects.

If you don't see any files on the resource, they are probably in the
trash. You may need to do an 'irmtrash'.

- Wayne -

Shaofeng Liu

unread,
Apr 1, 2008, 8:12:44 PM4/1/08
to iROD...@googlegroups.com
Dear Wayne,

I have done the irmtrash, but the problem remains.
Is there anyway to remove the resc by force?

Best,
Leo

Wayne Schroeder

unread,
Apr 2, 2008, 11:28:57 AM4/2/08
to iROD...@googlegroups.com
Leo,

There are ways to force the removal of a resource, but it would be
better to find out why the 'iadmin rmresc Test' does not work. As far
as I know, the command is working fine, but if not we need to fix it.
You may have files stored that you didn't know about or 'irmtrash'
might not have succeeded.

You might try running iquest with the following command to list files
stored on a particular resource:

iquest "SELECT DATA_NAME WHERE DATA_RESC_NAME = 'Test'"

- Wayne -


Date: Tue, 1 Apr 2008 17:12:44 -0700
From: "Shaofeng Liu" <liush...@gmail.com>

Shaofeng Liu

unread,
Apr 2, 2008, 5:41:08 PM4/2/08
to iROD...@googlegroups.com
Hi Wayne,

You are right, I got something in Test.

$ iquest "SELECT DATA_NAME WHERE DATA_RESC_NAME like 'Test%'"
DATA_NAME = README.txt
------------------------------------------------------------

Then, what should I do to remove this? And why is this happening?

Best,
Leo

Wayne Schroeder

unread,
Apr 2, 2008, 7:23:14 PM4/2/08
to iROD...@googlegroups.com
Leo,

If the file is just in your home collection (directory), you can see
it via 'ils' or 'ils -l'. If you don't know where it is (perhaps
stored under a different user account), you can find it's collection
by running: iquest "SELECT COLL_NAME WHERE DATA_RESC_NAME = 'Test'"

To remove it, the owner runs 'irm NAME' and then 'irmtrash'. Or you
can run 'irm -f NAME' which removes it in one step (without putting it
in the trash).

All the icommands have built in help, available by '-h'. For example,
'irm -h' describes irm and the various options, including -f. You can
see what icommands exist by listing the bin directory:
'ls clients/icommands/bin' .

Each of the i-command options means the same thing in each i-command.
For example, iput has a -R option to specify the resource, so for any
i-command, -R, if it is used, specifies a resource. These options are
listed at: https://www.irods.org/index.php/command_line_options

- Wayne -

Date: Wed, 2 Apr 2008 14:41:08 -0700
From: "Shaofeng Liu" <liush...@gmail.com>
Reply-To: iROD...@googlegroups.com
Sender: iROD...@googlegroups.com

Shaofeng Liu

unread,
Apr 2, 2008, 8:00:25 PM4/2/08
to iROD...@googlegroups.com
Wayne,

Thanks for the reply.
I am sure I have tried what you said before I asked.
Logically, this should work, but I think probably something is wrong.
And I am only using one user for these operation so far.

Here is attached output in our system.

~/program/iRODS> iquest "SELECT COLL_NAME"
COLL_NAME = /
------------------------------------------------------------
COLL_NAME = /tempZone
------------------------------------------------------------
COLL_NAME = /tempZone/home
------------------------------------------------------------
COLL_NAME = /tempZone/home/guest
------------------------------------------------------------
COLL_NAME = /tempZone/home/rods
------------------------------------------------------------
COLL_NAME = /tempZone/home/rods/7bridges
------------------------------------------------------------
COLL_NAME = /tempZone/home/rods/cruiseship
------------------------------------------------------------
COLL_NAME = /tempZone/trash
------------------------------------------------------------
COLL_NAME = /tempZone/trash/home
------------------------------------------------------------
COLL_NAME = /tempZone/trash/home/guest
------------------------------------------------------------
COLL_NAME = /tempZone/trash/home/rods
------------------------------------------------------------
COLL_NAME = /tempZone/trash/home/rods/trash
------------------------------------------------------------
COLL_NAME = /tempZone/trash/home/rods/trash/home
------------------------------------------------------------
COLL_NAME = /tempZone/trash/home/rods/trash/home/rods
------------------------------------------------------------
COLL_NAME = /tempZone/trash/home/rods/trash/home/rods/trash
------------------------------------------------------------
COLL_NAME = /tempZone/trash/home/rods/trash/home/rods/trash/home
------------------------------------------------------------
COLL_NAME = /tempZone/trash/home/rods/trash/home/rods/trash/home/rods
------------------------------------------------------------
COLL_NAME = /tempZone/trash/home/rods/trash/home/rods/trash/home/rods/trash
------------------------------------------------------------
COLL_NAME = /tempZone/trash/home/rods/trash/home/rods/trash/home/rods/trash/home------------------------------------------------------------
COLL_NAME = /tempZone/trash/home/rods/trash/home/rods/trash/home/rods/trash/home/rods.1314760819
------------------------------------------------------------
~/program/iRODS> ils
/tempZone/home/rods:
  Release4091s.exe
  C- /tempZone/home/rods/7bridges
  C- /tempZone/home/rods/cruiseship

~/program/iRODS> iquest "SELECT DATA_NAME, COLL_NAME WHERE DATA_RESC_NAME like 'Test%'"
DATA_NAME = README.txt
COLL_NAME = /tempZone/trash/home/rods/trash/home/rods/trash/home/rods/trash/home/rods.1314760819
------------------------------------------------------------
~/program/iRODS> irm README.txt
ERROR: rmUtil: srcPath /tempZone/home/rods/README.txt does not exist

~/program/iRODS> irmtrash

~/program/iRODS> iquest "SELECT DATA_NAME, COLL_NAME WHERE DATA_RESC_NAME like 'Test%'"
DATA_NAME = README.txt
COLL_NAME = /tempZone/trash/home/rods/trash/home/rods/trash/home/rods/trash/home/rods.1314760819

Shaofeng Liu

unread,
Apr 2, 2008, 8:37:19 PM4/2/08
to iROD...@googlegroups.com
Hi,

I have solved the problem! It's caused by firewall of the host where the resource is located.
IRODS doesn't give out warning message of this potential problem, though.
It will be nicer to give users some message when this happened, otherwise it could be very confusing.

Thank ..
 
Best,
LEo

Wayne Schroeder

unread,
Apr 3, 2008, 2:32:38 PM4/3/08
to iROD...@googlegroups.com
Leo,

Looks like there are some serious problems in your irods system. The
recursive collections, like /tempZone/trash/home/rods/trash/home/rods,
should not exist.

I'm not sure what happened to create these problems and I don't know
if you can count on it to work properly moving forward.

If you are just experimenting with iRODS, you might reinstall from
scratch (and drop the database) and start over. Then do the 'iquest
"SELECT COLL_NAME"' again, and if the collections are corrupted like
this again, we'll have a reproducible problem we can try to resolve.

We might be able to patch your ICAT database, but it would be fairly
involved.

If you just want to delete the one file from so you can remove the
resource, I can show you how to update the ICAT via sql to do so.

- Wayne -


Date: Wed, 2 Apr 2008 17:00:25 -0700

Shaofeng Liu

unread,
Apr 3, 2008, 2:53:16 PM4/3/08
to iROD...@googlegroups.com
Hi Wayne,

This recursion is caused by firewall.
The resource I tried to remove is in host with a firewall.
I tried to remove the collection, and then the recursion happened.

After I removed the firewall and redo the irmtrash, all the recursions were gone.

If you believe that this shouldnot happen, and it did happen. I suspect there might
be a bug. If you want, I would try to remember how this happened.

Best,
Leo

Wayne Schroeder

unread,
Apr 4, 2008, 11:32:36 AM4/4/08
to iROD...@googlegroups.com
Leo,

Yes, it sounds like a bug and like something we should fix. It should
fail in a more straight-forward manner when communication fails. If
you could remember the steps, we might try to reproduce it here. Or
if you could reproduce it there, and stop when you notice the initial
problem, we might be able to gather enough information to resolve it.

You can email me directly instead of the list for this. I'll probably
need help from others in the group as it may involve iRODS components
written by others.

Thanks,

- Wayne -


Date: Thu, 3 Apr 2008 11:53:16 -0700


From: "Shaofeng Liu" <liush...@gmail.com>
Reply-To: iROD...@googlegroups.com
Sender: iROD...@googlegroups.com

X-Google-Loop: groups
Mailing-List: list iROD...@googlegroups.com;
contact iROD-Ch...@googlegroups.com

Reply all
Reply to author
Forward
0 new messages