Subselect-ish behavior?

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Subselect-ish behavior?

Ehrenwald, Ian
Conceptually this is what I’d like to do:

volume show-footprint -fields total-footprint { volume show -clone-volume true -fields volume }

Eg, show the total on disk footprint of all FlexClones.

I could have sworn I saw a very brief example of this on Justin Parisi’s blog, taking the output of one command and feeding it into another.  At the time, I thought “oh that’s cool” and moved on, but now can’t find reference to it.

Either I don’t remember the syntax, it isn’t supported in 8.3.2, or it never happened and I’m slowly going crazy?


--
Ian Ehrenwald
Senior Infrastructure Engineer
Hachette Book Group, Inc.
1.617.263.1948 / [hidden email]



This may contain confidential material. If you are not an intended recipient, please notify the sender, delete immediately, and understand that no disclosure or reliance on the information herein is permitted. Hachette Book Group may monitor email to and from our network.

_______________________________________________
Toasters mailing list
[hidden email]
http://www.teaparty.net/mailman/listinfo/toasters
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RE: Subselect-ish behavior?

Weber, Mark A
Maybe you are thinking of extended queries?
https://erailine.com/2014/11/20/tours-of-the-black-prompt-clustered-netapp-data-ontap-part-4/

you can do what you want from powershell:
get-ncvolclone | get-ncvolfootprint | select -Property totalfootprint

but I believe extended queries are just within the same command (and only for modify/delete commands)

The closest I could get to was:
vol show -clone-volume true -fields physical-used,size-used-by-snapshots

but those numbers don't match vol show-footprint

m

-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of Ehrenwald, Ian
Sent: Monday, April 10, 2017 1:00 PM
To: [hidden email]
Subject: Subselect-ish behavior?

Conceptually this is what I’d like to do:

volume show-footprint -fields total-footprint { volume show -clone-volume true -fields volume }

Eg, show the total on disk footprint of all FlexClones.

I could have sworn I saw a very brief example of this on Justin Parisi’s blog, taking the output of one command and feeding it into another.  At the time, I thought “oh that’s cool” and moved on, but now can’t find reference to it.

Either I don’t remember the syntax, it isn’t supported in 8.3.2, or it never happened and I’m slowly going crazy?


--
Ian Ehrenwald
Senior Infrastructure Engineer
Hachette Book Group, Inc.
1.617.263.1948 / [hidden email]



This may contain confidential material. If you are not an intended recipient, please notify the sender, delete immediately, and understand that no disclosure or reliance on the information herein is permitted. Hachette Book Group may monitor email to and from our network.

_______________________________________________
Toasters mailing list
[hidden email]
http://www.teaparty.net/mailman/listinfo/toasters

_______________________________________________
Toasters mailing list
[hidden email]
http://www.teaparty.net/mailman/listinfo/toasters
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Subselect-ish behavior?

Tim McCarthy
On the netapp CLI, you can only include as part of the extended queries subcommands to the command you are working.
Typically, used with a modify:

volume modify {-volume *tmp*} -state offline
-> any volume with tmp in the name, make offline


--tmac

Tim McCarthy, Principal Consultant

Proud Member of the #NetAppATeam

I Blog at TMACsRack


On Mon, Apr 10, 2017 at 2:42 PM, Weber, Mark A <[hidden email]> wrote:
Maybe you are thinking of extended queries?
https://erailine.com/2014/11/20/tours-of-the-black-prompt-clustered-netapp-data-ontap-part-4/

you can do what you want from powershell:
get-ncvolclone | get-ncvolfootprint | select -Property totalfootprint

but I believe extended queries are just within the same command (and only for modify/delete commands)

The closest I could get to was:
vol show -clone-volume true -fields physical-used,size-used-by-snapshots

but those numbers don't match vol show-footprint

m

-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of Ehrenwald, Ian
Sent: Monday, April 10, 2017 1:00 PM
To: [hidden email]
Subject: Subselect-ish behavior?

Conceptually this is what I’d like to do:

