Chia Sẽ Kinh Nghiệm Về IT



Tìm Kiếm Với Google
-


Gởi Ðề Tài Mới  Gửi trả lời
 
Công Cụ Xếp Bài
Tuổi 27-02-2014, 11:16 AM   #1
hoctinhoc
Guest
 
Trả Lời: n/a
Tổng hợp các lệnh và xử lý shaman - PCS
Tổng hợp các lệnh và xử lý shaman - PCS

1. Vấn đề VM bị mất trên PVA hoặc PCS


Trong vài tính huống như: 2 Server Node bị restart cùng lúc hoặc 3 node bị cup điện đột ngột... sẽ dẫn đến 1 vài VM hoặc Container bị mất, để đăng ký hay cho các VPS này hiện lại trên PVA hoặc PCS thì các bạn làm như sau:

Chú ý: Khi VM bị biến mất trên PVA thì dữ liệu của VM dẫn còn nằm trong thư mục /pstorage/minicloud/

Các bạn có thể vào /pstorage/clustername/vmprivate ... để kiểm tra

Và thực hiện các lệnh sau để đăng ký VM lại

For Container:

pstorage -c pcs revoke -R /pstorage/pcs/private/2444514
prlctl register /pstorage/pcs/private/2444514 --force
prlctl start 2444514

For VM


# pstorage -c pcs revoke -R /pstorage/pcs/vmprivate/Windows\ Server\2008.pvm
# prlctl register /pstorage/pcs/vmprivate/Windows\ Server\ 2008.pvm --force
# prlctl start 'Windows Server 2008'

2. Xử lý vấn đề Shaman báo broken


Vấn đề


  1. Khi gõ lệnh shaman stat hoặc shaman -c mc001 top bạn thấy các vm or containers bị broke


Trích dẫn:

~# shaman stat | grep Broken

50 running Broken Unknown

Xử lý



For containers:



Trích dẫn:

# vzctl suspend 50
# vzctl unregister 50
# rm -f /pstorage/cluster_name/.shaman/broken/ct-50
# vzctl register /vz/private/50 50
# vzctl resume 50



For virtual machines:


# prlctl suspend MyVM
# prlctl unregister MyVM
# rm -f /pstorage/cluster_name/.shaman/broken/vm-MyVM
# prlctl register /pstorage/cluster_name/vmprivate/MyVM.pvm/config.pvs --preserve-uuid
# prlctl resume MyVM


Tham khảo:

http://kb.parallels.com/en/117032


3. Cài đặt shaman HA

#yum install shaman
#yum install shaman-parallels
#echo "CLUSTER_NAME=minicloud" > /etc/shaman/shaman.conf
# shaman join
#service shamand start
#chkconfig --level 35 shamand on


4. Xem và remove Shaman

root@minicloud02 ~]# shaman -v stat

root@minicloud02 ~]# shaman leave -N 5909c029f03c454d
[root@minicloud02 ~]# shaman leave -N c99414fa4e0c4d63

5. Giám sát shaman HA


shaman –c minicloud top

shaman join
service shamand start

Clean reboot of the node is normal behavior that CTs are suspended.
The following happens on normal reboot:
1) Someone issues 'shutdown -r now' or 'shutdown -h now'
2) CTs are gracefully stopped (suspended in case of RKU).
3) Shaman recognized that CTs are stopped.
4) Node is powered off via ACPI.
5) Shaman detects that node is offline
6) Shaman registers CTs to new node.
7) Shaman don't need to start them as they were stopped/suspended on old


6. Cấu hình Shaman




Hello,

There are several values you can configure:

LOCK_TIMEOUT=seconds
Sets the timeout for shaman-monitor operations (e.g., electing a new master or deciding that a slave node is down). This helps you avoid situations when shaman-monitor performs a cluster-related operation if someone pulls out the network cable for just a couple of seconds. Keep this parameter in mind when deciding on other shaman-monitor timeouts (see their description below) because the value of LOCK_TIMEOUT is always added to the value of other timeouts. The default value is 60 seconds.

LEASE_CHECK_TIMEOUT_FOR_MASTER=seconds
Sets the timeout for electing a new master node when the original master node or the shaman-monitor daemon fails, or high availability support gets disabled. The default value is 10 seconds.

LEASE_CHECK_TIMEOUT_FOR_SLAVE=seconds
Sets the timeout after which the master node will consider a slave node dead if this node and the shaman-monitor daemon get down, or high availability support gets disabled. The default value is 10 seconds.

POOL_CHECK_TIMEOUT=seconds
Sets the interval for shaman-monitor to check Pool for the resources scheduled for relocation. The default value is 30 seconds.


The values can be configured the following way:

# shaman -c cluster_name set-config key=value

For more information you can run

# man shaman.conf


7. Tính năng Failback trên PCS
PDRS service is failback service.
In order to disable or enable failback function you can just stop hoặc start this service
# service pdrsd stop
It may be also useful to disable it from autostart:
# chkconfig pdrsd off

  Trả lời ngay kèm theo trích dẫn này
Gửi trả lời


Công Cụ
Xếp Bài

Quyền Hạn Của Bạn
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is Mở
Hình Cảm xúc đang Mở
[IMG] đang Mở
Mã HTML đang Tắt




Bây giờ là 06:32 PM. Giờ GMT +7



Diễn đàn tin học QuantriNet
quantrinet.com | quantrimang.co.cc
Founded by Trương Văn Phương | Developed by QuantriNet's members.
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.