Switch operation in case of power failure in the IDC of medium-sized enterprises

Source: Internet
Author: User

When a power outage occurs in a medium-sized enterprise data center, what is a power switch? What is a medium-sized data center? The number of servers is more than 100, and the number of servers is less than 1000. Why do enterprises have to worry about power outages? The self-built IDC of medium-sized enterprises cannot have such high redundancy as IDC, so it is inevitable that there will be a power outage.
The Shenzhen Software Park and Chengdu Tianfu Software Park encountered a power outage at least twice a year. What should IT do if there is a power outage? Www.2cto.com some people will say that I have UPS, generators, first of all, UPS general enterprises will not buy such a large capacity for you to use a day, then even if the machine
Is the room powered? Is the air-conditioner in the IDC supported by UPS? Let's not talk about generators much. If you have money to build them and you have money to burn oil, let's talk about it. okay. After explaining why there is a power outage, let's talk about IT shutdown and power-on operations. (what else can we talk about? Just close it, huh?
Let me explain it in detail. For example, enterprises generally have windows Linux servers. How can we quickly shut down these servers?
(How long does your UPS support? How long can the temperature of your air conditioner remain below 30 degrees after it is stopped ?) So here we will solve this problem. 1. The shutdown process refers to the process of regulating what the equipment in your data room should be shut down first. If a small number of servers need
To supplement the need for intermittent jobs, it should also be shut down in stages. In general: www.2cto.com a, not commonly used OARD server, there is a clust server, for example, DHCP, Dns, Print, Antivirus, IAS, etc.
And one of HA, such as ad dc, B, all servers except AD DC, NIS ,....... C, ad dc, NIS, server d, VM esxi, f, Sotrage (DAS, NAS) to be manually disabled), Type Library, PBX, Network device, KVM g, UPS 2, shutdown script and check a, Windows server windows server is easier to use shutdown, shutdown-m \ x. x. x. repeat these commands with x-f-t 00. When executing this command, you need to have the admin permission on all involved machines. It is best to log on to
Run the script on the AD. For some machines that do not have a join domain, use net use \ x. xipc $ password/user: username first.
After obtaining the permission, run the shutdown command. B. Linux www.2cto.com Method 1: For the ssh key logon method that is relatively simple, the ssh key password-free method is used to allow nis1 to log on to nis2 to generate the key file [root @ nis1. ssh] # ssh-keygen-t rsa -------------> Generate the key file id_rsa.pubGenerating public/private rsa key pair. enter file in which to save the key (/root /. ssh/id_rsa): Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in/root /. ssh/id_rsa.Your public key has been saved in/root /. ssh/id_rsa.pub.The key fingerprint is: b8: d9: 97: 26: 74: a3: 0f: 65: 0a: 99: 3f: 91: af: ec: 17: e3 root @ nis1 [root @ nis1. ssh] # lsauthorized_keys id_rsa id_rsa.pub known_hosts [root @ nis1. ssh] # more id_rsa.pubssh-rsa guest + GuZLNDUo
Bytes
A3d + t/XSAjjTdRLQAFOVqDgBmDObiMltiKoKhSF/samples/bQ6JGAYCqPTbfd4DIE7D8h +
Sources = root @ nis1 append id_rsa.pub content to/root/. ssh/authorized_keys of nis2 [root @ nis1 ~] # Scp id_rsa.pub root @ nis2:/root/. ssh/root @ nis2 :~ /. Ssh # cat id_rsa.pub> authorized_keys root @ nis2 :~ /. Ssh # more authorized_keys ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAAgQCOPnxdx4VDXGg + iACbjK7Vf9EgEs4eue2TCJxFrb8
DDZpB1xdgtuYx + Memory + lnC5MwZHIwFYTAMuVRN6/rzVApTqN18bG9/jQgDtYPUwKnS3l1EQps64i + 4E
7 bwdoyKmzOzzyQ = ssh-rsa restart + GuZLNDUo
Release + t/XSAjjTd
RLQAFOVqDgBmDObiMltiKoKhSF/queues // bQ6JGAYCqPTbfd4DIE7D8h + 9WFt3yu1PaKb142ekmr1
Token = root @ nis1root @ nis2 :~ /. Ssh # in this way, you can use nis1 to log on to nis2 without a password. www.2cto.com can find a machine, preferably NIS. you can log on to all linux machines without a password, * NIS1 # more shutdown. sh #! /Bin/sh for I in 'awk' {print $1} 'iplist' do echo $ issh $ I "shutdown-h now" done ×××××××× * [NIS1] # more iplist * * 1. 1.1.11.1.1.2 ×××××××××××××××××××××××××××××××× Method 2: several files required for Logon using username and password [NIS1] # lslog. sh ping. sh shutdown. sh iplist [NIS1] # more shutdown. sh xxx #! /Bin/bash for I in 'cat iplist' do N1 = 'echo $ I | awk-F: '{print $1}' 'n2 = 'echo $ I | awk-F: '{print $2}' 'n3 = 'echo $ I | awk-F: '{print $3}' 'echo $1 echo $2 echo $3 analyze CT log. sh $ N1 $ N2 $ N3done ××××××××××××××××××××××××××××××××× [NIS1] # more log. sh xxx #! /Usr/bin/expectset ip [lindex $ argv 0] set user [lindex $ argv 1] set passwd [lindex $ argv 2] set timeout 5 spawn ssh $ user @ $ ipshortct {sleep 2 "* (yes/no )? "{Send" yesr "; exp_continue} sleep 2" password: "{send" $ passwdr "}}your CT {sleep 2" # "{send" shutdown-h nowr "}}your CT {sleep 2" # "{send" exitr "}} exitaskct eofexit ×××××××××××××××××××××××××××××× [NIS1] # more iplist × * 1. 1.1.1: root: password: 1.1.1.2: root: password: ××××××××××××××××××××××××××××××××× test: ping to check whether the server is shut down [NIS1] # more ping. sh xxx #! /Bin/bashfor I in 'cat iplist' do # echo $ I N1 = 'echo $ I | awk-F: '{print $1}' 'echo $1 pin_test = 'Ping-c 4 $ N1 | grep ttl | wc-l' if [$ pin_test-gt 2] then echo $ N1 "is up" else echo $ N1 "is down" fidone xxx ××××the above is the linux shutdown script in 2, you can see which one is suitable for use. I suggest using the first one. The larger the Enterprise,
The more you need to standardize, the more you need to pay attention to speed. 3. The Boot Process is basically the shutdown process. In turn, a, UPS B, Network device, KVMc, Sotrage (DAS, NAS), Type Library, PBXd, ad dc, NIS, e, windows terminal license server or other license serverf, all remaining servers 4. Check the startup carefully, it is basically a step-by-step check in the boot process to ensure that each problem is ongoing. Finally, check various services, such as whether the client can obtain the IP address, access the Internet, print, send and receive mail, and so on.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.