2010-12-05 07:48 AM
I have 6 paths as such
1. /vol/VolumeName -
2. /vol/VolumeName/qtree -
3. /vol/VolumeName/qtree/dir1 -
4. /vol/VolumeName/qtree/dir1/file.txt -
For each of these I need the containing volume or qtree unless the path is a lun , in which case I need the complete lun path.
So the question is is there an ONTAPI to find out file type and container type and container name given a path.I tried to run all these paths through
the file-get-info API but it returns the file-type as directory for all fo them.
I found another api called file-inode-info whcih is documented but is not supported by the filer.
I am running NetApp Release 8.0 7-Mode: Thu Mar 11 16:17:13 PST 2010
I need this information while creating a dataset in DFM. DFM allows only qtree, volumes or luns to be entered into datasets
Any help is highly appreciated.
2010-12-07 06:34 AM
One solution I can think of, assuming you do not have direct API's
is to parse the pattern of the path and the use the list APIs to check whether its a lun or qtree
/vol/x - this pattern can only be a volume
/vol/x/y - this pattern can be a qtree or lun. you could use lun-list-info qtree-list APIs to check if its a qtree or lun.
/vol/x/y/z - this can only be a lun. you could use lun-list-info api to check if its a lun.
2010-12-07 06:43 AM
Alternatively you could also use DFM APIs lun-list-iter-* and qtree-list-iter-* with object-name-or-id as the path
Using this you can check if the path is a valid qtree or lun before creating a dataset.
2010-12-29 03:08 PM
I was doing the lun list , qtree list already was just wondering if there was an easier way to do this.
Thanks for the replies.
2011-01-03 08:28 AM
There is a CLI "dfm details" not aware of a ZAPI.
dfm details <obj id> will give what kind of path is it.
# dfm details 23800 | grep objType
objType Lun Path