3 Replies Latest reply on Sep 29, 2011 1:59 AM by ii00907

    Rescan ESX

    ii00907 Enthusiast

      Goodmorning,

      i have a question for you.

       

      Every day for processes of clone db, I use the scripts

       

      rdmManagmement.pl for destroy old rdm ( LUN ) and Add new rdm ( LUN ) to VM

      and

      rescanAllHBAInCluster.pl for rescan HBA when i Remove or Add new LUN on ESX

       

      the script works great, very thanks William Lam.

       

      Now the question;

       

      rescanAllHBAInCluster.pl , rescan all HBA for all host ( esx ) in a cluster and the time for rescan is "X".

       

      I have a rule on DRS that the VM should reside always in a specific host, so as to make the rescan only for a single host whit command

      vicfg-rescan --server xxxxxxx --username xxxxxx --password xxxxxxx vmhba1

      vicfg-rescan --server xxxxxxx --username xxxxxx --password xxxxxxx vmhba2

       

      and then, at the end of the process add Lun to the VM , perform the rescan all HBAs for hosts to Internal Cluster rescanAllHBAInCluster.pl,

      with this process rescan times a single host is less than 4 Host.

       

      but with the command vicfg-rescan does not immediately see the new LUNs on the host, and therefore, subsequently, add the new Lun with

      rdmManagmement.pl goes wrong.

       

      I have insert a sleep between vicfg-rescan and rdmManagmement.pl , but it is not always ok.

       

      I was wondering if there is a script, performing as rescanAllHBAInCluster.plrescanAllHBAInCluster.pl, but for specific host "rescanAllHBAInHost.pl.

       

      Sorry for my bad English and thanks for your help.

       

      ii00907

      Ivan

        • 1. Re: Rescan ESX
          lamw Guru
          Community WarriorsVMware Employees

          Here is a quick hack to get rescanAllHBAInCluster.pl to support a single ESX(i) host rescan - http://vghetto.svn.sourceforge.net/viewvc/vghetto/scripts/rescanAllHBAInCluster.pl?view=log

           

          You can specify either --cluster or --host:

           

          ./rescanAllHBAInCluster.pl --server reflex --cluster Primp-Prod-Cluster

          Scanning cluster: Primp-Prod-Cluster ...
             Rescan all HBAs successful for host himalaya.primp-industries.com.
             Rescan for new VMFS volumes successful for host himalaya.primp-industries.com.
             Refresh storage information successful for host himalaya.primp-industries.com.
          Scanning cluster complete!

           

          ./rescanAllHBAInCluster.pl --server reflex --host himalaya.primp-industries.com

          Scanning host: himalaya.primp-industries.com ...
             Rescan all HBAs successful for host himalaya.primp-industries.com.
             Rescan for new VMFS volumes successful for host himalaya.primp-industries.com.
             Refresh storage information successful for host himalaya.primp-industries.com.
          Scanning host complete!

          I quickly tested this, but should give you what you're looking for.

          • 2. Re: Rescan ESX
            ii00907 Enthusiast

            Hi William,

            many many many thanks!!!!

             

            Despite my bad English, you have understood what i needed.

             

            Thanks again.

            • 3. Re: Rescan ESX
              ii00907 Enthusiast

              I William,

              your change on rescanAllHBAInCluster.pl, for my request, is good.

               

              I have insert on my "Production Process" and i have reduce ( 15 Minutes ) the process for clone e mount DB-rdm.

               

              Many thanks