<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>xuun&#039;s blog &#187; 关于互联网IT</title>
	<atom:link href="http://xuun.net/category/about-it/feed/" rel="self" type="application/rss+xml" />
	<link>http://xuun.net</link>
	<description>Nerazzurri</description>
	<lastBuildDate>Mon, 27 Feb 2012 06:06:37 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>天天收到Paypal钓鱼邮件：Your account has been limited until we hear from you</title>
		<link>http://xuun.net/2012/02/27/your-account-has-been-limited-until-we-hear-from-you/</link>
		<comments>http://xuun.net/2012/02/27/your-account-has-been-limited-until-we-hear-from-you/#comments</comments>
		<pubDate>Mon, 27 Feb 2012 06:06:37 +0000</pubDate>
		<dc:creator>Xuun</dc:creator>
				<category><![CDATA[关于互联网IT]]></category>

		<guid isPermaLink="false">http://xuun.net/?p=1460</guid>
		<description><![CDATA[第一次看了，差点上当！]]></description>
			<content:encoded><![CDATA[<p>第一次看了，差点上当！</p>
]]></content:encoded>
			<wfw:commentRss>http://xuun.net/2012/02/27/your-account-has-been-limited-until-we-hear-from-you/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
		<item>
		<title>VPS命令备忘 老鸟请无视</title>
		<link>http://xuun.net/2010/03/09/vps-note/</link>
		<comments>http://xuun.net/2010/03/09/vps-note/#comments</comments>
		<pubDate>Tue, 09 Mar 2010 02:45:38 +0000</pubDate>
		<dc:creator>Xuun</dc:creator>
				<category><![CDATA[关于互联网IT]]></category>

		<guid isPermaLink="false">http://xuun.net/?p=1319</guid>
		<description><![CDATA[配置80端口 看了好几个页面内容都有错，下面是正确方法： #/sbin/iptables -I INPUT -p tcp &#8211;dport 80 -j ACCEPT #/sbin/iptables -I INPUT -p tcp &#8211;dport 22 -j ACCEPT 然 后保存： #/etc/rc.d/init.d/iptables save 再查看是否已经有了： [root@vcentos ~]# /etc/init.d/iptables status Table: filter Chain INPUT (policy ACCEPT) num  target     prot opt source               destination 1    ACCEPT     udp  &#8211;  0.0.0.0/0            0.0.0.0/0           udp dpt:80 2    ACCEPT     tcp  &#8211;  0.0.0.0/0            0.0.0.0/0           [...]]]></description>
			<content:encoded><![CDATA[<p>配置80端口</p>
<p>看了好几个页面内容都有错，下面是正确方法：<br />
#/sbin/iptables -I INPUT -p tcp &#8211;dport 80 -j  ACCEPT<br />
#/sbin/iptables -I INPUT -p tcp &#8211;dport 22 -j ACCEPT</p>
<p>然 后保存：<br />
#/etc/rc.d/init.d/iptables save</p>
<p>再查看是否已经有了：<br />
[root@vcentos  ~]# /etc/init.d/iptables status<br />
Table: filter<br />
Chain INPUT  (policy ACCEPT)<br />
num  target     prot opt source                destination<br />
1    ACCEPT     udp  &#8211;  0.0.0.0/0             0.0.0.0/0           udp dpt:80<br />
2    ACCEPT     tcp  &#8211;   0.0.0.0/0            0.0.0.0/0           tcp dpt:80<br />
3     RH-Firewall-1-INPUT  all  &#8211;  0.0.0.0/0            0.0.0.0/0</p>
<p>Chain  FORWARD (policy ACCEPT)<br />
num  target     prot opt  source               destination<br />
1    RH-Firewall-1-INPUT   all  &#8211;  0.0.0.0/0            0.0.0.0/0</p>
<p>==============================================================</p>
<p>Centos常用配置文件:</p>
<p>(1)/etc/profile ,系统级的环境变量和启动程序配置,修改后对所有用户都有效</p>
<p>(2)/etc/rc.local ，这个脚本将在开机启动的时候，自动运行，可放置一些需要每次开机自启动的程序如tomcat,mysql,oracle</p>
<p>这个在opensuse中 对应的是/etc/init.d/boot.local这个文件</p>
<p>租用的经常是国外的服务器,需要调整时区并调整时间.当然方法有很多种,我说说我经常用,而且是最简单的方法吧.</p>
<p>    cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime</p>
<p>    ntpdate us.pool.ntp.org</p>
<p>很简单吧,解析一下,第一句是把当前时区调整为上海就是+8区,想改其他时区也可以去看看/usr/share/zoneinfo目录;然后第二句是利用ntpdate同步标准时间.</p>
<p>没有ntpdate的可以yum一下:</p>
<p>    yum install -y ntpdate</p>
<p>编辑/etc/sysconfig/i18n，修改“LANG=”zh_CN.UTF-8&#8243;”</p>
]]></content:encoded>
			<wfw:commentRss>http://xuun.net/2010/03/09/vps-note/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Centos(Linux)操作系统下使用MegaCli等工具查看Raid磁盘阵列状态</title>
		<link>http://xuun.net/2009/12/20/check-raid-status-by-megacli/</link>
		<comments>http://xuun.net/2009/12/20/check-raid-status-by-megacli/#comments</comments>
		<pubDate>Sun, 20 Dec 2009 03:42:03 +0000</pubDate>
		<dc:creator>Xuun</dc:creator>
				<category><![CDATA[关于互联网IT]]></category>
		<category><![CDATA[MegaCli]]></category>
		<category><![CDATA[raid]]></category>

		<guid isPermaLink="false">http://xuun.net/?p=1285</guid>
		<description><![CDATA[以下是组建服务器raid时查到的资料，做下笔记，没兴趣的朋友请无视。 Linux下查看软、硬raid信息的方法。 软件raid：只能通过Linux系统本身来查看 cat /proc/mdstat 可以看到raid级别，状态等信息。 硬件raid： 最佳的办法是通过已安装的raid厂商的管理工具来查看，有cmdline，也有图形界面。如Adaptec公司的硬件卡就可以通过下面的命令进行查看： # /usr/dpt/raidutil -L all 可以看到非常详细的信息。 当然更多情况是没有安装相应的管理工具，只能依靠Linux本身的话一般我知道的是两种方式： # dmesg &#124;grep -i raid # cat /proc/scsi/scsi 显示的信息差不多，raid的厂商，型号，级别，但无法查看各块硬盘的信息。 另外经过实际测试，Dell的服务器可以通过命令来显示，而HP、IBM等的服务器通过上面的命令是显示不出的。只能够通过装硬件厂商的管理工具来查看DELL的BMC可以查看 cat /proc/scsi/scsi 可以看到是SCSI上的设备。一般情况可以看到RAID级别。lspci可以看到RAID卡的型号。 ========================================================== rpm -ivh MegaCli-1.01.09-0.i386.rpm 命令使用： MegaCli -LDInfo -Lall -aALL 查raid级别 MegaCli -AdpAllInfo -aALL 查raid卡信息 MegaCli -PDList -aALL 查看硬盘信息 MegaCli -AdpBbuCmd -aAll 查看电池信息 MegaCli -FwTermLog -Dsply -aALL 查看raid卡日志 MegaCli常用参数介绍 [...]]]></description>
			<content:encoded><![CDATA[<div class="g_blog_list">
<div id="blogtext_fks_083066087080086070082085080095087083085067086082095070" class="g_t_center g_c_pdin g_p_center c07 content">
<div class="ns_content">
<p>以下是组建服务器raid时查到的资料，做下笔记，没兴趣的朋友请无视。</p>
<p>Linux下查看软、硬raid信息的方法。</p>
<p>软件raid：只能通过Linux系统本身来查看</p>
<p>cat /proc/mdstat</p>
<p>可以看到raid级别，状态等信息。</p>
<p>硬件raid： 最佳的办法是通过已安装的raid厂商的管理工具来查看，有cmdline，也有图形界面。如Adaptec公司的硬件卡就可以通过下面的命令进行查看：</p>
<p># /usr/dpt/raidutil -L all</p>
<p>可以看到非常详细的信息。</p>
<p>当然更多情况是没有安装相应的管理工具，只能依靠Linux本身的话一般我知道的是两种方式：</p>
<p># dmesg |grep -i raid</p>
<p># cat /proc/scsi/scsi</p>
<p>显示的信息差不多，raid的厂商，型号，级别，但无法查看各块硬盘的信息。</p>
<p>另外经过实际测试，Dell的服务器可以通过命令来显示，而HP、IBM等的服务器通过上面的命令是显示不出的。只能够通过装硬件厂商的管理工具来查看DELL的BMC可以查看</p>
<p>cat /proc/scsi/scsi</p>
<p>可以看到是SCSI上的设备。一般情况可以看到RAID级别。lspci可以看到RAID卡的型号。<span id="more-1285"></span></p>
<p>==========================================================</p>
</div>
</div>
</div>
<p>rpm -ivh MegaCli-1.01.09-0.i386.rpm</p>
<p>命令使用：<br />
MegaCli -LDInfo -Lall -aALL  查raid级别<br />
MegaCli -AdpAllInfo -aALL 查raid卡信息<br />
MegaCli -PDList -aALL  查看硬盘信息<br />
MegaCli -AdpBbuCmd -aAll 查看电池信息<br />
MegaCli -FwTermLog -Dsply -aALL  查看raid卡日志</p>
<p><strong>MegaCli常用参数介绍</strong><br />
MegaCli -adpCount 【显示适配器个数】<br />
MegaCli -AdpGetTime –aALL 【显示适配器时间】<br />
MegaCli -AdpAllInfo -aAll     【显示所有适配器信息】<br />
MegaCli -LDInfo -LALL -aAll    【显示所有逻辑磁盘组信息】<br />
MegaCli -PDList -aAll    【显示所有的物理信息】<br />
MegaCli -AdpBbuCmd -GetBbuStatus -aALL |grep ‘Charger Status’ 【查看充电状态】<br />
MegaCli -AdpBbuCmd -GetBbuStatus -aALL【显示BBU状态信息】<br />
MegaCli -AdpBbuCmd -GetBbuCapacityInfo -aALL【显示BBU容量信息】<br />
MegaCli -AdpBbuCmd -GetBbuDesignInfo -aALL    【显示BBU设计参数】<br />
MegaCli -AdpBbuCmd -GetBbuProperties -aALL    【显示当前BBU属性】<br />
MegaCli -cfgdsply -aALL    【显示Raid卡型号，Raid设置，Disk相关信息】</p>
<p><strong>磁带状态的变化，从拔盘，到插盘的过程中。</strong><br />
Device         |Normal|Damage|Rebuild|Normal<br />
Virtual Drive     |Optimal|Degraded|Degraded|Optimal<br />
Physical Drive     |Online|Failed –&gt; Unconfigured|Rebuild|Online</p>
<p>============================================</p>
<p>MegaCli 常见用法<br />
2008-10-24 09:32<br />
1、准备</p>
<p>新版本的 MegaCli-1.01.24-0.i386.rpm 会把程序安装在/opt下，可以自定义安装目录，例如：</p>
<p>rpm &#8211;relocate /opt/=/usr/sbin/ -i MegaCli-1.01.24-0.i386.rpm</p>
<p>即把安装目录 /opt 替换成 /usr/sbin。<br />
查看所有物理磁盘信息</p>
<p>MegaCli -PDList -aALL</p>
<p>Adapter #0</p>
<p>Enclosure Number: 1<br />
Slot Number: 5<br />
Device Id: 5<br />
Sequence Number: 2<br />
Media Error Count: 0<br />
Other Error Count: 0<br />
Predictive Failure Count: 0<br />
Last Predictive Failure Event Seq Number: 0<br />
Raw Size: 140014MB [0x11177328 Sectors]<br />
Non Coerced Size: 139502MB [0x11077328 Sectors]<br />
Coerced Size: 139392MB [0x11040000 Sectors]<br />
Firmware state: Hotspare<br />
SAS Address(0): 0x5000c50008e5cca9<br />
SAS Address(1): 0&#215;0<br />
Inquiry Data: SEAGATE ST3146855SS     S5273LN4Y1X0<br />
&#8230;..</p>
<p>2、查看磁盘缓存策略</p>
<p>MegaCli -LDGetProp -Cache -L0 -a0</p>
<p>Adapter 0-VD 0: Cache Policy:WriteBack, ReadAheadNone, Direct</p>
<p>or</p>
<p>MegaCli -LDGetProp -Cache -L1 -a0</p>
<p>Adapter 0-VD 1: Cache Policy:WriteBack, ReadAheadNone, Direct</p>
<p>or</p>
<p>MegaCli -LDGetProp -Cache -LALL -a0</p>
<p>Adapter 0-VD 0: Cache Policy:WriteBack, ReadAheadNone, Direct<br />
Adapter 0-VD 1: Cache Policy:WriteBack, ReadAheadNone, Direct</p>
<p>or</p>
<p>MegaCli -LDGetProp -Cache -LALL -aALL</p>
<p>Adapter 0-VD 0: Cache Policy:WriteBack, ReadAheadNone, Direct<br />
Adapter 0-VD 1: Cache Policy:WriteBack, ReadAheadNone, Direct</p>
<p>or</p>
<p>MegaCli -LDGetProp -DskCache -LALL -aALL</p>
<p>Adapter 0-VD 0: Disk Write Cache : Disk&#8217;s Default<br />
Adapter 0-VD 1: Disk Write Cache : Disk&#8217;s Default</p>
<p>3、设置磁盘缓存策略</p>
<p>缓存策略解释：</p>
<p>WT    (Write through<br />
WB    (Write back)<br />
NORA  (No read ahead)<br />
RA    (Read ahead)<br />
ADRA  (Adaptive read ahead)<br />
Cached<br />
Direct</p>
<p>例子：</p>
<p>MegaCli -LDSetProp WT|WB|NORA|RA|ADRA -L0 -a0</p>
<p>or</p>
<p>MegaCli -LDSetProp -Cached|-Direct -L0 -a0</p>
<p>or</p>
<p>enable / disable disk cache</p>
<p>MegaCli -LDSetProp -EnDskCache|-DisDskCache -L0 -a0</p>
<p>4、创建/删除 阵列<br />
4.1 创建一个 raid5 阵列，由物理盘 2,3,4 构成，该阵列的热备盘是物理盘 5</p>
<p>MegaCli -CfgLdAdd -r5 [1:2,1:3,1:4] WB Direct -Hsp[1:5] -a0</p>
<p>4.2 创建阵列，不指定热备</p>
<p>MegaCli -CfgLdAdd -r5 [1:2,1:3,1:4] WB Direct -a0</p>
<p>4.3 删除阵列</p>
<p>MegaCli -CfgLdDel -L1 -a0</p>
<p>4.4 在线添加磁盘</p>
<p>MegaCli -LDRecon -Start -r5 -Add -PhysDrv[1:4] -L1 -a0</p>
<p>意思是，重建逻辑磁盘组1，raid级别是5，添加物理磁盘号：1:4。重建完后，新添加的物理磁盘会自动处于重建(同步)状态，这个 时候 fdisk -l是看不到阵列的空间变大的，只有在系统重启后才能看见。如果该阵列下只有一个分区的话，那么该分区也直接增大，如果有多个分区，不知道该怎么分配新增空间了？有空试试看，呵呵<br />
5、查看阵列初始化信息<br />
5.1 阵列创建完后，会有一个初始化同步块的过程，可以看看其进度。</p>
<p>MegaCli -LDInit -ShowProg -LALL -aALL</p>
<p>或者以动态可视化文字界面显示</p>
<p>MegaCli -LDInit -ProgDsply -LALL -aALL</p>
<p>5.2 查看阵列后台初始化进度</p>
<p>MegaCli -LDBI -ShowProg -LALL -aALL</p>
<p>或者以动态可视化文字界面显示</p>
<p>MegaCli -LDBI -ProgDsply -LALL -aALL</p>
<p>6、创建全局热备</p>
<p>指定第 5 块盘作为全局热备</p>
<p>MegaCli -PDHSP -Set [-EnclAffinity] [-nonRevertible] -PhysDrv[1:5] -a0</p>
<p>也可以指定为某个阵列的专用热备</p>
<p>MegaCli -PDHSP -Set [-Dedicated [-Array1]] [-EnclAffinity] [-nonRevertible] -PhysDrv[1:5] -a0</p>
<p>7、删除全局热备</p>
<p>MegaCli -PDHSP -Rmv -PhysDrv[1:5] -a0</p>
<p>8、将某块物理盘下线/上线</p>
<p>MegaCli -PDOffline -PhysDrv [1:4] -a0</p>
<p>MegaCli -PDOnline -PhysDrv [1:4] -a0</p>
<p>9、查看物理磁盘重建进度</p>
<p>MegaCli -PDRbld -ShowProg -PhysDrv [1:5] -a0</p>
<p>或者以动态可视化文字界面显示</p>
<p>MegaCli -PDRbld -ProgDsply -PhysDrv [1:5] -a0</p>
<p>下载地址： http://gcolpart.evolix.net/debian/misc/dell/MegaCli-1.01.24-0.i386.rpm</p>
<p>=============================================</p>
<p>Dell 各系列的机器，只要是 PERC 的RAID控制器，都可以用 MegaRC 这个命令行工具来检测</p>
<p>MegaRC for Windows</p>
<p>http://www.lsi.com/files/support/rsa/utilities/megaconf/ut_win_megarc_1.10.zip</p>
<p>解压缩后，就是 megarc.exe</p>
<p>MegaRC for Linux</p>
<p>http://www.lsi.com/files/support/rsa/utilities/megaconf/ut_linux_megarc_1.11.zip</p>
<p>用 unzip 解压缩出来后，再 chmod 700 megarc*</p>
<p>Windows 和 Linux 下的参数都一样：</p>
<p>megarc -dispcfg -a0<br />
./megarc -dispcfg -a0</p>
<p>输出结果如下：</p>
<p>Logical Drive : 0( Adapter: 0 ): Status: OPTIMAL<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
SpanDepth :01      RaidLevel: 5 RdAhead : Adaptive Cache<br />
StripSz    :064KB    Stripes : 4 WrPolicy: WriteBack</p>
<p>Logical Drive 0 : SpanLevel_0 Disks<br />
Chnl Target StartBlock    Blocks       Physical Target St<br />
&#8212;- &#8212;&#8212; &#8212;&#8212;&#8212;-    &#8212;&#8212;       &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
0       00     0&#215;00000000    0x0887c000    ONLINE<br />
0       01     0&#215;00000000    0x0887c000    ONLINE<br />
0       02     0&#215;00000000    0x0887c000    ONLINE<br />
0       03     0&#215;00000000    0x0887c000    ONLINE</p>
<p>如果想要通过图形界面来查看，必须装那个大家伙了： Dell OpenManage Server Administrator<br />
Linux下有90多M，Win下的有100多M。</p>
<p>Dell 在 Linux 下还有一个更好的工具：raidmon (for win 的目前还没发现)</p>
<p>目前支持 IDE / EIDE, SCSI RAID: LSI Logic CERC ATA 100, PERC 4/DC, PERC 4/Di, PERC 4/SC, LSI Logic (formerly AMI) PERC3/DC, PERC3/DCL, PERC3/QC, PERC3/SC</p>
<p>perc-cerc-apps-6.03-A06.tar.gz</p>
<p>http://support.dell.com/support/downloads/download.aspx?c=us&#038;l=en&#038;s=gen&#038;releaseid=R71524&#038;formatcnt=2&#038;fileid=92846</p>
<p>解包下来后，有个 Megamon-4.0-0a.i386.rpm</p>
<p>安装结束后 /etc/init.d/raidmon start</p>
<p># tail -f /var/log/megaserv.log 就可以看到检测报告。有问题的时候，此log中会有体现。</p>
<p>还可以编辑 /etc/megamon.conf ，将管理员的信箱加在文件末尾，这样检测到错误的时候，会自动发送邮件。<br />
(mail.35.cn 好象当成垃圾邮件过滤掉了)</p>
<p>因此建议 megarc(手工) 配合 raidmon(自动) 是个比较好的解决方案。</p>
<p>Dell 1950 的 PERC 5/i SAS RAID 控制器用这个命令行工具：</p>
<p>MegaCLI for Linux</p>
<p>http://www.lsi.com/support/downloads/megaraid/miscellaneous/Linux_MegaCLI_1.01.24.zip</p>
<p>MegaCLI for Windows</p>
<p>http://www.lsi.com/support/downloads/megaraid/miscellaneous/Windows_MegaCLI_1.01.25.zip</p>
<p># unzip Linux_MegaCLI_1.01.24.zip<br />
# unzip MegaCliLin.zip<br />
# rpm -ivh MegaCli-1.01.24-0.i386.rpm</p>
<p># /opt/MegaCli -CfgDsply -aALL</p>
<p>输出如下：</p>
<p>==============================================================================<br />
Adapter: 0<br />
Product Name: PERC 5/i Integrated<br />
Memory: 256MB<br />
BBU: Present<br />
Serial No: 12345<br />
==============================================================================</p>
<p>RAID Level: Primary-1, Secondary-0, RAID Level Qualifier-0<br />
Size:285568MB<br />
State: Optimal</p>
<p>Physical Disk: 0<br />
Media Error Count: 0<br />
Other Error Count: 0<br />
Firmware state: Online</p>
<p>Physical Disk: 1<br />
Media Error Count: 0<br />
Other Error Count: 0<br />
Firmware state: Online</p>
<div id="_mcePaste" style="overflow: hidden; position: absolute; left: -10000px; top: 42px; width: 1px; height: 1px;">
<div class="tit">MegaCli 常见用法</div>
<div class="date">2008-10-24  09:32</div>
<div id="blog_text" class="cnt">
<h1>1、准备</h1>
<p>新版本的 MegaCli-1.01.24-0.i386.rpm 会把程序安装在/opt下，可以自定义安装目录，例如：</p>
<pre class="plaintext_pre">rpm --relocate /opt/=/usr/sbin/ -i MegaCli-1.01.24-0.i386.rpm</pre>
<p>即把安装目录 /opt 替换成 /usr/sbin。</p>
<h1>查看所有物理磁盘信息</h1>
<pre class="plaintext_pre">MegaCli -PDList -aALL

Adapter #0

Enclosure Number: 1
Slot Number: 5
Device Id: 5
Sequence Number: 2
Media Error Count: 0
Other Error Count: 0
Predictive Failure Count: 0
Last Predictive Failure Event Seq Number: 0
Raw Size: 140014MB [0x11177328 Sectors]
Non Coerced Size: 139502MB [0x11077328 Sectors]
Coerced Size: 139392MB [0x11040000 Sectors]
Firmware state: Hotspare
SAS Address(0): 0x5000c50008e5cca9
SAS Address(1): 0x0
Inquiry Data: SEAGATE ST3146855SS     S5273LN4Y1X0
.....</pre>
<h1>2、查看磁盘缓存策略</h1>
<pre class="plaintext_pre">MegaCli -LDGetProp -Cache -L0 -a0

Adapter 0-VD 0: Cache Policy:WriteBack, ReadAheadNone, Direct</pre>
<p>or</p>
<pre class="plaintext_pre">MegaCli -LDGetProp -Cache -L1 -a0

Adapter 0-VD 1: Cache Policy:WriteBack, ReadAheadNone, Direct</pre>
<p>or</p>
<pre class="plaintext_pre">MegaCli -LDGetProp -Cache -LALL -a0

Adapter 0-VD 0: Cache Policy:WriteBack, ReadAheadNone, Direct
Adapter 0-VD 1: Cache Policy:WriteBack, ReadAheadNone, Direct</pre>
<p>or</p>
<pre class="plaintext_pre">MegaCli -LDGetProp -Cache -LALL -aALL

Adapter 0-VD 0: Cache Policy:WriteBack, ReadAheadNone, Direct
Adapter 0-VD 1: Cache Policy:WriteBack, ReadAheadNone, Direct</pre>
<p>or</p>
<pre class="plaintext_pre">MegaCli -LDGetProp -DskCache -LALL -aALL

Adapter 0-VD 0: Disk Write Cache : Disk's Default
Adapter 0-VD 1: Disk Write Cache : Disk's Default</pre>
<h1>3、设置磁盘缓存策略</h1>
<p>缓存策略解释：</p>
<pre class="plaintext_pre">WT    (Write through
WB    (Write back)
NORA  (No read ahead)
RA    (Read ahead)
ADRA  (Adaptive read ahead)
Cached
Direct</pre>
<p>例子：</p>
<pre class="plaintext_pre">MegaCli -LDSetProp WT|WB|NORA|RA|ADRA -L0 -a0</pre>
<p>or</p>
<pre class="plaintext_pre">MegaCli -LDSetProp -Cached|-Direct -L0 -a0</pre>
<p>or</p>
<p>enable / disable disk cache</p>
<pre class="plaintext_pre">MegaCli -LDSetProp -EnDskCache|-DisDskCache -L0 -a0</pre>
<h1>4、创建/删除 阵列</h1>
<h2>4.1 创建一个 raid5 阵列，由物理盘 2,3,4 构成，该阵列的热备盘是物理盘 5</h2>
<pre class="plaintext_pre">MegaCli -CfgLdAdd -r5 [1:2,1:3,1:4] WB Direct -Hsp[1:5] -a0</pre>
<h2>4.2 创建阵列，不指定热备</h2>
<pre class="plaintext_pre">MegaCli -CfgLdAdd -r5 [1:2,1:3,1:4] WB Direct -a0</pre>
<h2>4.3 删除阵列</h2>
<pre class="plaintext_pre">MegaCli -CfgLdDel -L1 -a0</pre>
<h2>4.4 在线添加磁盘</h2>
<pre class="plaintext_pre">MegaCli -LDRecon -Start -r5 -Add -PhysDrv[1:4] -L1 -a0</pre>
<p>意思是，重建逻辑磁盘组1，raid级别是5，添加物理磁盘号：1:4。重建完后，新添加的物理磁盘会自动处于重建(同步)状态，这个 时候 fdisk -l是看不到阵列的空间变大的，只有在系统重启后才能看见。如果该阵列下只有一个分区的话，那么该分区也直接增大，如果有多个分区，不知道该怎么分配新增 空间了？有空试试看，呵呵</p>
<h1>5、查看阵列初始化信息</h1>
<h2>5.1 阵列创建完后，会有一个初始化同步块的过程，可以看看其进度。</h2>
<pre class="plaintext_pre">MegaCli -LDInit -ShowProg -LALL -aALL</pre>
<p>或者以动态可视化文字界面显示</p>
<pre class="plaintext_pre">MegaCli -LDInit -ProgDsply -LALL -aALL</pre>
<h2>5.2 查看阵列后台初始化进度</h2>
<pre class="plaintext_pre">MegaCli -LDBI -ShowProg -LALL -aALL</pre>
<p>或者以动态可视化文字界面显示</p>
<pre class="plaintext_pre">MegaCli -LDBI -ProgDsply -LALL -aALL</pre>
<h1>6、创建全局热备</h1>
<p>指定第 5 块盘作为全局热备</p>
<pre class="plaintext_pre">MegaCli -PDHSP -Set [-EnclAffinity] [-nonRevertible] -PhysDrv[1:5] -a0</pre>
<p>也可以指定为某个阵列的专用热备</p>
<pre class="plaintext_pre">MegaCli -PDHSP -Set [-Dedicated [-Array1]] [-EnclAffinity] [-nonRevertible] -PhysDrv[1:5] -a0</pre>
<h1>7、删除全局热备</h1>
<pre class="plaintext_pre">MegaCli -PDHSP -Rmv -PhysDrv[1:5] -a0</pre>
<h1>8、将某块物理盘下线/上线</h1>
<pre class="plaintext_pre">MegaCli -PDOffline -PhysDrv [1:4] -a0</pre>
<pre class="plaintext_pre">MegaCli -PDOnline -PhysDrv [1:4] -a0</pre>
<h1>9、查看物理磁盘重建进度</h1>
<pre class="plaintext_pre">MegaCli -PDRbld -ShowProg -PhysDrv [1:5] -a0</pre>
<p>或者以动态可视化文字界面显示</p>
<pre class="plaintext_pre">MegaCli -PDRbld -ProgDsply -PhysDrv [1:5] -a0

<span style="font-size: small;"><strong><span style="color: #ff0000;">下载地址： http://gcolpart.evolix.net/debian/misc/dell/MegaCli-1.01.24-0.i386.rpm</span></strong></span></pre>
</div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://xuun.net/2009/12/20/check-raid-status-by-megacli/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>在Centos5.4(RHEL5)上安装Raid驱动</title>
		<link>http://xuun.net/2009/12/18/installing-rhel5-on-raid/</link>
		<comments>http://xuun.net/2009/12/18/installing-rhel5-on-raid/#comments</comments>
		<pubDate>Thu, 17 Dec 2009 16:46:49 +0000</pubDate>
		<dc:creator>Xuun</dc:creator>
				<category><![CDATA[关于互联网IT]]></category>

		<guid isPermaLink="false">http://xuun.net/?p=1280</guid>
		<description><![CDATA[In order to support XEN mode, the system needs to have its Virtualization feature enabled in BIOS as a first step, and XEN software package in the OS needs to be loaded during installation 1) Create a RAID array using the Intel(R) Embedded Server RAID Technology II RAID BIOS Console. 2) Connect USB floppy drive [...]]]></description>
			<content:encoded><![CDATA[<p>In order to support XEN mode, the system needs to have its Virtualization feature enabled in BIOS as a first step, and XEN software package in the OS needs to be loaded during installation</p>
<p>1) Create a RAID array using the Intel(R) Embedded Server RAID Technology II RAID BIOS Console.<br />
2) Connect USB floppy drive and insert the floppy disk with RAID driver<br />
3) Boot your system using RHEL5.0 DVD<br />
4) At boot prompt type “linux dd noprobe=ata1 noprobe=ata2 noprobe=ata3 noprobe=ata4&#8243;<br />
5) And then you&#8217;ll see a page that shows “loading usb-storage driver”, and then it will ask you “Do you have a driver disk”. Choose “Yes”<br />
6) Then it will ask you which one do you choose as a driver disk, choose “sda” which is the USB floppy disk. And then click OK to continue, you&#8217;ll see the message “Reading driver disk”,  after it finishes, it will ask “Do you wish to load any more driver disks?” choose No if you do not have any more driver to load.<span id="more-1280"></span><br />
7) (If XEN mode feature is needed, the OS installatng KEY is necessary and then XEN software package needs to be loaded)  Then continue with the RHEL automatic installation, you can see that in the page where we select drives to use for installation, you can only see 1 disk (Intel MegaSR), this means the raid is recognized.<br />
8 ) At the last step of the installation (after all the packages are installed) RHEL5 prompts you to reboot. Do not click reboot button. Press Ctr+Alt+F2 to go to the text console prompt.<br />
9) type “cat /proc/partitions” you will see some info about the partition.  For example, you might find several rows, one row might include sdb. You might find like this</p>
<p>major    minor    #blocks    name<br />
8    16    1440    sdb</p>
<p>10) type “mknod /dev/sdb b 8 16&#8243;  (8 and 16 are copied from the major and minor numbers in step #9, so that the numbers could change according to what is seen in step #9)<br />
11) type “mkdir /temp”<br />
12) type “mount /dev/sdb /temp”<br />
13) type “ls /temp” and you can find all the driver files are now in /temp<br />
14) Use cd command to enter /temp directory<br />
15) type “./replace_ahci.sh” to execute the script. It will remove ahci from /etc/modprobe.conf and blacklist ahci in /etc/modprobe.d/blacklist (replace_ahci.sh is also an example, and please implement the script even if the *.sh is with other name).<br />
16) Go back to graphic screen and reboot the system in order to finish the installation.</p>
<p><a href="http://downloadcenter.intel.com/Detail_Desc.aspx?agr=Y&amp;DwnldID=18234&amp;ProdId=2487&amp;lang=eng" target="_blank"><span style="font-family: Arial; font-size: x-small;"><strong>Intel® IT/IR Entry Hardware RAID driver for Linux*</strong></span></a></p>
<p><a href="http://downloadcenter.intel.com/Detail_Desc.aspx?agr=Y&amp;DwnldID=18266&amp;ProdId=2487&amp;lang=eng" target="_blank"><span style="font-family: Arial; font-size: x-small;"><strong>Intel® ESRT-2 SATA &amp; SAS Software RAID Driver for Linux*</strong></span></a></p>
<div id="_mcePaste" style="overflow: hidden; position: absolute; left: -10000px; top: 132px; width: 1px; height: 1px;">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tbody>
<tr>
<td></td>
<td width="360"><span style="font-family: Arial; font-size: x-small;"><strong>Intel® IT/IR Entry Hardware RAID driver for Linux*</strong></span></td>
<td><img src="http://xuun.net/wp-content/uploads/2009/12/236a_spacer.gif" alt="" width="25" height="1" /></td>
</tr>
</tbody>
</table>
</div>
]]></content:encoded>
			<wfw:commentRss>http://xuun.net/2009/12/18/installing-rhel5-on-raid/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>豆瓣饭否小组被解散</title>
		<link>http://xuun.net/2009/09/02/fanfou-douban/</link>
		<comments>http://xuun.net/2009/09/02/fanfou-douban/#comments</comments>
		<pubDate>Wed, 02 Sep 2009 08:20:53 +0000</pubDate>
		<dc:creator>Xuun</dc:creator>
				<category><![CDATA[关于互联网IT]]></category>

		<guid isPermaLink="false">http://xuun.net/?p=1233</guid>
		<description><![CDATA[邮箱里突然收到一份标题为“饭否小组已被解散”的邮件，60岁生日到了，什么都得河蟹 尊敬的用户： 作为一家在中国境内运营的网站，豆瓣遵守中国的法律法规和相关政策的要求。( 相关法律法规，请参考《互联网信息服务管理办法》http://www.cnnic.net.cn/html/Dir/2000/09/25/0652.htm 第十五条。) 你参与的小组 饭否 因小组讨论主题属于社区指导原则不欢迎的内容，已被解散。 由此给你带来的不便，我们深表歉意，并感谢你的理解和配合。 附 社区指导原则：http://www.douban.com/about?policy=guideline ——豆瓣]]></description>
			<content:encoded><![CDATA[<p>邮箱里突然收到一份标题为“饭否小组已被解散”的邮件，60岁生日到了，什么都得河蟹</p>
<blockquote><p>尊敬的用户：</p>
<p>作为一家在中国境内运营的网站，豆瓣遵守中国的法律法规和相关政策的要求。( 相关法律法规，请参考《互联网信息服务管理办法》http://www.cnnic.net.cn/html/Dir/2000/09/25/0652.htm 第十五条。)</p>
<p>你参与的小组 饭否 因小组讨论主题属于社区指导原则不欢迎的内容，已被解散。</p>
<p>由此给你带来的不便，我们深表歉意，并感谢你的理解和配合。</p>
<p>附 社区指导原则：http://www.douban.com/about?policy=guideline</p>
<p>——豆瓣</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://xuun.net/2009/09/02/fanfou-douban/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Twitter,Facebook相继被封，下一个倒下的会是谁？</title>
		<link>http://xuun.net/2009/07/08/facebook-blocked/</link>
		<comments>http://xuun.net/2009/07/08/facebook-blocked/#comments</comments>
		<pubDate>Tue, 07 Jul 2009 20:10:03 +0000</pubDate>
		<dc:creator>Xuun</dc:creator>
				<category><![CDATA[关于互联网IT]]></category>
		<category><![CDATA[Facebook无法访问]]></category>
		<category><![CDATA[Facebook被墙]]></category>
		<category><![CDATA[Facebook被封]]></category>
		<category><![CDATA[Twitter无法访问]]></category>
		<category><![CDATA[Twitter被墙]]></category>
		<category><![CDATA[twitter被封]]></category>

		<guid isPermaLink="false">http://xuun.net/?p=1083</guid>
		<description><![CDATA[Facebook无法访问, Facebook被墙, Facebook被封, Twitter无法访问, Twitter被墙, Twitter被封 继前几日Twitter被封之后，7月7日晚上人们就发现Facebook上不去了，以前常说21世纪最需要掌握的技能是啥？英语，计算机啪啦啪啦。如果现在问你21世纪最需要掌握的技能是啥？ 翻墙! 下面就介绍一个Facebook被封后的访问方法]]></description>
			<content:encoded><![CDATA[<p><strong> Facebook无法访问, Facebook被墙, Facebook被封, Twitter无法访问, Twitter被墙, Twitter被封</strong></p>
<p><span style="width: 640px;"><span style="position: relative;"><img id="imgb" style="width: 373px; height: 300px;" title="下一张" src="http://xuun.net/wp-content/uploads/2009/06/2a25_001015248.jpg" alt="" /></span></span></p>
<p><span style="width: 640px;"><span style="position: relative;">继前几日Twitter被封之后，7月7日晚上人们就发现Facebook上不去了，以前常说21世纪最需要掌握的技能是啥？英语，计算机啪啦啪啦。如果现在问你</span></span><span style="width: 640px;"><span style="position: relative;">21世纪最需要掌握的技能是啥？</span></span></p>
<p><span style="width: 640px;"><span style="position: relative;"><strong>翻墙</strong>!<br />
</span></span></p>
<p><span style="width: 640px;"><span style="position: relative;">下面就介绍一个</span></span><strong><a href="http://webbeta.org/2009/07/08/facebook-blocked/">Facebook被封后的访问方法</a></strong></p>
]]></content:encoded>
			<wfw:commentRss>http://xuun.net/2009/07/08/facebook-blocked/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
		<item>
		<title>网络再曝吮吸门 “吮吸 wml”关键词或成百度新阴谋</title>
		<link>http://xuun.net/2009/07/05/shunxi-xml/</link>
		<comments>http://xuun.net/2009/07/05/shunxi-xml/#comments</comments>
		<pubDate>Sun, 05 Jul 2009 09:36:02 +0000</pubDate>
		<dc:creator>Xuun</dc:creator>
				<category><![CDATA[关于互联网IT]]></category>
		<category><![CDATA[wml]]></category>
		<category><![CDATA[wml门]]></category>
		<category><![CDATA[吮吸 wml]]></category>
		<category><![CDATA[吮吸 wml 谷歌]]></category>
		<category><![CDATA[吮吸wml]]></category>
		<category><![CDATA[吮吸门]]></category>
		<category><![CDATA[吮吸门事件]]></category>

		<guid isPermaLink="false">http://xuun.net/?p=1018</guid>
		<description><![CDATA[下午上网突然看到谷歌热榜上出现两个关键词“吮吸 wml”和“吮吸wml”，xuun下意识地搜索了下“吮吸 wml”，发现同样也有不少人在询问“吮吸 wml”这个关键词的含义，也似乎有人在刻意引导人们搜索这个关键词，如下图： 结果在第三页之后出现大量手机色情网页内容不堪入目。如下图 而同样以“吮吸 wml”作为关键词在百度搜索，则显示只有短短两页搜索结果，如下图： 但细心的你点击下一页接着往下翻就会发现，其实后面更有有另一片天地： 见下图，同样一个关键词的搜索结果，（本人人格保证此图为同一时间所截，）明明百度“吮吸 wml”的搜索结果比谷歌多，但百度为何要将索结果隐藏只显示两页信息？这不禁令人生疑，难道真的是baidu因为之前的低俗丑闻改过自新？抑或是有别的目的？那就不得而知了。 这不仅让人联想到之前月光博客出现的一篇名为谷歌被阴谋陷害之谜的文章，意指谷歌中国在被CCAV曝光之前被曝光的低俗关键词异常增加，而被人栽赃陷害。 以上推测纯属本人意淫，如有雷同，纯属巧合！]]></description>
			<content:encoded><![CDATA[<p><strong> 下午上网突然看到谷歌热榜上出现两个关键词“吮吸 wml”和“吮吸wml”，xuun下意识地搜索了下“吮吸 wml”，发现同样也有不少人在询问“吮吸 wml”这个关键词的含义，也似乎有人在刻意引导人们搜索这个关键词，如下图：</strong></p>
<p><strong><img class="aligncenter size-full wp-image-1027" title="google1" src="http://xuun.net/wp-content/uploads/2009/07/google1.jpg" alt="google1" width="747" height="441" /></strong></p>
<p><strong>结果在第三页之后出现大量手机色情网页内容不堪入目。如下图<span id="more-1018"></span></strong></p>
<p><strong><img class="aligncenter size-full wp-image-1021" title="Snap7" src="http://xuun.net/wp-content/uploads/2009/07/Snap7.jpg" alt="Snap7" width="578" height="424" /></strong></p>
<p><strong>而同样以</strong><strong>“吮吸 wml”作为关键词在百度搜索，则显示只有短短两页搜索结果，如下图：</strong></p>
<p><strong><img class="aligncenter size-full wp-image-1023" title="baidu" src="http://xuun.net/wp-content/uploads/2009/07/baidu.jpg" alt="baidu" width="527" height="327" /></strong></p>
<p><strong>但细心的你点击下一页接着往下翻就会发现，其实后面更有有另一片天地：</strong></p>
<p><strong><img class="aligncenter size-full wp-image-1024" title="baidu2" src="http://xuun.net/wp-content/uploads/2009/07/baidu2.jpg" alt="baidu2" width="572" height="344" /></strong></p>
<p><strong><br />
</strong></p>
<p><strong>见下图，同样一个关键词的搜索结果，（本人人格保证此图为同一时间所截，）明明百度</strong><strong>“吮吸 wml”</strong><strong>的搜索结果比谷歌多，但百度为何要将索结果隐藏只显示两页信息？这不禁令人生疑，难道真的是baidu因为之前的低俗丑闻改过自新？抑或是有别的目的？那就不得而知了。</strong></p>
<p><strong><img class="aligncenter size-full wp-image-1030" title="342" src="http://xuun.net/wp-content/uploads/2009/07/342.JPG" alt="342" width="373" height="118" /></strong></p>
<p><strong><img class="aligncenter size-full wp-image-1031" title="362" src="http://xuun.net/wp-content/uploads/2009/07/362.JPG" alt="362" width="385" height="210" /><br />
</strong></p>
<p><strong>这不仅让人联想到之前月光博客出现的一篇名为<a href="http://www.williamlong.info/archives/1844.html">谷歌被阴谋陷害之谜</a>的文章，意指谷歌中国在被CCAV曝光之前被曝光的低俗关键词异常增加，而被人栽赃陷害。</strong></p>
<p><strong>以上推测纯属本人意淫，如有雷同，纯属巧合！<br />
</strong></p>
<p><strong><br />
</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://xuun.net/2009/07/05/shunxi-xml/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>天亮了！flickr、twitter解封，恢复访问！</title>
		<link>http://xuun.net/2009/06/09/twitter-flickr-hotmail-resume-access/</link>
		<comments>http://xuun.net/2009/06/09/twitter-flickr-hotmail-resume-access/#comments</comments>
		<pubDate>Mon, 08 Jun 2009 19:57:09 +0000</pubDate>
		<dc:creator>Xuun</dc:creator>
				<category><![CDATA[关于互联网IT]]></category>
		<category><![CDATA[twitter解封]]></category>

		<guid isPermaLink="false">http://xuun.net/?p=834</guid>
		<description><![CDATA[hotmail好像也恢复正常了！]]></description>
			<content:encoded><![CDATA[<p>hotmail好像也恢复正常了！</p>
]]></content:encoded>
			<wfw:commentRss>http://xuun.net/2009/06/09/twitter-flickr-hotmail-resume-access/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

