Sun Cluster 系統管理指南(適用於 Solaris 作業系統)

Procedure如何在叢集重新設定日期時間

Sun Cluster 軟體使用網路時間協定 (NTP) 來保持叢集節點之間的時間同步。當節點同步化自己的時間時,會依需要在叢集內進行自動調整。請參閱「Sun Cluster Concepts Guide for Solaris OS」和「Network Time Protocol User's Guide」,以取得更多資訊。


注意 – 注意 –

如果您使用 NTP,請不要在啟動並執行叢集時調整叢集時間。請勿互動式使用 date(1)rdate(1M)xntpd(1M)svcadm(1M) 指令或在 cron(1M) 程序檔內調整時間。


此程序提供長形式的 Sun Cluster 指令。大多數指令還有簡短的形式。除了指令名稱有長形式和短形式之分外,指令本身是相同的。如需指令及其短形式的清單,請參閱附錄 ASun Cluster 以物件為導向的指令

  1. 成為叢集中任何節點的超級使用者。

  2. 關閉叢集。


    # cluster shutdown -g0 -y -i 0
    
  3. 驗證節點在以 SPARC 為基礎的系統上是否顯示 ok 提示符號,或在以 x86 為基礎的系統的 GRUB 功能表上顯示 Press any key to continue 訊息。

  4. 在非叢集模式中啟動節點。

    • 在 SPARC 架構的系統上,執行下列指令:


      ok boot -x
      
    • 在 x86 架構的系統上,執行下列指令:


      phys-schost# shutdown -g -y -i0
      
      Press any key to continue
    1. 在 GRUB 功能表中,使用方向鍵選取適合的 Solaris 項目,並鍵入 e 以編輯其指令。

      GRUB 功能表會以類似以下的方式顯示:


      GNU GRUB version 0.95 (631K lower / 2095488K upper memory)
      +-------------------------------------------------------------------------+
      | Solaris 10 /sol_10_x86                                                  |
      | Solaris failsafe                                                        |
      |                                                                         |
      +-------------------------------------------------------------------------+
      Use the ^ and v keys to select which entry is highlighted.
      Press enter to boot the selected OS, 'e' to edit the
      commands before booting, or 'c' for a command-line.

      如需更多以 GRUB 為基礎的啟動之相關資訊,請參閱「System Administration Guide: Basic Administration」中的第 11 章「GRUB Based Booting (Tasks)」

    2. 在啟動參數畫面中,使用方向鍵選取核心項目並鍵入 e 以編輯該項目。

      GRUB 啟動參數畫面會以類似以下的方式顯示:


      GNU GRUB version 0.95 (615K lower / 2095552K upper memory)
      +----------------------------------------------------------------------+
      | root (hd0,0,a)                                                       |
      | kernel /platform/i86pc/multiboot                                     |
      | module /platform/i86pc/boot_archive                                  |
      +----------------------------------------------------------------------+
      Use the ^ and v keys to select which entry is highlighted.
      Press 'b' to boot, 'e' to edit the selected command in the
      boot sequence, 'c' for a command-line, 'o' to open a new line
      after ('O' for before) the selected line, 'd' to remove the
      selected line, or escape to go back to the main menu.
    3. -x 增加至指令以指定系統會啟動至非叢集模式。


      [ Minimal BASH-like line editing is supported. For the first word, TAB
      lists possible command completions. Anywhere else TAB lists the possible
      completions of a device/filename. ESC at any time exits. ]
      
      grub edit> kernel /platform/i86pc/multiboot -x
    4. 按 Enter 鍵接受變更並返回啟動參數畫面。

      畫面會顯示已編輯的指令。


      GNU GRUB version 0.95 (615K lower / 2095552K upper memory)
      +----------------------------------------------------------------------+
      | root (hd0,0,a)                                                       |
      | kernel /platform/i86pc/multiboot -x                                  |
      | module /platform/i86pc/boot_archive                                  |
      +----------------------------------------------------------------------+
      Use the ^ and v keys to select which entry is highlighted.
      Press 'b' to boot, 'e' to edit the selected command in the
      boot sequence, 'c' for a command-line, 'o' to open a new line
      after ('O' for before) the selected line, 'd' to remove the
      selected line, or escape to go back to the main menu.-
    5. 鍵入 b 將節點啟動至非叢集模式。


      備註 –

      對核心啟動參數指令所做的這個變更不會在系統啟動後持續。下次您重新啟動節點時,將會啟動至叢集模式。若要啟動至非叢集模式,請重新執行這些步驟,將 -x 選項增加至核心啟動參數指令。


  5. 在單一節點上,執行 date 指令來設定日期時間。


    # date HHMM.SS
    
  6. 在其他機器上,執行 rdate(1M) 指令,以使時間與該節點同步。


    # rdate hostname
    
  7. 將每一個節點重新開機來啟動叢集。


    # reboot
    
  8. 驗證是否在所有的叢集節點上皆產生變更。

    請在每一個節點上執行 date 指令。


    # date