Forum Discussion

MikeyRay's avatar
MikeyRay
Icon for Nimbostratus rankNimbostratus
Jul 22, 2018

script to search partitions

script partitions

 

3 Replies

  • Can you clarify your question - what are you trying to search for, and where from?

     

  • I guess, you are looking to create one more partion in device like F5 has default "/Common"

    • Log in to the Traffic Management Shell (tmsh) by entering the following command:

      create auth partition vWEBLOGIC
      
    • FYI For Volume Partition for software installation. tmsh utility by using the following syntax:

      tmsh create sys software volume HD1.3
      

      HD1.3 is new volume partition for boot image installation-K13563

  • Hi,

    with the following command you can list all existing administrative partitions of your BIG-IP device:

    tmsh list auth partition

    To list i.e. all configuraton objects of the LTM module in a specific partion the tmsh command mode can be used (just replace the "Common" with the partion you want to lookup or replace "list ltm" by "list net" or whatever module you want to check:

    tmsh -q -c 'cd /Common; list ltm'

    For a recursive search through virtual servers all partitions the following pipe will probably help (just replace the module and component of "ltm virtual" by the module and component you want to check):

    tmsh -q -c 'cd /; list ltm virtual one-line recursive' | grep ''

    The one-line mode is tough to read but helps a lot to apply filters.

    Actually the output can be used by tools like awk to craft new commands to execute them in the Shell like in the following one-liner (searches virtual server with a specific property (defined in "") and runs a list command for the objects found:

    tmsh -q -c 'cd /; list ltm virtual one-line recursive' | \
    awk '// {print "tmsh list ltm virtual /" $3, "destination pool"}' | \
    bash +x
    

    Cheers, Stephan