Automation

 View Only
  • 1.  Show local disks and format them? (Powercli)

    Posted May 13, 2024 01:59 PM

    I am trying to figure out how to find unformatted local volumes that I can format as VMFS.

    I can gather all volumes via:

    Get-SCSILun -VMhost $vmhost

    And see which ones are attached to local storage controller,  but cant figure out how to only include unformatted volumes?

    Thanks in advance LucD :)



  • 2.  RE: Show local disks and format them? (Powercli)
    Best Answer

    Posted May 14, 2024 02:41 AM

    Have a look at my LUN report – datastore, RDM and node visibility post.
    That shows which LUNs are available.



    ------------------------------


    Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference


    ------------------------------



  • 3.  RE: Show local disks and format them? (Powercli)

    Posted May 15, 2024 08:53 AM

    Is there anyway to execute this without the requirement for this:

    Add-Type -Language CsharpVersion3 -TypeDefinition $LunInfoDef

    I cant load the necessary components to get this to work.

    Thanks




  • 4.  RE: Show local disks and format them? (Powercli)

    Posted May 15, 2024 09:09 AM

    Did you try changing CsharpVersion3 with CSharp?



    ------------------------------


    Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference


    ------------------------------



  • 5.  RE: Show local disks and format them? (Powercli)

    Posted May 15, 2024 09:12 AM

    Thats it!   Thanks!

    -Matt




  • 6.  RE: Show local disks and format them? (Powercli)

    Posted Jul 17, 2024 09:19 AM

    Is there a way to skip formatting a VMFS on the leftover disk space on the disk containing the ESX OS Data?

    Thanks!




  • 7.  RE: Show local disks and format them? (Powercli)

    Posted Jul 17, 2024 09:19 AM

    Is there a way to skip formatting the leftover space on the disk containing the ESX OS Data partition?  

    Thanks




  • 8.  RE: Show local disks and format them? (Powercli)

    Posted Jul 17, 2024 09:31 AM

    Not that I know of.
    But in ESXi 8 the creation of that VMFS partition depends on the size of the disk.
    See ESXi System Storage Overview

    You could experiment with the systemMediaSize = max parameter



    ------------------------------


    Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference


    ------------------------------



  • 9.  RE: Show local disks and format them? (Powercli)

    Posted Jul 17, 2024 11:37 AM

    Thx!   I saw the  systemMediaSize = max parameter but it does feel more experimental and would need to be tested.   My alt is to just exclude disks under a certain size though is not ideal as we could end up excluding disks they we want.

    -Matt




  • 10.  RE: Show local disks and format them? (Powercli)

    Posted Jul 17, 2024 12:28 PM

    Afaik, that parameter is only for the system disk.



    ------------------------------


    Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference


    ------------------------------