drserver.net - 2018-08-09发生的交换机故障和VPS坏盘事件

给用户带来不便和不愉快,对不起。

事件一:在2018-08-09 11:30 分左右,有一个用户反馈机子间歇无法连接,说从IPMI曾看到机子处于关机状态。16:47分,发现dcim面板无法访问,丢包率95%以上。陆续有7~8个用户反馈服务器无法连接,但有的用户服务器正常。排除电力和散热因素后,管理员重启了交换机,之后受影响的机子恢复网络访问。从其中一台受影响的机子运行时间来看,“断网”时间约为五个半小时。

switch-error-1.png

事件二:在2018-08-09 16:40 分左右,管理员发现VPS母机磁盘IO报错。等处理好当天发生的交换机故障后,机房工作人员在2018-08-10 00:39 确认原磁盘(至少2个)故障,阵列无法重建数据,受影响的VPS用户数据丢失。受影响的VPS用户可申请退款(最近一次付款)或使用新建同配置的VPS且延长一个月使用期。

vps-node-disk-error.jpg

原文:https://portal.drserver.net/?/news/view/1/downtime-in-dallas-unexpected---completed-/

drserver.net - 制作Windows 10系统的dd包 - 含网卡和设置静态IP

环境:drserver.net 超微主板的凌动服务器($20.00);Windows 10安装ISO文件;Dism++;7-zip;网卡驱动文件;DeployVHD

思路:

1.下载好Windows 10安装ISO文件,如 cn_windows_10_business_edition_version_1803_updated_jul_2018_x64_dvd_12613133.iso

2.按“蜂鸣器”博客里提到的方法,通过Dism++制作好包含“intel ethernet connection I354 2.5 gbe backplane”网卡驱动的映像文件,将映像文件释放到vhd
dd-windows10-3.png

3.通过DeployVHD,应用无人值守配置文件Unattend.xml,启用远程桌面,且允许通过Windows防火墙,设置管理员administrator的密码,设置自动登录,设置“以太网”的网卡静态IP。如果是设置为中文语言的,需要留意/Windows/panther/Unattend.xml的文件内容,因为汉字的网卡名称可能会保存异常,否则可能在安装时会提示无人值守文件检查失败
dd-windows10-2.png

4.压缩包含有无人值守安装设置的vhd文件。在机子上安装测试,通过
dd-windows10-1.png

/Windows/panther/Unattend.xml 文件内容:

<?xml version="1.0" encoding="utf-8"?>
<unattend xmlns="urn:schemas-microsoft-com:unattend">
    <settings pass="specialize">
        <component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
        </component>
        <component name="Microsoft-Windows-TerminalServices-LocalSessionManager" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
            <fDenyTSConnections>false</fDenyTSConnections>
        </component>
        <component name="Microsoft-Windows-TerminalServices-RDP-WinStationExtensions" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
            <UserAuthentication>0</UserAuthentication>
        </component>
        <component name="Networking-MPSSVC-Svc" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
            <FirewallGroups>
                <FirewallGroup wcm:action="add" wcm:keyValue="RemoteDesktop">
                    <Group>@FirewallAPI.dll,-28752</Group>
                    <Profile>all</Profile>
                    <Active>true</Active>
                </FirewallGroup>
            </FirewallGroups>
        </component>
    </settings>
    <settings pass="oobeSystem">
        <component name="Microsoft-Windows-International-Core" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
            <InputLocale>007f:00000804</InputLocale>
            <SystemLocale>zh-CN</SystemLocale>
            <UILanguage>zh-CN</UILanguage>
            <UILanguageFallback>zh-CN</UILanguageFallback>
            <UserLocale>zh-CN</UserLocale>
        </component>
        <component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
            <AutoLogon>
                <Password>
                    <Value>xinNIANhao2019</Value>
                    <PlainText>true</PlainText>
                </Password>
                    <Enabled>true</Enabled>
                    <LogonCount>5</LogonCount> 
                <Username>Administrator</Username>
            </AutoLogon>
            <FirstLogonCommands>
                <SynchronousCommand wcm:action="add">
                    <CommandLine>powershell.exe Get-NetAdapter -Name *  | ? status -eq up | Rename-NetAdapter -NewName "iEtherNet"</CommandLine>
                    <Description>rename nic name</Description>
                    <Order>1</Order>
                </SynchronousCommand>
                <SynchronousCommand wcm:action="add">
                    <CommandLine>powershell.exe New-NetIPAddress -IPAddress "144.172.126.32" -InterfaceAlias "iEtherNet" -PrefixLength 24 -DefaultGateway 144.172.126.1</CommandLine>
                    <Description>set static ip address</Description>
                    <Order>2</Order>
                </SynchronousCommand>
                <SynchronousCommand wcm:action="add">
                    <CommandLine>powershell.exe Set-DnsClientServerAddress -InterfaceAlias "iEtherNet" -ServerAddresses 8.8.8.8</CommandLine>
                    <Description>set dns server</Description>
                    <Order>3</Order>
                </SynchronousCommand>                                 
            </FirstLogonCommands>
            <UserAccounts>
                <AdministratorPassword>
                    <Value>xinNIANhao2019</Value>
                    <PlainText>true</PlainText>
                </AdministratorPassword>
            </UserAccounts>
            <OOBE>
                <HideEULAPage>true</HideEULAPage>
                <SkipMachineOOBE>true</SkipMachineOOBE>
            </OOBE>
            <TimeZone>China Standard Time</TimeZone>
        </component>
    </settings>
    <cpi:offlineImage cpi:source="catalog:d:/temp/install_windows server 2012 r2 serverdatacenter.clg" xmlns:cpi="urn:schemas-microsoft-com:cpi" />
