We are working on using https://www.irods.org, as a way to increase storage for users of the HUB. Possible uses include simple staging of data for simulation, and housing searchable collections of documents.
We are using two servers to test iRods at CCR. The first is both a data and metadata server. The second is just a data server.
Common Problems
* Client cannot connect to server.
Server may go down unexpectedly. Admin should log onto irods1.ccr.buffalo.edu, change to the iRods directory and type
irodsctl istart
Check the server log to see whether the restart succeded. The log is in /data/iRODS/iRODS/server/log and it is named by the date, e.g. rodsLog.2010.7.11
* vhub cannot access the users file
The user must do the command
ichmod inherit username
ichmod -r own vhub /vhub/home/username
Idea for submitted apps to get irods files
Use file browser to get path to file.
* Parse path to get file name.
* when submit arrives, it makes a symbolic link to the file name and name the link with the file name.
* remove the symbolic link after the app runs.
ln -s irods/username/pathToFile/filename filename
submit execs app, file “resides” in cwd.
rm filename
To use a remote command-line client:
Get a copy of the file .irodsEnv from us (Note: the irodsHost needs to be an IP address rather than a domain name) and have us set up your login name and password on the iRods server.
From your home directory on the hub: mkdir ~/.irods move the .irodsEnv we gave you into ~/.irods
Download iRods from https://www.irods.org/index.php/Downloads
Follow the instructions at https://www.irods.org/index.php/Installation for installing additional clients.
At this point you will need to set the path:
PATH=home/vhub/username/iRODS/clients/icommands/bin:$PATH
It’s easiest if you put this command in your .bashrc or .profile file so the commands are available every time you open a terminal.
Some basic concepts
* collection: a directory
* resource: represents a physical data server location that can hold many collections
* zone: multiple resources can be members of the same zone
Some useful commands
* iinit : enter your password and it will get cahed so you don’t have to give your password for every command.
* ils: list files
* imkdir: create a directory (also called a collection)
* iput: put a file into iRods
* ireg: copy a directory revursively into iRods note that if you add files to the actual physical directory, this is not reflected in iRods.
ireg -C /data/iRODS/testIreg/ /tempZone/home/rods/newCol ils newCol /tempZone/home/rods/newCol: foo1 foo2
cd testIreg/ touch bar ils newCol /tempZone/home/rods/newCol: foo1 foo2
iRods FUSE notes
Install: Need to install libfuse-dev to get the header files in the same path as the library
edit iRODS/config/config.mk:
uncomment IRODS_FS = 1
set fuseHomeDir=path/to/fuse where the path is just above include/fuse.h and lib/libfuse.a
on your vhub account this is simply fuseHomeDir=/usr
in iRODS/client/fuse do make
Add another path so that you can mount with the command irodsFs
NOTE: You cannot unmount on your vhub account, once you’ve mounted irods. Only a vhub dministrator can run fusermount.
PATH=/home/alisanee/iRods/iRODS/clients/icommands/bin:/home/alisanee/iRods/iRODS/clients/fuse/bin:$PATH
Administrators’ To Do List For Installing on HUB
put the icommands in the path for every user
install .irods directory for every user and provide an irodsEnv file with their Hub ID as the user name
do iinit once with their user name and password. This will create a file, .irods/.irodsA which holds the user’s encrypted password, so that they won’t have to enter their password to do an icoomand.
in irods, create a home directory for the user and set the group to the user name.
irodsFs mount in an empty folder named irods
irodsFs irods
For New User
As the ‘rods’ administrator, for a new hub user:
iadmin mkuser username#vhub rodsuser create new user (use rodsadmin if they are an admin)
iadmin moduser username password somepassword set user’s password
imkdir username make home directory for new user
ichmod -V own username username let user rwx her home directory
ichmod read vhub /home/username let vhub rwx user’s home directory
ichmod write vhub /home/username
ichmod inherit username let vhub rwx the subdirectories and files the user creates
users can then do
iput
iput foo username
Note that the irods1.ccr.buffalo.edu name is not available to a DNS server, so until that changes, the irodsEnv has to be edited to have the IP address instead.
Edit .bashrc in iRods server(done): PATH=/data/iRODS/iRODS/clients/icommands/bin:$PATH
Install iRods on vhub@u2-grid (done)
edit .bashrc: PATH=/san/user/vhub/u2/iRODS/clients/icommands/bin:$PATH
iadmin mkuser username rodsuser
iadmin mkuser vhub rodsadmin
Uninstalling iRODS server
remove the collections (i.e. directories and files), e.g.
irm -r aneeman
turn irods off
irodsctl stop
remove directories for irods and its postgres installation.
Move a collection or file to a specific server
iphymv -r resource2Collection -R demoResc2
-r recursive -R resource name
The “mount” always looks the same, regardless of the physical location. You can move a file to any data server.