volume show-footprint -fields total-footprint { volume show -clone-volume true -fields volume }

Eg, show the total on disk footprint of all FlexClones.

I could have sworn I saw a very brief example of this on Justin Parisi’s blog, taking the output of one command and feeding it into another.  At the time, I thought “oh that’s cool” and moved on, but now can’t find reference to it.

Either I don’t remember the syntax, it isn’t supported in 8.3.2, or it never happened and I’m slowly going crazy?


--
Ian Ehrenwald
Senior Infrastructure Engineer
Hachette Book Group, Inc.
<a href="tel:1.617.263.1948" value="+16172631948">1.617.263.1948 / [hidden email]



This may contain confidential material. If you are not an intended recipient, please notify the sender, delete immediately, and understand that no disclosure or reliance on the information herein is permitted. Hachette Book Group may monitor email to and from our network.

_______________________________________________
Toasters mailing list
[hidden email]
http://www.teaparty.net/mailman/listinfo/toasters

_______________________________________________
Toasters mailing list
[hidden email]
http://www.teaparty.net/mailman/listinfo/toasters


_______________________________________________
Toasters mailing list
[hidden email]
http://www.teaparty.net/mailman/listinfo/toasters
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Subselect-ish behavior?

Ehrenwald, Ian
Ahh yes, Extended Queries was what I saw, and it doesn’t seem to work the way I misremembered it did.

Of course, you could always use a shell script with nested SSHs and some awk magic or PowerShell to accomplish the same thing, but sometimes it would be nice to not leave the cDOT CLI.


--
Ian Ehrenwald
Senior Infrastructure Engineer
Hachette Book Group, Inc.
1.617.263.1948 / [hidden email]



On 4/10/17, 3:02 PM, "tmac" <[hidden email]> wrote:

    On the netapp CLI, you can only include as part of the extended queries subcommands to the command you are working.
    Typically, used with a modify:


    volume modify {-volume *tmp*} -state offline
    -> any volume with tmp in the name, make offline


    --tmac


    Tim McCarthy, Principal Consultant
    Proud Member of the #NetAppATeam <https://twitter.com/NetAppATeam>
    I Blog at TMACsRack <https://tmacsrack.wordpress.com/>

















    On Mon, Apr 10, 2017 at 2:42 PM, Weber, Mark A
    <[hidden email]> wrote:

    Maybe you are thinking of extended queries?
    https://erailine.com/2014/11/20/tours-of-the-black-prompt-clustered-netapp-data-ontap-part-4/ <https://erailine.com/2014/11/20/tours-of-the-black-prompt-clustered-netapp-data-ontap-part-4/>

    you can do what you want from powershell:
    get-ncvolclone | get-ncvolfootprint | select -Property totalfootprint

    but I believe extended queries are just within the same command (and only for modify/delete commands)

    The closest I could get to was:
    vol show -clone-volume true -fields physical-used,size-used-by-snapshots

    but those numbers don't match vol show-footprint

    m

    -----Original Message-----
    From: [hidden email] [mailto:[hidden email]] On Behalf Of Ehrenwald, Ian
    Sent: Monday, April 10, 2017 1:00 PM
    To: [hidden email]
    Subject: Subselect-ish behavior?

    Conceptually this is what I’d like to do:

    volume show-footprint -fields total-footprint { volume show -clone-volume true -fields volume }

    Eg, show the total on disk footprint of all FlexClones.

    I could have sworn I saw a very brief example of this on Justin Parisi’s blog, taking the output of one command and feeding it into another.  At the time, I thought “oh that’s cool” and moved on, but now can’t find reference to it.

    Either I don’t remember the syntax, it isn’t supported in 8.3.2, or it never happened and I’m slowly going crazy?


    --
    Ian Ehrenwald
    Senior Infrastructure Engineer
    Hachette Book Group, Inc.
    1.617.263.1948 <tel:1.617.263.1948> /
    [hidden email] <mailto:[hidden email]>



    This may contain confidential material. If you are not an intended recipient, please notify the sender, delete immediately, and understand that no disclosure or reliance on the information herein is permitted. Hachette Book Group may monitor email to and from
     our network.

    _______________________________________________
    Toasters mailing list
    [hidden email]
    http://www.teaparty.net/mailman/listinfo/toasters <http://www.teaparty.net/mailman/listinfo/toasters>

    _______________________________________________
    Toasters mailing list
    [hidden email]
    http://www.teaparty.net/mailman/listinfo/toasters <http://www.teaparty.net/mailman/listinfo/toasters>











