Subscribe

volume-get-iter with query junction-path "/" returns 0 results

When I invoke volume-get-iter with a query containing junction-path "/", I get 0 results:

 

Request:

<netapp xmlns="http://www.netapp.com/filer/admin" version="1.19">
  <volume-get-iter>
    <query>
      <volume-attributes>
        <volume-id-attributes>
          <junction-path>/</junction-path>
        </volume-id-attributes>
      </volume-attributes>
    </query>
    <desired-attributes>
      <volume-attributes>
        <volume-id-attributes>
          <name/>
          <junction-path/>
        </volume-id-attributes>
      </volume-attributes>
    </desired-attributes>
  </volume-get-iter>
</netapp>

 

Result:

<netapp xmlns="http://www.netapp.com/filer/admin" version="1.19">
  <results status="passed">
    <num-records>0</num-records>
  </results>
</netapp>

 

When I use the same API to get the root volume by name, the junction-path attribute is clearly "/".   Why the inconsistency?  Will this be fixed in the future?

 

My objective is to query an arbitrary NFS mount path and find the mounted volume, then use that as junction-parent-name in a subsequent query to find all volumes mounted under the NFS path.  However, when the customer mounts "/", this breaks.   I'd like to avoid hard coding "if path == / then deal-with-root" if possible, so any suggestions are most welcome.

 

Thanks!