November 10, 2005
Linux上iSCSI配置
作者:eygle
出处:http://blog.eygle.com
1.修改配置文件修改/etc/iscsi.conf文件,增加以下配置(还有很多参数可以配置):
DiscoveryAddress=172.16.35.228 TargetName=iqn.1987-05.com.cisco:test2 |
2.启动iscsi
[root@test2 ~]# /etc/init.d/iscsi start Checking iscsi config: [ OK ] Loading iscsi driver: [ OK ] Starting iscsid: [ OK ] |
3.观察日志
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 |
如果你看到如上错误,那么你需要启用NetApp的iSCSI支持并创建相应卷组。
4.配置好Netapp
此时日志显示:
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 |
这显示主机已经发现了iscsi设备
在dmesg输出中也可以看到这个信息
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 |
5.查看设备信息
此时可以使用iscsi-ls等命令查看相关Lun信息
[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 ******************************************************************************* |
Posted by eygle at 6:49 PM | Comments (0)
给20年后的自己发封邮件
作者:eygle
出处:http://blog.eygle.com
如果你想让自己在20年后的今天再重新感慨一下
或者想让20年后的她和他感动一下
那么来用一下Forbes的Email服务吧
Forbes推出的Email时间胶囊服务,能够让我们设定延迟发送的时间,最多是20年。
当然使用这个服务需要注意:
1。邮件的目的地址在20年后仍然可用
2。Yahoo Mail在20年后仍然存在(Forbes使用Yahoo的邮件服务)
3。20年后我们还存在
Posted by eygle at 6:01 PM | Comments (3)
How to use Oracle Dump Function
作者:eygle
出处:http://blog.eygle.com
DUMP returns a VARCHAR2 value containing the datatype code, length in bytes, and internal representation of expr. The returned result is always in the database character set.
The syntax is:
DUMP(expr[,return_fmt[,start_position[,length]]])
The argument return_fmt specifies the format of the return value and can have any of the following values:
- 8 returns result in octal notation.
- 10 returns result in decimal notation.
- 16 returns result in hexadecimal notation.
- 17 returns result as single characters.
By default, the return value contains no character set information. To retrieve the character set name of expr, specify any of the preceding format values, plus 1000. For example, a return_fmt of 1008 returns the result in octal, plus provides the character set name of expr.
The arguments start_position and length combine to determine which portion of the internal representation to return. The default is to return the entire internal representation in decimal notation.
If expr is null, then this function returns a null.
Examples
The following examples show how to extract dump information from a string expression and a column:
SELECT DUMP('abc', 1016) FROM DUAL; DUMP('ABC',1016) ------------------------------------------ Typ=96 Len=3 CharacterSet=WE8DEC: 61,62,63 SELECT DUMP(last_name, 8, 3, 2) "OCTAL" FROM employees WHERE last_name = 'Hunold'; OCTAL ------------------------------------------------------------------- Typ=1 Len=6: 156,157 SELECT DUMP(last_name, 10, 3, 2) "ASCII" FROM employees WHERE last_name = 'Hunold'; ASCII -------------------------------------------------------------------- Typ=1 Len=6: 110,111
Posted by eygle at 12:33 PM | Comments (0)