</unattend>

参考:

drserver.net - 为dcim控制面板切换到中文语言显示

drserver.net 使用 dcimanager 来管理设备。切换中文显示操作过程如下:

1.浏览器打开 https://dedicated.drserver.net:1500/dcimgr ,输入用户名和密码,在 Language 里下拉,选择“中文(简体)”,点击 Log in 登录
change-dcim-language-1.png

2.这里主要翻译了3个菜单内容,“服务器”、“ISO镜像文件”和“用户设置”。下图显示的是“概览”显示效果
change-dcim-language-2.png

3.“服务器”显示效果
change-dcim-language-3.png

4.“服务器操作项”显示效果
change-dcim-language-4.png

5.“用户设置”显示效果
change-dcim-language-5.png

6.“ISO镜像文件”显示效果
change-dcim-language-6.png

如果想完善翻译,可以通过 https://doc.ispsystem.com/index.php/How_to_add_a_new_language_to_control_panel 介绍的方法来自己翻译。

可根据英文的原文件来复制,翻译。主要是两个文件:

a. /usr/local/mgr5/etc/xml/core_msg_cn.xml - 详细内容在这里
b. /usr/local/mgr5/etc/xml/dcimgr_msg_cn.xml - 详细内容在这里

在CentOS7里修改宝塔面板的登录端口

默认,安装宝塔面板后,登录端口是8888。阿里云境内的ECS实例安全组规则,默认开放了tcp 3389和tcp 22等端口。如果不想增加8888的访问规则,可尝试更改宝塔的登录端口为tcp 3389。

环境:阿里云境内ECS实例,CentOS7系统,宝塔面板。

过程:

1.确认ECS实例安全组规则,有允许外网访问3389的规则内容
bt-port-01.png

2.echo '3389' > /www/server/panel/data/port.pl && service bt restart # 将宝塔面板的登录端口修改为3389,同时重启面板生效
bt-port-02.png

3.firewall-cmd --zone=public --add-port=3389/tcp --permanent # 如果默认使用firewalld的系统防火墙,还需要允许外网访问3389端口

4.之后,就可以在浏览器里登录宝塔面板了
bt-port-03.png

参考:

drserver.net - 在CentOS里用package-cleanup移除旧内核

测试一个网上的CentOS 7 dd系统镜像,默认/boot分区200M,yum update后,使用了92%,仅剩约15M可用空间了,但可以使用package-cleanup来清除一些旧的,不再使用的内核文件。

过程:

1.df -h # 查看,当前 /boot 分区仅15M可用空间
boot-partition-1.png

2.uname -a # 查看,当前使用的内核; rpm -q kernel # 查看,系统中可用的内核
boot-partition-2.png

3.ls -lha /boot # 查看,当前 /boot 分区的文件和大小情况
boot-partition-3.png

4.yum install yum-utils # 安装 yum 工具
boot-partition-4.png

5.package-cleanup --oldkernels --count=2 # 保留两个内核,其它自动移除
boot-partition-5.png

6.df -h # 再次查看,当前 /boot 分区有31M可用空间(好象腾出的空间并不是很多,哈哈)
boot-partition-6.png

参考: