1. Insert Backup Disk into server slot 2.
2. Check if server can detect new disk.
server # ioscan -fnC disk
Class I H/W Path Driver S/W State H/W Type Description
======================================================================
disk 0 0/0/1/1.15.0 sdisk CLAIMED DEVICE HP 18.2GMAN3184MC
/dev/dsk/c1t15d0 /dev/rdsk/c1t15d0
disk 0 0/0/1/3.15.0 sdisk CLAIMED DEVICE HP 18.2GMAN3184MC
/dev/dsk/c3t15d0 /dev/rdsk/c3t15d0
3. c1t15d0 is system disk, c3t15d0 is backup disk.
4. Start to duplicate disk...
#dd if=/dev/rdsk/c1t15d0 of=/dev/rdsk/c3t15d0 bs=1024k
5. When finished, back to prompt,
6. Unplug Backup Disk from server slot 2, and then insert this backup disk into backup-server slot1.
7. Do not connect LAN.
8. Power on backup-server
9. Make sure primaty boot order is 0/0/1/1.15.0
10. Boot from Backup Disk.
11. When boot into hp-ux finished, login by root
12. Stop platform first.
#p7stop -s
13. Make sure this backup-server is date/time correct, if not correct, please correct it first.
14. You can correct time/date by connect backup-server onto lan, and using NTP server. But please change ip first.
15. HP-UX How to Change IP
# ioscan -fnC lan
Class I H/W Path Driver S/W State H/W Type Description
==========================================================================
lan 0 0/0/0/1/0 btlan CLAIMED INTERFACE HP PCI 10/100Base-TX Core
/dev/diag/lan0 /dev/ether0 /dev/lan0
15.1. 若看不到卡,請使用 ioscan 判斷是否有網路卡但需要驅動程式或未正確驅動 (UNCLAIMED)。
# ioscan -fn
15.2. 檢視有綁定 IP 位址的卡片資訊。
server # netstat -in
Name Mtu Network Address Ipkts Opkts
lan0 1500 140.133.26.0 140.133.26.13 719753 724185
lo0 4136 127.0.0.0 127.0.0.1 24396 24396
15.3. 針對每一個介面執行 ifconfig,確認正確的 IP、網路遮罩和廣播位址。例如:
server # ifconfig lan0
lan0: flags=843<UP,BROADCAST,RUNNING,MULTICAST>
inet 140.133.26.13 netmask ffffff00 broadcast 140.133.26.255
15.4. 設定IP(永久性的)
要永久性的設定IP,請透過sam(System Admin Manager)來設定,
使用sam設定IP,之後即使重開機,網路設定仍會被記住。
sam->network and communication -> interface card
如果知道自己在做什麼,也可以考慮直接編輯網路的設定檔,例如:
# vi /etc/rc.config.d/netconf
# /sbin/init.d/net start
15.5. 設定IP(非永久性的加IP,重開機後設定即消失),給他一個temporary IP (140.133.26.20)
# ifconfig lan0 140.133.26.20 netmask 255.255.255.0 up
15.6. Ping CHT-I NTP server 140.133.31.126
16. HP-UX NTP設定, make sure backup-server is date/time the same with lan.
16.1. 編輯設定檔 /etc/ntp.conf ,加入CHT-I ntp server為ntp server (其實已經設好了,不須更動,除非要改ntp server).
server 140.133.31.126 # NTP server
16.2. 重新啟動 NTP 服務
# /sbin/init.d/xntpd restart
16.3.過一段時間後,再檢查是否與ntp server 對時
# /usr/sbin/ntpq -p
成功的話,會出現對時的ntp server ip,及對時後調整時間的訊息。
如出現 No association ID's returned 則表示沒有成功。
16.4. 下列我實際的查詢結果(有啟用xntpd)
# ps -ef |grep ntp
root 1807 1 0 Aug 20 ? 20:11 /usr/sbin/xntpd
server # ntpq -p
remote refid st t when poll reach delay offset disp
=========================================================
*NTP 192.168.33.4 5 u 43 64 377 8.87 0.533 1.62
17. 確定NTP已經sync成功後,接著就可以準備切換備機。
18. 切換備機程序:
19. In server
19.1. stop platform
19.2. unplug lan
20. In backup-server
20.1. make sure IP is the same with server 140.133.26.13 , if not, please change ip the same with server.
#ifconfig lan0 140.133.26.13 netmask 255.255.255.0 up
20.2. connect lan.
20.3. start platform
...
...
...
21. 恭喜,備機已經上線。
沒有留言:
張貼留言