This may contain confidential material. If you are not an intended recipient, please notify the sender, delete immediately, and understand that no disclosure or reliance on the information herein is permitted. Hachette Book Group may monitor email to and from our network.

_______________________________________________
Toasters mailing list
[hidden email]
http://www.teaparty.net/mailman/listinfo/toasters
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Subselect-ish behavior?

Sebastian Goetze

Hi Ian,

Did you try

volume show-footprint -fields total-footprint { -clone-volume true  }

?


On Mon, Apr 10, 2017, 21:23 Ehrenwald, Ian <[hidden email]> wrote:
Ahh yes, Extended Queries was what I saw, and it doesn’t seem to work the way I misremembered it did.

Of course, you could always use a shell script with nested SSHs and some awk magic or PowerShell to accomplish the same thing, but sometimes it would be nice to not leave the cDOT CLI.


--
Ian Ehrenwald
Senior Infrastructure Engineer
Hachette Book Group, Inc.
1.617.263.1948 / [hidden email]



On 4/10/17, 3:02 PM, "tmac" <[hidden email]> wrote:

    On the netapp CLI, you can only include as part of the extended queries subcommands to the command you are working.
    Typically, used with a modify:


    volume modify {-volume *tmp*} -state offline
    -> any volume with tmp in the name, make offline


    --tmac


    Tim McCarthy, Principal Consultant
    Proud Member of the #NetAppATeam <https://twitter.com/NetAppATeam>
    I Blog at TMACsRack <https://tmacsrack.wordpress.com/>

















    On Mon, Apr 10, 2017 at 2:42 PM, Weber, Mark A
    <[hidden email]> wrote:

    Maybe you are thinking of extended queries?
    https://erailine.com/2014/11/20/tours-of-the-black-prompt-clustered-netapp-data-ontap-part-4/ <https://erailine.com/2014/11/20/tours-of-the-black-prompt-clustered-netapp-data-ontap-part-4/>

    you can do what you want from powershell:
    get-ncvolclone | get-ncvolfootprint | select -Property totalfootprint

    but I believe extended queries are just within the same command (and only for modify/delete commands)

    The closest I could get to was:
    vol show -clone-volume true -fields physical-used,size-used-by-snapshots

    but those numbers don't match vol show-footprint

    m

    -----Original Message-----
    From: [hidden email] [mailto:[hidden email]] On Behalf Of Ehrenwald, Ian
    Sent: Monday, April 10, 2017 1:00 PM
    To: [hidden email]
    Subject: Subselect-ish behavior?

    Conceptually this is what I’d like to do:

    volume show-footprint -fields total-footprint { volume show -clone-volume true -fields volume }

    Eg, show the total on disk footprint of all FlexClones.

    I could have sworn I saw a very brief example of this on Justin Parisi’s blog, taking the output of one command and feeding it into another.  At the time, I thought “oh that’s cool” and moved on, but now can’t find reference to it.

    Either I don’t remember the syntax, it isn’t supported in 8.3.2, or it never happened and I’m slowly going crazy?


    --
    Ian Ehrenwald
    Senior Infrastructure Engineer
    Hachette Book Group, Inc.
    1.617.263.1948 <tel:1.617.263.1948> /
    [hidden email] <mailto:[hidden email]>



    This may contain confidential material. If you are not an intended recipient, please notify the sender, delete immediately, and understand that no disclosure or reliance on the information herein is permitted. Hachette Book Group may monitor email to and from
     our network.

    _______________________________________________
    Toasters mailing list
    [hidden email]
    http://www.teaparty.net/mailman/listinfo/toasters <http://www.teaparty.net/mailman/listinfo/toasters>

    _______________________________________________
    Toasters mailing list
    [hidden email]
    http://www.teaparty.net/mailman/listinfo/toasters <http://www.teaparty.net/mailman/listinfo/toasters>











