Subscribe

7 mode create qtree command doesn't work when trying to set quotas on qtree in a vfiler

Hi all,

I'm using the 7 mode create qtree command with WFA 2.1RC1, and I'm trying to have a disk quota set on my qtree when it's created.  The qtree is in a volume that already belongs to a vfiler, and the vfiler has a volume for it's root.  When I try this in a workflow, there is no way to enter a value for the RootVolume parameter of the create qtree command, and the workflow fails because it can't construct a valid path to the vfiler's /etc/quotas file.  When I test the command on it's own, it allows me to enter a value for the RootVolume parameter, and everything works fine.

Can anyone explain why the RootVolume parameter doesn't show up the list of Attributes to fill in when using the create qtree command in a workflow?  Without the ability to set this parameter, the command won't properly set qtree quotas when working against a vfiler. 

Thanks!

Mike

Re: 7 mode create qtree command doesn't work when trying to set quotas on qtree in a vfiler

Hi Mike,

During workflow design, attributes are displayed based on parameter mapping of a command definition. If there are a number of command parameters that are mapped as attributes of certain references, then providing the value to the reference should automatically derive the parameter value.

 

So, as you can see, in this case, "Create Qtree" command has mapped RootVolume to vfiler.root_volume.name.

This would mean that when filling parameters to this command during Workflow design, the parameter RootVolume will automatically get filled if you specify the right vfiler in the reference and the vfiler object (through caching has everything discovered correctly)

Some additional explanation of command parameter mapping is also available at:

https://communities.netapp.com/message/112606#112606

Thanks,

Shailaja

Re: 7 mode create qtree command doesn't work when trying to set quotas on qtree in a vfiler

Thanks Shailaja.  I see that the vfiler dictionary has an entry named root_volume, but things don't seem to be properly mapping back to it.  In addition, if I do a "select * from vfiler" SQL query, I don't get back a root_volume field.  So something doesn't seem to be working right here, or I'm misunderstanding how it is supposed to work. I do have a vfiler reference in my Create Qtree command, and the qtree gets properly configured on the volume that is owned by the referenced vfiler when I run it without a quota setting....but when I try to set a quota, the command fails because it can't properly construct the path for the vfiler's /etc/quotas file.  I modified the Create qtree command so that the root_volume gets explicitly passed in to the command, and it works fine in my new command.  So, I do think that something is wrong with the shipping Create qtree command when trying to have quotas setup on qtrees going on volumes that belong to a vfiler.

Re: 7 mode create qtree command doesn't work when trying to set quotas on qtree in a vfiler

It's stored as a reference rather than the name itself, WFA looks up the other attributes. Are your root_volume_id's empty in your database?

Try a query like this in MySQL Workbench or similar to match root volumes and qtree ID's with either objects, and see if they populate or you get NULL's.

SELECT vfiler.name, vfiler.root_volume_id, (SELECT volume.name

FROM storage.vfiler as vfiler2,storage.volume

WHERE volume.id = vfiler2.root_volume_id and vfiler.id = vfiler2.id) as volume_name,

vfiler.root_qtree_id, (SELECT qtree.name

FROM storage.vfiler as vfiler2,storage.qtree

WHERE qtree.id = vfiler2.root_qtree_id and vfiler.id = vfiler2.id) as qtree_name

FROM storage.vfiler

For me, the root_qtree_id's are all empty, but the root_volume_id's are ok, and the command will automatically adjust in this case (and assume they are in /vol/<root-vol>/etc/quotas).

There may be a collection issue, where root_volume information is not being gather.

If the fields don't exist in the wfa database, was there an upgrade involved? You could try to "Reset Schema" and kick off a collection and see if they re-appear..

Michael.