<?xml version="1.0" encoding="GB2312"?>
<rss version="2.0">
<channel>
<title>Friends Life and Oracle</title>
<link>http://www.eygle.com/blog/</link>
<description>eygle的Oracle Blog，提供Oracle技术研究及深入探讨，同时记录个人爱好及生活历程。</description>
<copyright>Copyright 2006</copyright>
<lastBuildDate>Wed, 15 Nov 2006 13:49:02 +0800</lastBuildDate>
<generator>http://www.movabletype.org/?v=3.33</generator>
<docs>http://blogs.law.harvard.edu/tech/rss</docs> 

<item>
<title>Linux下sshd启动失败问题解决一例</title>
<description><![CDATA[<p>今天一台Redhat Linux AS4出了问题，ssh无法连接。</p>

<p>检查日志（/var/log/secure 文件）发现如下错误提示:<br />
<blockquote>sshd[3862]: error: Bind to port 22 on 0.0.0.0 failed: Address already in use.<br />
sshd[3862]: fatal: Cannot bind any address.<br />
sshd[3879]: error: Bind to port 22 on 0.0.0.0 failed: Address already in use.<br />
sshd[3879]: fatal: Cannot bind any address.</blockquote></p>

<p>提示显示端口22被占用，绑定失败。</p>

<p>在<a href="http://www.google.cn/search?hl=zh-CN&newwindow=1&rls=GGLJ%2CGGLJ%3A2006-30%2CGGLJ%3Azh-CN&q=bind+to+port+22+failed+sshd&meta=">网上</a>可以找到类似的案例，一般的解释是ipv4与ipv6启动冲突。<br />
在 /etc/ssh/sshd_config 文件中存在以下设置：</p>

<blockquote>ListenAddress 0.0.0.0
ListenAddress ::</blockquote>

<p>其中0.0.0.0是ipv4的地址，::是IPv6的表示，如果IPv4地址绑定22端口，则后续绑定会失败，通常的建议是如果不使用IPv6，则可以注释后面一行。</p>

<p>可是我们的问题还没有这么简单，因为缺省的，以上两行配置已经被注释。</p>

<p>检查系统开放的端口及服务:<br />
<blockquote>[root@cmjp1 ~]# nmap -sT -O localhost</p>

<p>Starting nmap 3.70 ( http://www.insecure.org/nmap/ ) at 2006-11-15 14:00 CST<br />
Insufficient responses for TCP sequencing (3), OS detection may be less accurate<br />
Interesting ports on cmjp1.hurray.com.cn (127.0.0.1):<br />
(The 1655 ports scanned but not shown below are in state: closed)<br />
PORT    STATE SERVICE<br />
22/tcp  open  ssh<br />
25/tcp  open  smtp<br />
111/tcp open  rpcbind<br />
631/tcp open  ipp<br />
873/tcp open  rsync<br />
Device type: general purpose<br />
Running: Linux 2.4.X|2.5.X|2.6.X<br />
OS details: Linux 2.4.0 - 2.5.20, Gentoo 1.2 linux (Kernel 2.4.19-gentoo-rc5), Linux 2.4.20, <br />
Linux 2.4.20 - 2.4.22 w/grsecurity.org patch, Linux 2.5.25 - 2.6.3 or Gentoo 1.2 <br />
Linux 2.4.19 rc1-rc7)<br />
Uptime 0.089 days (since Wed Nov 15 11:52:15 2006)</p>

<p>Nmap run completed -- 1 IP address (1 host up) scanned in 2.199 seconds</blockquote></p>

<p>可以发现22端口已经启动，但是客户端是无法通过ssh协议连接的。</p>

<p>同时在系统中观察到另外的一个现象是，即使通过ssh作为客户端访问远程主机也不能连接:<br />
<blockquote>[root@cmjp ~]# ssh root@172.16.33.130<br />
The authenticity of host '172.16.33.130 (172.16.33.130)' can't be established.<br />
RSA key fingerprint is 20:7c:8e:15:19:f7:e7:0c:5d:ce:6f:1c:c6:de:f2:0b.<br />
Are you sure you want to continue connecting (yes/no)? yes<br />
Warning: Permanently added '172.16.33.130' (RSA) to the list of known hosts.<br />
root@172.16.33.130's password: <br />
<strong>Segmentation fault</strong></blockquote></p>

<p>Segmentation fault多半说明应用程序存在问题，导致指针访问错误，通过重新安装sshd程序，最终解决了该问题。</p>

<p>-The End-<br />
</p>]]></description>
<link>http://www.eygle.com/archives/2006/11/linux_sshd_start.html</link>
<guid>http://www.eygle.com/archives/2006/11/linux_sshd_start.html</guid>
<category>Unix&amp;Linux</category>
<pubDate>Wed, 15 Nov 2006 13:49:02 +0800</pubDate>
</item>
<item>
<title>推荐Veritas VCS系列模拟器软件</title>
<description><![CDATA[<p>最近几天一直在搞VCS的东西，顺便推荐一款很好用的VCS仿真环境软件给大家。</p>

<p>我之前用的还是4.0版的，今天要推荐的时候发现Symantec已经将这款软件升级到了5.0版本.<br />
新版本最主要的变化是使用了和Symantec相一致的色彩构图等信息，同时增加了一系列的模拟系统等。</p>

<p>下图是新版本的主页面:</p>

<p><a href="http://www.flickr.com/photos/eygle/271076985/" title="Photo Sharing"><img src="http://static.flickr.com/83/271076985_3ffb64dd9e_o.jpg" width="651" height="427" alt="VSimulator5.0" /></a></p>

<p>仿真软件的界面和操作同真实环境没有任何差别，实在是非常好用的练习软件，唯一遗憾的是你不能用这个软件去操作磁盘信息，不过我之前曾经推荐的<a href="http://www.eygle.com/archives/2006/09/emc_cx_simulation.html">EMC模拟软件</a>可以用来做一下参考。<br />
我们看一下VCS模拟器的仿真界面:<br />
<a href="http://www.flickr.com/photos/eygle/271076993/" title="Photo Sharing"><img src="http://static.flickr.com/84/271076993_dc28baae26.jpg" width="500" height="420" alt="VCS.Simulator" /></a></p>

<p>再来看看我在真实系统上部署的环境，这两者的差别是不是很小呢?<br />
<a href="http://www.flickr.com/photos/eygle/271076983/" title="Photo Sharing"><img src="http://static.flickr.com/107/271076983_0cb1a31354.jpg" width="500" height="350" alt="VCS.Config" /></a></p>

<p>注：原下载地址已经失效，现在我已经将该文件上传到ITPUB的ftp1服务器上，具体目录为:<br />
/incoming/Simulator-By eygle/</p>

<p>ITPUB的FTP长期有效，但是需要成为授权会员才能在ITPUB的授权会员板块获得FTP信息：<br />
<a href="http://www.itpub.net/showthread.php?threadid=480831">http://www.itpub.net/showthread.php?threadid=480831</a></p>

<p>获得ITPUB FTP授权的要求很低，只要在ITPUB上发够50个帖子即可，所以请不要向我索取口令。</p>

<p>-The End-<br />
</p>]]></description>
<link>http://www.eygle.com/archives/2006/10/veritas_vcs_simulator.html</link>
<guid>http://www.eygle.com/archives/2006/10/veritas_vcs_simulator.html</guid>
<category>Unix&amp;Linux</category>
<pubDate>Mon, 16 Oct 2006 16:14:39 +0800</pubDate>
</item>
<item>
<title>在VCS下如何手工加载磁盘组</title>
<description><![CDATA[<p>在VCS环境中，有时候由于故障会导致VCS无法加载磁盘组，此时可以通过手工方式挂接磁盘。</p>

<p>以下是一个可供参考的步骤.<br />
如果可以，先停止HA：<br />
<blockquote>bash-2.05# hastop -all -force<br />
bash-2.05# hastatus<br />
^Ctempting to connect....not available; will retry<br />
bash-2.05# </blockquote></p>

<p>确认DG是否加载,如果未加载需要手工挂接:<br />
<blockquote>bash-2.05# vxdg list<br />
NAME         STATE           ID<br />
datadg       enabled              1160473016.27.db210-1.hurray.com.cn</blockquote></p>

<p>尝试手工mount卷组:<br />
<blockquote>bash-2.05# mount -F vxfs /dev/vx/dsk/datadg/datadgvol /data1<br />
UX:vxfs mount: ERROR: V-3-20003: Cannot open /dev/vx/dsk/datadg/datadgvol: No such device or address<br />
UX:vxfs mount: ERROR: V-3-24996: Unable to get disk layout version</blockquote></p>

<p>错误提示表明Volume未启动，使用以下命令启动:<br />
<blockquote>bash-2.05# vxvol -g datadg startall</p>

<p>bash-2.05# vxprint<br />
Disk group: datadg</p>

<p>TY NAME         ASSOC        KSTATE   LENGTH   PLOFFS   STATE    TUTIL0  PUTIL0<br />
dg datadg       datadg       -        -        -        -        -       -</p>

<p>dm emclun1      emcpower3c   -        41938416 -        -        -       -</p>

<p>v  datadgvol    fsgen        ENABLED  41936896 -        ACTIVE   -       -<br />
pl datadgvol-01 datadgvol    ENABLED  41936896 -        ACTIVE   -       -<br />
sd emclun1-01   datadgvol-01 ENABLED  41936896 0        -        -       -</blockquote></p>

<p>如果此时Mount，可能还会遇到错误：<br />
<blockquote>bash-2.05# mount -F vxfs /dev/vx/dsk/datadg/datadgvol /data1<br />
UX:vxfs mount: ERROR: V-3-21268: /dev/vx/dsk/datadg/datadgvol is corrupted. needs checking</blockquote></p>

<p>VCS需要对磁盘进行检查：<br />
<blockquote>bash-2.05# fsck -F vxfs /dev/vx/dsk/datadg/datadgvol <br />
log replay in progress<br />
replay complete - marking super-block as CLEAN</blockquote></p>

<p>此时磁盘可以被正常挂接:<br />
<blockquote>bash-2.05# mount -F vxfs /dev/vx/dsk/datadg/datadgvol /data1<br />
bash-2.05$ df -k /data1<br />
Filesystem            kbytes    used   avail capacity  Mounted on<br />
/dev/vx/dsk/datadg/datadgvol<br />
                     20968448  730217 18973346     4%    /data1</blockquote><br />
几个错误属于常见类型，记录一下！</p>

<p>-The End-</p>]]></description>
<link>http://www.eygle.com/archives/2006/10/vcs_mount_disk.html</link>
<guid>http://www.eygle.com/archives/2006/10/vcs_mount_disk.html</guid>
<category>Unix&amp;Linux</category>
<pubDate>Thu, 12 Oct 2006 11:33:11 +0800</pubDate>
</item>
<item>
<title>如何使用vxdisk命令删除磁盘</title>
<description><![CDATA[<p>今天整理一台主机的存储配置，研究Veritas的一些命令。<br />
作一点笔记，vxdisk是Veritas Volume manager的主要管理工具之一，常用的几个命令如下:</p>

<p><strong>vxdisk list [diskname]   列出由 VxVM 控制的磁盘<br />
vxdisk offline devicename 使磁盘脱机<br />
vxdisk rm diskname 从 VxVM 的控制中删除磁盘</strong></p>

<p>使用这个命令清除了几个磁盘设备:</p>

<blockquote><pre># vxdisk list
DEVICE       TYPE            DISK         GROUP        STATUS
c0t0d0s2     auto:none       -            -            online invalid
c0t1d0s2     auto:none       -            -            online invalid
emcpower0s2  auto            -            -            offline shared
emcpower1s2  auto            -            -            offline
# vxdisk rm emcpower0s2
# vxdisk list
DEVICE       TYPE            DISK         GROUP        STATUS
c0t0d0s2     auto:none       -            -            online invalid
c0t1d0s2     auto:none       -            -            online invalid
emcpower1s2  auto            -            -            offline
# vxdisk rm emcpower1s2
# vxdisk rm c0t0d0s2
# vxdisk rm c0t1d0s2
# vxdisk list
DEVICE       TYPE            DISK         GROUP        STATUS</pre></blockquote>

<p>首先要确认这些设备是无效的，否则后果就比较严重了。</p>

<p>-The End-<br />
</p>]]></description>
<link>http://www.eygle.com/archives/2006/09/vxdisk_rm_diskname.html</link>
<guid>http://www.eygle.com/archives/2006/09/vxdisk_rm_diskname.html</guid>
<category>Unix&amp;Linux</category>
<pubDate>Thu, 28 Sep 2006 14:21:16 +0800</pubDate>
</item>
<item>
<title>开始架设Oracle10gR2 RAC系统</title>
<description><![CDATA[<p>最近太多的事情要忙,很多事情也耽搁了下来.从今天开始,准备搭建Oracle10gR2的RAC环境.</p>
<p>刚刚配置好了Veritas的Cluster环境:</p>
<table>
    <tbody>
        <tr>
            <td width="500" bgcolor="#999999"># rsh db210-rac2 /opt/VRTS/bin/vxclustadm -v nodestate<br />state: cluster member<br />nodeId=1<br />masterId=1<br />neighborId=0<br />members=0x3<br />joiners=0x0<br />leavers=0x0<br />reconfig_seqnum=0x1e3a09<br />vxfen=off<br /># /opt/VRTS/bin/vxclustadm -v nodestate<br />state: cluster member<br />nodeId=0<br />masterId=1<br />neighborId=1<br />members=0x3<br />joiners=0x0<br />leavers=0x0<br />reconfig_seqnum=0x1e3a09<br />vxfen=off</td>
        </tr>
    </tbody>
</table>
<p>记录一下,不知道其他工作什么时候能有时间顺利完成.</p>
<p>&nbsp;</p>]]></description>
<link>http://www.eygle.com/archives/2006/07/oracle10gr2_rac_begin.html</link>
<guid>http://www.eygle.com/archives/2006/07/oracle10gr2_rac_begin.html</guid>
<category>Unix&amp;Linux</category>
<pubDate>Thu, 06 Jul 2006 14:47:03 +0800</pubDate>
</item>
<item>
<title>在Linux下安装VNC 远程安装Oracle</title>
<description><![CDATA[<p>以前写过一篇:<a href="http://www.eygle.com/archives/2005/07/ousolarisieavnc.html">在Solaris下安装VNC 远程安装Oracle</a>,有朋友说在Linux下安装有问题.今天碰巧需要,在Linux上安装了一次(某些Linux版本缺省既有安装).</p>
<p>首先从<a href="http://download.enet.com.cn/html/222072001021303.html">网上</a>下载:</p>
<table>
    <tbody>
        <tr>
            <td width="500" bgcolor="#999999">
            <p>[oracle@jumper]$ wget http://www.realvnc.com/dist/vnc-4.0-x86_linux.tar.gz<br />--10:34:32-- http://www.realvnc.com/dist/vnc-4.0-x86_linux.tar.gz<br />=&gt; `vnc-4.0-x86_linux.tar.gz'<br />Resolving www.realvnc.com... done.<br />Connecting to www.realvnc.com[83.170.68.194]:80... connected.<br />HTTP request sent, awaiting response... 200 OK<br />Length: 1,625,390 [application/x-gzip]</p>
            <p>100%[==============================&gt;] 1,625,390 52.67K/s ETA 00:00</p>
            <p>10:35:04 (52.67 KB/s) - `vnc-4.0-x86_linux.tar.gz' saved [1625390/1625390]</p>
            </td>
        </tr>
    </tbody>
</table>
<p>发现4.0版本安装起来更加方便,解压后按照README文档操作即可:</p>
<table>
    <tbody>
        <tr>
            <td width="500" bgcolor="#999999">
            <p>[root@xcorder ]# tar -xvf vnc-4.0-x86_linux.tar <br />vnc-4.0-x86_linux/<br />vnc-4.0-x86_linux/vncinstall<br />vnc-4.0-x86_linux/Xvnc<br />vnc-4.0-x86_linux/vncviewer<br />vnc-4.0-x86_linux/vncserver<br />.....<br />vnc-4.0-x86_linux/java/vncviewer.jar<br />[root@xcorder ]# cd vnc-4.0-x86_linux</p>
            <p><br />[root@xcorder ]# ./vncinstall /usr/local/bin<br />Can't install manual pages to /usr/local/man/man1<br />Copying Xvnc to /usr/local/bin<br />Copying vncviewer to /usr/local/bin<br />Copying vncpasswd to /usr/local/bin<br />Copying vncconfig to /usr/local/bin<br />Copying vncserver to /usr/local/bin<br />Copying x0vncserver to /usr/local/bin<br />[root@xcorder ]# mkdir -p /usr/local/vnc/classes<br />[root@xcorder ]# cp java/* /usr/local/vnc/classes</p>
            </td>
        </tr>
    </tbody>
</table>
<p>此时即可启动vncserver:</p>
<table>
    <tbody>
        <tr>
            <td width="500" bgcolor="#999999">
            <p>[root@xcorder ]# vncserver</p>
            <p>You will require a password to access your desktops.</p>
            <p>Password: <br />Verify: <br />xauth: creating new authority file /root/.Xauthority</p>
            <p>New 'xcorder.sky.cn:1 (root)' desktop is xcorder.sky.cn:1</p>
            <p>Creating default startup script /root/.vnc/xstartup<br />Starting applications specified in /root/.vnc/xstartup<br />Log file is /root/.vnc/xcorder.sky.cn:1.log<br /></p>
            </td>
        </tr>
    </tbody>
</table>
<p>如果存在防火墙,还需要开放防火墙,然后就可以通过浏览器在5801端口访问vncserver了.</p>
<p>可以通过如下命令确认端口已经正常启动:</p>
<table>
    <tbody>
        <tr>
            <td width="500" bgcolor="#999999">[root@xcorder ]# netstat -an|grep 01<br />tcp 0 0 0.0.0.0:5801 0.0.0.0:* LISTEN <br />tcp 0 0 0.0.0.0:5901 0.0.0.0:* LISTEN <br />tcp 0 0 0.0.0.0:6001 0.0.0.0:* LISTEN <br />.....</td>
        </tr>
    </tbody>
</table>
<p>VNC在客户段需要JRE运行环境，如果本机未安装，可以到以下地址下载：</p>
<p><a href="http://java.sun.com/javase/downloads/index.jsp">http://java.sun.com/javase/downloads/index.jsp</a></p>
<p>通过VNC远程安装Oracle是非常不错的一个选择.</p>
<p>&nbsp;</p>]]></description>
<link>http://www.eygle.com/archives/2006/06/linux_vnc_oracle_install.html</link>
<guid>http://www.eygle.com/archives/2006/06/linux_vnc_oracle_install.html</guid>
<category>Unix&amp;Linux</category>
<pubDate>Mon, 12 Jun 2006 15:41:37 +0800</pubDate>
</item>
<item>
<title>EMC CX500再次出现硬件故障</title>
<description><![CDATA[今天下午,EMC CX500再一次出现硬件故障,这一次更彻底的是,整个Bus 0 Enclosure 0都报错:<br />
<table>
    <tbody>
        <tr>
            <td width="500" bgcolor="#999999">
            <pre>Time Stamp 04/08/06 17:31:08 Event Number 2580
            Severity Error Host cx500spa
            Storage Array CK200041200044 SP N/A Device N/A
            Description Storage Array Faulted Bus 0 Enclosure 0 : Faulted Bus 0 Enclosure 0
            SPS B : Removed SP B : Removed
            </pre>
            </td>
        </tr>
    </tbody>
</table>
<br />而且Bus0故障的一个直接后果是Cache会被禁用:<br />
<table>
    <tbody>
        <tr>
            <td width="500" bgcolor="#999999">
            <pre>Time Stamp 04/08/06 17:30:46 Event Number 908
            Severity Error Host cx500spa
            Storage Array CK200041200044 SPA Device SP A
            Description Fault - Cache Disabling
            </pre>
            </td>
        </tr>
    </tbody>
</table>
<p><br />故障原因尚不清楚,开Case,调查中...<br />又是一个郁闷的周末!<br /></p>]]></description>
<link>http://www.eygle.com/archives/2006/04/emc_cx500_cache_disable.html</link>
<guid>http://www.eygle.com/archives/2006/04/emc_cx500_cache_disable.html</guid>
<category>Unix&amp;Linux</category>
<pubDate>Sat, 08 Apr 2006 16:40:42 +0800</pubDate>
</item>
<item>
<title>Linux上shmmax参数的设置及含义</title>
<description><![CDATA[shmmax内核参数定义单个共享内存段的最大值，如果该参数设置小于Oracle SGA设置，那么SGA就会被分配多个共享内存段。这在繁忙的系统中可能成为性能负担，带来系统问题。<br>
<br>
Linux上该参数的缺省值通常为32M。<br>
<table><td width="500" bgcolor="#999999"><pre>
[root@neirong root]# more /proc/sys/kernel/shmmax
33554432
</pre></td></table><br>
可以通过ipcs命令查看此设置下共享内存的分配，我们可以看到Oracle分配了多个共享内存段以满足SGA设置的需要:<br>
<table><td width="500" bgcolor="#999999"><pre>
[root@neirong root]# ipcs -sa

------ Shared Memory Segments --------
key        shmid      owner      perms      bytes      nattch     status      
0x00000000 884736     oracle    640        4194304    14                      
0x00000000 917505     oracle    640        33554432   14                      
0x00000000 950274     oracle    640        33554432   14                      
0x00000000 983043     oracle    640        33554432   14                      
0x00000000 1015812    oracle    640        33554432   14                      
0x00000000 1048581    oracle    640        33554432   14                      
0x00000000 1081350    oracle    640        33554432   14                      
0x00000000 1114119    oracle    640        33554432   14                      
0x00000000 1146888    oracle    640        33554432   14                      
0x00000000 1179657    oracle    640        33554432   14                      
0x00000000 1212426    oracle    640        33554432   14                      
0x00000000 1245195    oracle    640        33554432   14                      
0x00000000 1277964    oracle    640        33554432   14                      
0x00000000 1310733    oracle    640        33554432   14                      
0x00000000 1343502    oracle    640        33554432   14                      
0x00000000 1376271    oracle    640        33554432   14                      
0x00000000 1409040    oracle    640        33554432   14                      
0x00000000 1441809    oracle    640        33554432   14                      
0x00000000 1474578    oracle    640        33554432   14                      
0x00000000 1507347    oracle    640        33554432   14                      
0x00000000 1540116    oracle    640        33554432   14                      
0x00000000 1572885    oracle    640        33554432   14                      
0x00000000 1605654    oracle    640        33554432   14                      
0x00000000 1638423    oracle    640        33554432   14                      
0x00000000 1671192    oracle    640        33554432   14                      
0x00000000 1703961    oracle    640        33554432   14                      
0x7a9c9900 1736730    oracle    640        4194304    56                      

------ Semaphore Arrays --------
key        semid      owner      perms      nsems     
0xfcf02e10 229376     oracle    640        154       

------ Message Queues --------
key        msqid      owner      perms      used-bytes   messages    
</pre></td></table><br><br>

使用pmap我们可以看到每个共享内存段的地址空间<br>

]]></description>
<link>http://www.eygle.com/archives/2005/11/whats_mean_linux_shmmax.html</link>
<guid>http://www.eygle.com/archives/2005/11/whats_mean_linux_shmmax.html</guid>
<category>Unix&amp;Linux</category>
<pubDate>Thu, 17 Nov 2005 18:34:36 +0800</pubDate>
</item>
<item>
<title>iSCSI节点名称定义及其他</title>
<description><![CDATA[iSCSI节点名称有两种格式，即 iqn-type 格式和 eui-type 格式。<br>
iqn-type的格式为:<br>
<strong>iqn.yyyy-mm.backward_naming_authority:unique_device_name</strong><br><br>

在Linux上的格式为:<br>
<strong>iqn.1987-05.com.cisco:RandomNumber</strong><br><br>

通常我们可以把RandomNumber更改为具有意义的名称如主机名称等。<br>
缺省的，生成的节点名称可以在/etc/initiatorname.iscsi 得到.<br>
<br>
InitiatorName=iqn.1987-05.com.cisco:01.ed671bf29e<br>
<br>
我们可以修改为:<br>
<br>
InitiatorName=iqn.1987-05.com.cisco:test2<br>
<br>
重新启动iscsi服务后，Netapp端就能够正确识别initiator.<br>
<br>
<img alt="initiator" src="http://www.eygle.com/archives/233.JPG" width="777" height="333" />
<br>
此时可以从主机上获得相关SCSI设备信息:<br>
<table><td width="500" bgcolor="#999999"><pre>
iscsi-sfnet: Loading iscsi_sfnet version 4:0.1.11-1
iscsi-sfnet: Control device major number 254
iscsi-sfnet:host3: Session established
scsi3 : SFNet iSCSI driver
scsi: unknown device type 31
  Vendor: NETAPP    Model: LUN               Rev: 0.2 
  Type:   Unknown                            ANSI SCSI revision: 04
  Vendor: NETAPP    Model: LUN               Rev: 0.2 
  Type:   Direct-Access                      ANSI SCSI revision: 04
SCSI device sda: 41943040 512-byte hdwr sectors (21475 MB)
SCSI device sda: drive cache: write through
 sda: sda1 sda2
Attached scsi disk sda at scsi3, channel 0, id 0, lun 1
</pre></td></table><br>


可以通过fdisk来分区使用iscsi设备:<br>
<table><td width="500" bgcolor="#999999"><pre>
[root@test2 ~]# fdisk /dev/sda

The number of cylinders for this disk is set to 20480.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
   (e.g., DOS FDISK, OS/2 FDISK)

Command (m for help): p

Disk /dev/sda: 21.4 GB, 21474836480 bytes
64 heads, 32 sectors/track, 20480 cylinders
Units = cylinders of 2048 * 512 = 1048576 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1        3907     4000752   83  Linux
/dev/sda2            3908       20480    16970752   83  Linux

Command (m for help): q
</pre></td></table><br>
使用iscsi-ls命令可以看到更为详细的磁盘信息:<br>
<table><td width="500" bgcolor="#999999"><pre>
[root@test2 ~]# iscsi-ls  -l
*******************************************************************************
SFNet iSCSI Driver Version ...4:0.1.11(12-Jan-2005)
*******************************************************************************
TARGET NAME             : iqn.1992-08.com.netapp:sn.84192734
TARGET ALIAS            : 
HOST ID                 : 3
BUS ID                  : 0
TARGET ID               : 0
TARGET ADDRESS          : 172.16.35.228:3260,1
SESSION STATUS          : ESTABLISHED AT Tue Nov 15 09:46:27 CST 2005
SESSION ID              : ISID 00023d000001 TSIH 113

DEVICE DETAILS:
---------------
LUN ID : 0
  Vendor: NETAPP   Model: LUN              Rev: 0.2 
  Type:                                    ANSI SCSI revision: 04
 
LUN ID : 1
  Vendor: NETAPP   Model: LUN              Rev: 0.2 
  Type:   Direct-Access                    ANSI SCSI revision: 04
  page83 type3: 60a98000686f6c504f34314e45774239
  page80: 686f6c504f34314e457742390a
  Device: /dev/sda
*******************************************************************************
</pre></td></table><br>]]></description>
<link>http://www.eygle.com/archives/2005/11/iscsi_node_name.html</link>
<guid>http://www.eygle.com/archives/2005/11/iscsi_node_name.html</guid>
<category>Unix&amp;Linux</category>
<pubDate>Tue, 15 Nov 2005 10:14:45 +0800</pubDate>
</item>
<item>
<title>NetAPP iSCSI性能测试</title>
<description><![CDATA[使用Bonnie++测试了一下NetApp iSCSI的性能:<br>

测试结果如下:<br>
<table><td width="500" bgcolor="#999999"><pre>
[root@dell2650 bonnie++-1.03a]# <strong>./bonnie++ -d /data1 -u root -s 2048 -m dell2650</strong>
Using uid:0, gid:0.
Writing with putc()...done
Writing intelligently...done
Rewriting...done
Reading with getc()...done
Reading intelligently...done
start 'em...done...done...done...
Create files in sequential order...done.
Stat files in sequential order...done.
Delete files in sequential order...done.
Create files in random order...done.
Stat files in random order...done.
Delete files in random order...done.
Version  1.03       ------Sequential Output------ --Sequential Input- --Random-
                    -Per Chr- --Block-- -Rewrite- -Per Chr- --Block-- --Seeks--
Machine        Size K/sec %CP K/sec %CP K/sec %CP K/sec %CP K/sec %CP  /sec %CP
dell2650         2G 12085  49 12846   5  4986   2  6788  25  9008   3 594.1   3
                    ------Sequential Create------ --------Random Create--------
                    -Create-- --Read--- -Delete-- -Create-- --Read--- -Delete--
              files  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP
                 16  3072  99 +++++ +++ +++++ +++  3192  99 +++++ +++  8494 100
<strong>dell2650,2G,12085,49,12846,5,4986,2,6788,25,9008,3,594.1,3,16,3072,99,+,+,+,+,3192,99,+,+,8494,100</strong>
</pre></td></table><br>
我们看到测试结果，Block写的速度大约在12M/Sec，Chr写的速度大约在7M/Sec。<br>
这基本已经是100M网络的最大速度，瓶颈其实在网络上。<br><br>

此时通过sar观察，iowati已经达到88.49%，IO出现等待。<br>
<table><td width="500" bgcolor="#999999"><pre>
[root@dell2650 /]# sar 2 30
Linux 2.4.21-27.ELsmp (dell2650)        11/14/2005

08:47:06 PM       CPU     %user     %nice   %system   %iowait     %idle
<strong>08:47:08 PM       all      0.00      0.00      7.00     93.00      0.00
08:47:10 PM       all      0.25      0.00     10.00     88.25      1.50</strong>
08:47:12 PM       all      0.00      0.00     12.25     86.75      1.00
08:47:14 PM       all      0.00      0.00      9.00     90.00      1.00
08:47:16 PM       all      0.00      0.00     11.50     88.00      0.50
08:47:18 PM       all      0.00      0.00     11.75     88.00      0.25
08:47:20 PM       all      0.25      0.00     11.75     87.25      0.75
08:47:22 PM       all      0.00      0.00     13.00     86.50      0.50
08:47:24 PM       all      0.00      0.00     11.25     88.75      0.00
08:47:26 PM       all      0.00      0.00     12.75     86.75      0.50
08:47:28 PM       all      0.00      0.00      8.75     91.25      0.00
08:47:30 PM       all      0.00      0.00     11.50     88.25      0.25
08:47:32 PM       all      0.00      0.00     10.50     88.75      0.75

.....
<strong>Average:          all      0.07      0.00     10.59     88.49      0.85</strong>
</pre></td></table><br>
<br>
通过iostat观察，可以看到，Block写的速度大约是也是10M左右。<br>
和Bonnie++测试的结果相符合。<br>
<table><td width="500" bgcolor="#999999"><pre>
[root@dell2650 /]# iostat 2|grep sdb1
Linux 2.4.21-27.ELsmp (dell2650)        11/14/2005

Device:            tps   Blk_read/s   Blk_wrtn/s   Blk_read   Blk_wrtn
....
<strong>sdb1            138.50      2304.00     21268.00       4608      42536</strong>
sdb1             62.00      1024.00      8196.00       2048      16392
sdb1            134.00      2304.00     19248.00       4608      38496
sdb1            143.00      2048.00     28892.00       4096      57784
sdb1             78.50     14848.00     71044.00      29696     142088
....
sdb1             74.50     18304.00     25216.00      36608      50432
sdb1             76.50     19072.00      5888.00      38144      11776
sdb1             92.50      2176.00     43392.00       4352      86784
sdb1             81.00     10368.00     24704.00      20736      49408
sdb1             82.50     12032.00     29568.00      24064      59136
sdb1             93.00      3968.00     46208.00       7936      92416
sdb1             85.50      7296.00     41856.00      14592      83712
sdb1             85.00     13332.00     13056.00      26664      26112
....
sdb1             79.00      5504.00     27648.00      11008      55296
sdb1             61.50     12288.00     36992.00      24576      73984
sdb1             76.50      5632.00     37248.00      11264      74496
sdb1             62.00     12672.00     35584.00      25344      71168
sdb1             75.00      6656.00     15328.00      13312      30656
</pre></td></table><br>
<br>
Linux上Bonnie++的编译过程如下供参考:<br>]]></description>
<link>http://www.eygle.com/archives/2005/11/netapp_iscsioae.html</link>
<guid>http://www.eygle.com/archives/2005/11/netapp_iscsioae.html</guid>
<category>Unix&amp;Linux</category>
<pubDate>Tue, 15 Nov 2005 00:32:20 +0800</pubDate>
</item>
<item>
<title>NetAPP + Linux  iSCSI配置step-by-step</title>
<description><![CDATA[Redhat Linux从AS3 update 4开始集成iscsi-initiator。<br><br>
<table><td width="500" bgcolor="#999999"><pre>
[root@dell2650 etc]# cat /etc/redhat-release 
Red Hat Enterprise Linux AS release 3 (Taroon Update 4)

[root@dell2650 etc]# rpm -qa|grep iscsi
iscsi-initiator-utils-3.6.2-4
</pre></td></table><br>

在NETAPP上可以通过如下步骤分配iSCSI LUN<br>
在菜单Luns部分，选择Add:<br>
<img alt="创建LUN" src="http://www.eygle.com/archives/230.JPG" width="792" height="631" />
设置好相应的参数增加即可。<br>
<br>
如果一切正常，即可显示成功:<br>
<img alt="成功..." src="http://www.eygle.com/archives/231.JPG" width="565" height="246" />
<br>
添加成功后可以在如下界面查看:<br>
<img alt="查看" src="http://www.eygle.com/archives/232.JPG" width="677" height="283" />
<br>
此时可以在管理主机上启动/重新启动iscsi进程以识别增加的设备:<br>
<table><td width="500" bgcolor="#999999"><pre>
[root@dell2650 dev]# /etc/init.d/iscsi stop
Stopping iSCSI: iscsid[  OK  ]
[root@dell2650 dev]# /etc/init.d/iscsi start
Starting iSCSI: iscsi iscsid[  OK  ]
</pre></td></table><br>
我们可以通过dmesg获得硬件信息:<br>
<table><td width="500" bgcolor="#999999"><pre>
iSCSI: 3.6.1 (22-Sep-2004) built for Linux 2.4.21-27.ELsmp
iSCSI: will translate deferred sense to current sense on disk command responses
iSCSI: control device major number 254
iSCSI: allocating task cache iscsi_0000729382 with reaping disabled
iSCSI: detected HBA f6aed100, host #2
scsi2 : iSCSI 3.6.1 (22-Sep-2004)
iSCSI: bus 0 target 0 = iqn.1992-08.com.netapp:sn.84192734
iSCSI: bus 0 target 0 portal 0 = address 172.16.35.228 port 3260 group 1
iSCSI: bus 0 target 0 trying to establish session c3ae8000 to portal 0, address 172.16.35.228 port 3260 group 1
iSCSI: bus 0 target 0 established session c3ae8000 #1, portal 0, address 172.16.35.228 port 3260 group 1
scsi singledevice 2 0 0 1
  Vendor: NETAPP    Model: LUN               Rev: 0.2 
  Type:   Direct-Access                      ANSI SCSI revision: 04
Attached scsi disk sdb at scsi2, channel 0, id 0, lun 1
iSCSI: session c3ae8000 recv_cmd f693aa00, cdb 0x0, status 0x2, response 0x0, senselen 18, key 06, ASC/ASCQ 29/00,
itt 3 task f6906f74 to (2 0 0 1), iqn.1992-08.com.netapp:sn.84192734
iSCSI: Sense f0000600 0000000a 00000000 29000000 0000
<strong>SCSI device sdb</strong>: 20971520 512-byte hdwr sectors (10737 MB)
 sdb: unknown partition table
</pre></td></table><br>
<br>
从这里可以看到其设备符为:sdb,我们此时就可以向操作普通硬盘一样操作iSCISI硬盘了.<br>
以下是简单的分区过程:<br>
]]></description>
<link>http://www.eygle.com/archives/2005/11/netapp_linux_iscsi_config_stepbystep.html</link>
<guid>http://www.eygle.com/archives/2005/11/netapp_linux_iscsi_config_stepbystep.html</guid>
<category>Unix&amp;Linux</category>
<pubDate>Mon, 14 Nov 2005 19:58:44 +0800</pubDate>
</item>
<item>
<title>Linux上iSCSI配置</title>
<description><![CDATA[1.修改配置文件<br>
修改/etc/iscsi.conf文件，增加以下配置(还有很多参数可以配置):<br><br>
<table><td width="500" bgcolor="#999999"><pre>
DiscoveryAddress=172.16.35.228
TargetName=iqn.1987-05.com.cisco:test2
</pre></td></table><br>
2.启动iscsi<br><br>
<table><td width="500" bgcolor="#999999"><pre>
[root@test2 ~]# /etc/init.d/iscsi start 
Checking iscsi config:  [  OK  ]
Loading iscsi driver:  [  OK  ]
Starting iscsid: [  OK  ]
</pre></td></table><br>
3.观察日志<br>
<table><td width="500" bgcolor="#999999"><pre>
Nov  8 15:25:33 test2 kernel: iscsi-sfnet: Loading iscsi_sfnet version 4:0.1.11-1
Nov  8 15:25:33 test2 kernel: iscsi-sfnet: Control device major number 254
Nov  8 15:25:33 test2 iscsi: Loading iscsi driver:  succeeded
Nov  8 15:25:38 test2 iscsid[9664]: version 4:0.1.11 variant (12-Jan-2005)
Nov  8 15:25:38 test2 iscsi: iscsid startup succeeded
Nov  8 15:25:38 test2 iscsid[9668]: cannot make connection to 172.16.35.228:3260: Connection refused
Nov  8 15:25:38 test2 iscsid[9668]: Connection to Discovery Address 172.16.35.228 failed
Nov  8 15:25:39 test2 iscsid[9668]: cannot make connection to 172.16.35.228:3260: Connection refused
Nov  8 15:25:39 test2 iscsid[9668]: Connection to Discovery Address 172.16.35.228 failed
Nov  8 15:25:40 test2 iscsid[9668]: cannot make connection to 172.16.35.228:3260: Connection refused
</pre></td></table><br>
如果你看到如上错误，那么你需要启用NetApp的iSCSI支持并创建相应卷组。<br>

4.配置好Netapp<br>
此时日志显示:<br>
<table><td width="500" bgcolor="#999999"><pre>
Nov  8 15:43:38 test2 kernel: iscsi-sfnet:host0: Session established
Nov  8 15:43:38 test2 kernel: scsi0 : SFNet iSCSI driver
Nov  8 15:43:38 test2 kernel: scsi: unknown device type 31
Nov  8 15:43:38 test2 kernel:   Vendor: NETAPP    Model: LUN               Rev: 0.2
Nov  8 15:43:38 test2 kernel:   Type:   Unknown                            ANSI SCSI revision: 04
</pre></td></table><br>
这显示主机已经发现了iscsi设备<br>

在dmesg输出中也可以看到这个信息<br>
<table><td width="500" bgcolor="#999999"><pre>
SCSI subsystem initialized
iscsi-sfnet: Loading iscsi_sfnet version 4:0.1.11-1
iscsi-sfnet: Control device major number 254
iscsi-sfnet: Loading iscsi_sfnet version 4:0.1.11-1
iscsi-sfnet: Control device major number 254
iscsi-sfnet:host0: Session established
scsi0 : SFNet iSCSI driver
scsi: unknown device type 31
  Vendor: NETAPP    Model: LUN               Rev: 0.2 
  Type:   Unknown                            ANSI SCSI revision: 04
</pre></td></table><br>
5.查看设备信息<br>
此时可以使用iscsi-ls等命令查看相关Lun信息<br>
<table><td width="500" bgcolor="#999999"><pre>
[root@test2 etc]# iscsi-ls
*******************************************************************************
SFNet iSCSI Driver Version ...4:0.1.11(12-Jan-2005)
*******************************************************************************
TARGET NAME             : iqn.1992-08.com.netapp:sn.84192734
TARGET ALIAS            : 
HOST ID                 : 0
BUS ID                  : 0
TARGET ID               : 0
TARGET ADDRESS          : 172.16.35.228:3260,1
SESSION STATUS          : ESTABLISHED AT Tue Nov  8 15:43:38 CST 2005
SESSION ID              : ISID 00023d000001 TSIH 101
*******************************************************************************
</pre></td></table><br>]]></description>
<link>http://www.eygle.com/archives/2005/11/linuxeieiscsiae.html</link>
<guid>http://www.eygle.com/archives/2005/11/linuxeieiscsiae.html</guid>
<category>Unix&amp;Linux</category>
<pubDate>Thu, 10 Nov 2005 18:49:03 +0800</pubDate>
</item>
<item>
<title>Linux iSCSI技术-[安装Linux iscsi组件]</title>
<description><![CDATA[Linux的iscsi技术已经发展了多年，其开源项目软件及文档都可以从<a href="http://sourceforge.net/">sourceforge.net</a>的<a href="http://linux-iscsi.sourceforge.net/">Linux-iSCSI Project</a>部分获得.<br /><br />由于我安装了Redhat Linux AS4版本的系统，目前的开源版本还不支持。<br />查询了一下Redhat的发行记录,在Redhat Linux AS4 初始版本中不包括iscsi部分:<br /><br /><strong>红帽企业 Linux 4 的初始发行版本不包括对 iSCSI 软件 initiator 或 target 的支持。对 iSCSI 的支持正处于测试阶段，测试的结果将决定对 iSCSI 的支持是否会被包括在以后的 红帽企业 Linux 4 升级产品中。</strong><br /><br />然后在Redhat Linux AS4 Update2中包含了关于iSCSI的支持，通过初始安装或手工安装以下组件可以加载iscsi组件:<br /><strong>iscsi-initiator-utils-4.0.3.0-2</strong><br /><br />在Redhat Linux AS4 Update2上安装很简单，内核版本为2.6.9-22:<br />
<table>
    <tbody>
        <tr>
            <td width="500" bgcolor="#999999">
            <pre>Last login: Wed Oct 26 14:23:21 2005 from 172.16.34.9
            [root@test2 ~]# uname -a
            Linux test2.hurray.com.cn 2.6.9-22.EL #1 Mon Sep 19 18:20:28 EDT 2005 i686 i686 i386 GNU/Linux
            [root@test2 opt]# rpm -iUv iscsi-initiator-utils-4.0.3.0-2.i386.rpm
            warning: iscsi-initiator-utils-4.0.3.0-2.i386.rpm: V3 DSA signature: NOKEY, key ID db42a60e
            Preparing packages for installation...
            iscsi-initiator-utils-4.0.3.0-2
            </pre>
            </td>
        </tr>
    </tbody>
</table>
<br />在Redhat Linux AS4 初始发行版本（内核版本为2.6.9-11）上安装，会遇到点问题，需要sysfsutils-1.2.0-1.i386.rpm的支持，这个rpm包可以从网上<a href="ftp://distro.ibiblio.org/pub/linux/distributions/caoslinux/centos/4.0/os/i386/CentOS/RPMS/sysfsutils-1.2.0-1.i386.rpm">下载</a>,搜索rpm包<a href="http://rpm.pbone.net/">rpm.pbone.net</a>是个很好的站点。<br />1.在内核2.6.9-11上安装的提示<br />
<table>
    <tbody>
        <tr>
            <td width="500" bgcolor="#999999">
            <pre>[root@test1 opt]# uname -a
            Linux test1.hurray.com.cn 2.6.9-11.ELsmp #1 SMP Fri May 20 18:26:27 EDT 2005 i686 i686 i386 GNU/Linux
            [root@test1 software]# rpm -iUv iscsi-initiator-utils-4.0.3.0-2.i386.rpm
            warning: iscsi-initiator-utils-4.0.3.0-2.i386.rpm: V3 DSA signature: NOKEY, key ID db42a60e
            error: Failed dependencies:
            libsysfs.so.1 is needed by iscsi-initiator-utils-4.0.3.0-2.i386
            Suggested resolutions:
            sysfsutils-1.2.0-1.i386.rpm
            </pre>
            </td>
        </tr>
    </tbody>
</table>
<br />2.下载安装sysfsutils<br />
<table>
    <tbody>
        <tr>
            <td width="500" bgcolor="#999999">
            <pre>[root@test1 software]# wget ftp://distro.ibiblio.org/pub/linux/distributions/caoslinux/centos/\
            4.0/os/i386/CentOS/RPMS/sysfsutils-1.2.0-1.i386.rpm
            --20:25:38--  ftp://distro.ibiblio.org/pub/linux/distributions/caoslinux/centos/\
            4.0/os/i386/CentOS/RPMS/sysfsutils-1.2.0-1.i386.rpm
            =&gt; `sysfsutils-1.2.0-1.i386.rpm'
            Resolving distro.ibiblio.org... 152.2.210.109
            Connecting to distro.ibiblio.org[152.2.210.109]:21... connected.
            Logging in as anonymous ... Logged in!
            ==&gt; SYST ... done.    ==&gt; PWD ... done.
            ==&gt; TYPE I ... done.  ==&gt; CWD /pub/linux/distributions/caoslinux/centos/4.0/os/i386/CentOS/RPMS. done.
            ==&gt; PASV ... done.    ==&gt; RETR sysfsutils-1.2.0-1.i386.rpm ... done.
            Length: 57,197 (unauthoritative)
            100%[============================================================&gt;] 57,197        23.30K/s
            20:25:46 (23.27 KB/s) - `sysfsutils-1.2.0-1.i386.rpm' saved [57,197]
            </pre>
            </td>
        </tr>
    </tbody>
</table>
<br />3.安装iscsi-initiator-utils-4.0.3.0-2<br />
<table>
    <tbody>
        <tr>
            <td width="500" bgcolor="#999999">
            <pre>[root@test1 software]# rpm -iUvh sysfsutils-1.2.0-1.i386.rpm
            warning: sysfsutils-1.2.0-1.i386.rpm: V3 DSA signature: NOKEY, key ID 443e1821
            Preparing...                ########################################### [100%]
            1:sysfsutils             ########################################### [100%]
            [root@test1 software]# ls
            iscsi-initiator-utils-4.0.3.0-2.i386.rpm  linux-iscsi-3.6.0.3  linux-iscsi-3.6.0.3.tar  <br />sysfsutils-1.2.0-1.i386.rpm
            [root@test1 software]# uname -a
            Linux test1.hurray.com.cn 2.6.9-11.ELsmp #1 SMP Fri May 20 18:26:27 EDT 2005 i686 i686 i386 GNU/Linux
            [root@test1 software]# rpm -iUv iscsi-initiator-utils-4.0.3.0-2.i386.rpm
            warning: iscsi-initiator-utils-4.0.3.0-2.i386.rpm: V3 DSA signature: NOKEY, key ID db42a60e
            Preparing packages for installation...
            iscsi-initiator-utils-4.0.3.0-2
            </pre>
            </td>
        </tr>
    </tbody>
</table>
<p><br /><strike>至此iSCSI安装完成。</strike></p>
<p>经过测试,虽然Redhat Linux AS4 初始发行版本可以安装iscisi选件,但是仍然无法正常使用,启动iscsi时会收到以下错误:</p>
<table>
    <tbody>
        <tr>
            <td width="500" bgcolor="#999999">
            <pre>[root@test1 ~]# /etc/init.d/iscsi start<br />Checking iscsi config:&nbsp; [&nbsp; OK&nbsp; ]<br />Loading iscsi driver:&nbsp; FATAL: Module iscsi_sfnet not found.<br />[FAILED]&nbsp;</pre>
            </td>
        </tr>
    </tbody>
</table>
<p>如想正常使用,还需要安装开源选件.</p>
<p>在<strong>Red Hat Enterprise Linux AS release 3 (Taroon Update 4)</strong>及<strong>Redhat Linux AS4 Update2</strong>上都没有问题.(补充这一点供大家参考)</p>]]></description>
<link>http://www.eygle.com/archives/2005/11/linux_iscsi-install.html</link>
<guid>http://www.eygle.com/archives/2005/11/linux_iscsi-install.html</guid>
<category>Unix&amp;Linux</category>
<pubDate>Tue, 08 Nov 2005 10:14:31 +0800</pubDate>
</item>
<item>
<title>Netapp中如何挂接根卷(root volume)</title>
<description><![CDATA[NetApp根卷包括 /etc 和 /home 目录，可以通过在管理主机端挂接根卷来访问和修改相关文件。<br>
以下是挂接步骤:<br><br>
<table><td width="500" bgcolor="#999999"><pre>
# mkdir data
# mount 172.16.35.228:/vol/vol0 /data
# df -k /data
Filesystem            kbytes    used   avail capacity  Mounted on
172.16.35.228:/vol/vol0
                     50119928  595424 49524504     2%    /data

# cd /data
# ls
QT1     etc     home    qtree0</pre></td></table><br>

接下来我们就可以访问/etc及/home目录了。<br>]]></description>
<link>http://www.eygle.com/archives/2005/11/netapp_howto_mount_root_volume.html</link>
<guid>http://www.eygle.com/archives/2005/11/netapp_howto_mount_root_volume.html</guid>
<category>Unix&amp;Linux</category>
<pubDate>Mon, 07 Nov 2005 13:42:03 +0800</pubDate>
</item>
<item>
<title>笔记-SUN 4500硬盘损坏</title>
<description><![CDATA[收到消息的时候，登陆主机检查，发现登陆时即报出错误:<strong>No directory!</strong><br>
即用户目录已经找不到了。<br>
<table><td width="500" bgcolor="#999999"><pre>
billing-db2 console login: gqgai
Password: 
No directory! Logging in with home=/
Last login: Wed Nov  2 22:08:37 from 10.199.32.23
Sun Microsystems Inc.   SunOS 5.8       Generic Patch   October 2001
$ id
uid=2003(gqgai) gid=2000(maintain)
</pre></td></table><br>
用df -k发现存在IO错误，2个目录不见了，/opt和/export/home属于同一块硬盘，这块硬盘看来是Over了:
<table><td width="500" bgcolor="#999999"><pre>
$ df -k
Filesystem            kbytes    used   avail capacity  Mounted on
/dev/dsk/c0t10d0s0   1018191  132709  824391    14%    /
/dev/dsk/c0t10d0s6   3974034 1588072 2346222    41%    /usr
/proc                      0       0       0     0%    /proc
fd                         0       0       0     0%    /dev/fd
mnttab                     0       0       0     0%    /etc/mnttab
/dev/dsk/c0t10d0s1   8261393 1657518 6521262    21%    /var
swap                 7088928       8 7088920     1%    /var/run
swap                 7090656    1736 7088920     1%    /tmp
df: cannot statvfs /opt: I/O error
df: cannot statvfs /export/home: I/O error
</pre></td></table><br>
使用dmesg查看系统信息，发现硬件错误信息如下:<br>
<table><td width="500" bgcolor="#999999"><pre>
# dmesg

Thu Nov  3 10:18:38 CST 2005
...
Nov  2 18:13:33 ... scsi: [ID 107833 kern.warning] WARNING: /sbus@3,0/SUNW,fas@3,8800000/sd@b,0 (sd10):
Nov  2 18:13:33 ...    Error for Command: write                   Error Level: Retryable
Nov  2 18:13:33 ... scsi: [ID 107833 kern.notice]      Requested Block: 38016        Error Block: 38016
Nov  2 18:13:33 ... scsi: [ID 107833 kern.notice]      Vendor: SEAGATE               Serial Number: 0118T2F3E2  
Nov  2 18:13:33 ... scsi: [ID 107833 kern.notice]      Sense Key: Hardware Error
Nov  2 18:13:33 ... scsi: [ID 107833 kern.notice]      ASC: 0x15 (<vendor unique code 0x15>), ASCQ: 0x1, FRU: 0x1
Nov  2 18:14:58 ... scsi: [ID 107833 kern.warning] WARNING: /sbus@3,0/SUNW,fas@3,8800000/sd@b,0 (sd10):
Nov  2 18:14:58 ...    Error for Command: write      Error Level: Retryable
Nov  2 18:14:58 ... scsi: [ID 107833 kern.notice]      Requested Block: 670640       Error Block: 667334
Nov  2 18:14:58 ... scsi: [ID 107833 kern.notice]      Vendor: SEAGATE               Serial Number: 0118T2F3E2  
Nov  2 18:14:58 ... scsi: [ID 107833 kern.notice]      Sense Key: Hardware Error
Nov  2 18:14:58 ... scsi: [ID 107833 kern.notice]      ASC: 0x44 (internal target failure), ASCQ: 0x0, FRU: 0xd3
</pre></td></table><br>
看来这块SEAGATE的硬盘是完蛋了。<br><br>

]]></description>
<link>http://www.eygle.com/archives/2005/11/sun_e4500_disk_fault.html</link>
<guid>http://www.eygle.com/archives/2005/11/sun_e4500_disk_fault.html</guid>
<category>Unix&amp;Linux</category>
<pubDate>Sat, 05 Nov 2005 22:49:53 +0800</pubDate>
</item>


</channel>
</rss>