This may contain confidential material. If you are not an intended recipient, please notify the sender, delete immediately, and understand that no disclosure or reliance on the information herein is permitted. Hachette Book Group may monitor email to and from our network.

_______________________________________________
Toasters mailing list
[hidden email]
http://www.teaparty.net/mailman/listinfo/toasters
--

sent from my mobile, spellcheck might have messed up...


_______________________________________________
Toasters mailing list
[hidden email]
http://www.teaparty.net/mailman/listinfo/toasters
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Subselect-ish behavior?

Ehrenwald, Ian
I did not, up until this point.  But I did try just now and received negative results:


Cluster1::> volume show-footprint -fields total-footprint { -clone-volume true }

Error: Volume name: The first character must be a letter or underscore.

Cluster1::> version
NetApp Release 8.3.2P5: Tue Aug 23 12:36:56 UTC 2016

Cluster1::>


Does it work for you?  If so, what ONTAP release are you using?


Ian Ehrenwald
Senior Infrastructure Engineer
Hachette Book Group, Inc.
1.617.263.1948 / [hidden email]

________________________________________
From: Sebastian P. Goetze <[hidden email]>
Sent: Tuesday, April 11, 2017 2:29 AM
To: Ehrenwald, Ian; tmac; Weber, Mark A
Cc: [hidden email]
Subject: Re: Subselect-ish behavior?

Hi Ian,

Did you try

volume show-footprint -fields total-footprint { -clone-volume true  }
This may contain confidential material. If you are not an intended recipient, please notify the sender, delete immediately, and understand that no disclosure or reliance on the information herein is permitted. Hachette Book Group may monitor email to and from our network.


_______________________________________________
Toasters mailing list
[hidden email]
http://www.teaparty.net/mailman/listinfo/toasters
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Subselect-ish behavior?

Tim McCarthy
Hey guys, this command really does no good:

volume show-footprint -fields total-footprint { -clone-volume true  }

(correct written should be: volume show-footprint { -clone-volume true  } -fields total-footprint )
--> the extended query goes first.

Second, what's the difference between this command:
volume show-footprint { -clone-volume true  } -fields total-footprint 
And this:
volume show-footprint  -clone-volume true  -fields total-footprint 

Off the top of my head, can't think of an extended query that would be useful with a show command.

Here is a great example from the upgrade guide:

system image modify {-node * -iscurrent false} -isdefault true
I want to modify the system image ( for all nodes where iscurrent is false) and set the default to true.

Hopefully, this helps


--tmac

Tim McCarthy, Principal Consultant

Proud Member of the #NetAppATeam

I Blog at TMACsRack




On Tue, Apr 11, 2017 at 7:49 AM, Ehrenwald, Ian <[hidden email]> wrote:
I did not, up until this point.  But I did try just now and received negative results:


Cluster1::> volume show-footprint -fields total-footprint { -clone-volume true }

Error: Volume name: The first character must be a letter or underscore.

Cluster1::> version
NetApp Release 8.3.2P5: Tue Aug 23 12:36:56 UTC 2016

Cluster1::>


Does it work for you?  If so, what ONTAP release are you using?


Ian Ehrenwald
Senior Infrastructure Engineer
Hachette Book Group, Inc.
<a href="tel:1.617.263.1948" value="+16172631948">1.617.263.1948 / [hidden email]

________________________________________
From: Sebastian P. Goetze <[hidden email]>
Sent: Tuesday, April 11, 2017 2:29 AM
To: Ehrenwald, Ian; tmac; Weber, Mark A
Cc: [hidden email]
Subject: Re: Subselect-ish behavior?

Hi Ian,

Did you try

