On 04/08/2013 03:56 PM, Rob McLear wrote:
> Thanks, that's very helpful. I am not using any kind of HSM system; both file systems are just directly attached to the linux instance, and the nearline system is set up as a tar: system. So what would be the appropriate way to query a directly attached tar archive?
>
Have you solved your problem?
For testing purposes I have configured a dcm4chee to copy files on
another filesystem as tar files.
So I have defined a "tar:/longtermfs" as NEARLINE_STORAGE.
In FileCopy service, as DestinationFileSystem, I've difined
"tar:/longtermfs"
In SyncFileStatus service, as MonitoredFileSystem, I've defined such
file system.
At last, in FileCopyHSMModule.Command, as QueryCommand, I've defined
/usr/local/bin/mmls %i/%f
Such command is a simple bash script:
-----
#!/bin/bash
if [ "x$1" == "x" ]
then
echo Script Error
exit 2
fi
if [ -f $1 ]
then
echo Archived
exit 0
fi
echo Not Archived
exit 1
-----
So, if the file is present on the destination file system, I can assume
that the file has been copied, so I can consider them as archived.
Please note that I used (as it is by default) %i/%f and not %d/%f,
because the path that will be passed to the script will be
tar:/longtermfs/2013/3/2/172781
So %i must be the real path to the file system. Such option can be
configured before the creation of the new nearline storage filling
DefaultUserInformation (in FileSystemMgt.NEARLINE_STORAGE service), or
updating the database
UPDATE filesystem SET user_info='/longtermfs' WHERE
dirpath='tar:/dcm4nearlinefs';
Sorry if I'm a bit confusing. I hope, however, that this stuff may be
useful.
Ciao
A