volume show-footprint -fields total-footprint { -clone-volume true  }
This may contain confidential material. If you are not an intended recipient, please notify the sender, delete immediately, and understand that no disclosure or reliance on the information herein is permitted. Hachette Book Group may monitor email to and from our network.



_______________________________________________
Toasters mailing list
[hidden email]
http://www.teaparty.net/mailman/listinfo/toasters
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Subselect-ish behavior?

Ehrenwald, Ian
Hello
Well, the difference as far as I can tell is that neither of those invocations work ;)


Cluster1::> volume show-footprint { -clone-volume true  } -fields total-footprint
Error: Volume name: The first character must be a letter or underscore.
Cluster1::>

Cluster1::> volume show-footprint  -clone-volume true  -fields total-footprint
Error: invalid argument "-clone-volume"
Cluster1::>


I also compared the physical-used field in volume show vs the total-footprint field in show-footprint and they vary too widely to be even roughly useful.

Maybe I'm just asking Extended Queries to do something that they weren't meant to do.  Or maybe it'd be nice if show-footprint understood -clone-volume (hint hint, any NetApp developers reading silently in the background?).


Ian Ehrenwald
Senior Infrastructure Engineer
Hachette Book Group, Inc.
1.617.263.1948 / [hidden email]

________________________________________
From: tmac <[hidden email]>
Sent: Tuesday, April 11, 2017 9:17:33 AM
To: Ehrenwald, Ian
Cc: Sebastian P. Goetze; Weber, Mark A; [hidden email]
Subject: Re: Subselect-ish behavior?

Hey guys, this command really does no good:


volume show-footprint -fields total-footprint { -clone-volume true  }

(correct written should be: volume show-footprint { -clone-volume true  } -fields total-footprint )
--> the extended query goes first.

Second, what's the difference between this command:
volume show-footprint { -clone-volume true  } -fields total-footprint
And this:
volume show-footprint  -clone-volume true  -fields total-footprint

Off the top of my head, can't think of an extended query that would be useful with a show command.

Here is a great example from the upgrade guide:

system image modify {-node * -iscurrent false} -isdefault true
I want to modify the system image ( for all nodes where iscurrent is false) and set the default to true.

Hopefully, this helps


--tmac

Tim McCarthy, Principal Consultant

Proud Member of the #NetAppATeam<https://twitter.com/NetAppATeam>

I Blog at TMACsRack<https://tmacsrack.wordpress.com/>



On Tue, Apr 11, 2017 at 7:49 AM, Ehrenwald, Ian <[hidden email]<mailto:[hidden email]>> wrote:
I did not, up until this point.  But I did try just now and received negative results:


Cluster1::> volume show-footprint -fields total-footprint { -clone-volume true }

Error: Volume name: The first character must be a letter or underscore.

Cluster1::> version
NetApp Release 8.3.2P5: Tue Aug 23 12:36:56 UTC 2016

Cluster1::>


Does it work for you?  If so, what ONTAP release are you using?


Ian Ehrenwald
Senior Infrastructure Engineer
Hachette Book Group, Inc.
1.617.263.1948<tel:1.617.263.1948> / [hidden email]<mailto:[hidden email]>

________________________________________
From: Sebastian P. Goetze <[hidden email]<mailto:[hidden email]>>
Sent: Tuesday, April 11, 2017 2:29 AM
To: Ehrenwald, Ian; tmac; Weber, Mark A
Cc: [hidden email]<mailto:[hidden email]>
Subject: Re: Subselect-ish behavior?

Hi Ian,

Did you try

volume show-footprint -fields total-footprint { -clone-volume true  }
This may contain confidential material. If you are not an intended recipient, please notify the sender, delete immediately, and understand that no disclosure or reliance on the information herein is permitted. Hachette Book Group may monitor email to and from our network.


This may contain confidential material. If you are not an intended recipient, please notify the sender, delete immediately, and understand that no disclosure or reliance on the information herein is permitted. Hachette Book Group may monitor email to and from our network.


_______________________________________________
Toasters mailing list
[hidden email]
http://www.teaparty.net/mailman/listinfo/toasters
Loading...