Chinaunix首页 | 论坛 | 博客
  • 博客访问: 61400
  • 博文数量: 26
  • 博客积分: 2010
  • 博客等级: 大尉
  • 技术积分: 313
  • 用 户 组: 普通用户
  • 注册时间: 2009-02-06 16:34
文章分类

全部博文(26)

文章存档

2009年(26)

我的朋友

分类: LINUX

2009-02-25 15:31:47

  • 硬件连接

 Dell EqualLogic PS-Series 采用LAN方式和现有网络服务器进行连接. 每个控制器有三个网口可以用作数据传输和网络管理,所有的网口IP地址需要在同一个子网中。 

  • 存储配置

将存储随机串口线连接笔记本串口和存储控制器的控制口,打开计算机的“超级终端”,端口参数如下: 

Speed: 9600

Data: 8

 Parity: None

Stopbits: 1

Flow control: None

敲回车看到登陆窗口

login: grpadmin

Password: grpadmin

按照下面提示操作

Would you like to configure the array now ? (y/n) [n]y

Do you want to proceed (yes | no ) [no]:y

更改member名称

Member name []:member-name

Network interface [eth0]:

IP address for network interface []: 192.168.100.1

Netmask [255.255.255.0]:

Default gateway [192.168.100.1]: 192.168.100.254

Group name []: group-name

设置 group ip

Group IP address []: 192.168.100.50

Do you want to create a new group (yes | no) [yes]:y

Do you want to use the group settings shown above (yes | no) [yes]: y

group-name>

设置另外两个网口IP地址

group-name> member select member-name eth select 1 ipaddress 192.168.100.2

group-name> member select member-name eth select 1 netmask 255.255.255.0

group-name> member select member-name eth select 1 up

group-name> member select member-name eth select 2 ipaddress 192.168.100.3

group-name> member select member-name eth select 2 netmask 255.255.255.0

group-name> member select member-name eth select 2 up

group-name> member select member-name eth show

Name ifType          ifSpeed    Mtu   Ipaddress       Status  Errors           

---- --------------- ---------- ----- --------------- ------- -------          

eth0 ethernet-csmacd 1000000000 9000  192.168.100.1  up      0                

eth1 ethernet-csmacd 1000000000 9000  192.168.100.2  up      0                

eth2 ethernet-csmacd 1000000000 9000  192.168.100.3  up      0 

group-name> logout

Do you really want to logout? (y/n) [n]y

Exit minicom with followed by

笔记本上安装jre 1.

  • 配置存储,创建Volume?(过程略)
  • 服务器端配置

[root]# service iscsi start

[root]# chkconfig iscsi on

 [root]# vi /etc/iscsi/iscsid.conf

# *************

# CHAP Settings

# *************

 

# To enable CHAP authentication set node.session.auth.authmethod

# to CHAP. The default is None.

#node.session.auth.authmethod = CHAP

 

# To set a CHAP username and password for initiator

# authentication by the target(s), uncomment the following lines:

#node.session.auth.username = username

#node.session.auth.password = password

 

# To set a CHAP username and password for target(s)

# authentication by the initiator, uncomment the following lines:

#node.session.auth.username_in = username_in

#node.session.auth.password_in = password_in

 

# To enable CHAP authentication for a discovery session to the target

# set discovery.sendtargets.auth.authmethod to CHAP. The default is None.

#discovery.sendtargets.auth.authmethod = CHAP

 

# To set a discovery session CHAP username and password for the initiator

# authentication by the target(s), uncomment the following lines:

#discovery.sendtargets.auth.username = username

#discovery.sendtargets.auth.password = password

 

# To set a discovery session CHAP username and password for target(s)

# authentication by the initiator, uncomment the following lines:

#discovery.sendtargets.auth.username_in = username_in

#discovery.sendtargets.auth.password_in = password_in

 

[root]# service iscsi restart

  • 配置ISCSI多路径

 [root]# cat /proc/partitions

 major minor  #blocks  name

 

    8     0   71041024 sda

    8     1     104391 sda1

    8     2   10241437 sda2

  253     0    8192000 dm-0

  253     1    2031616 dm-1

  253     2   24130560 dm-2

 [root]# ip addr show | grep 192.168

     inet 192.168.100.199/24 brd 192.168.100.255 scope global eth0

     inet 192.168.100.188/24 brd 192.168.100.255 scope global eth1

 [root]# ping -I eth0 192.168.100.50

 [root]# ping -I eth1 192.168.100.50

 [root]# iscsiadm -m iface -I ieth0 --op=new

 [root]# iscsiadm -m iface -I ieth1 --op=new

 [root]# iscsiadm -m  iface -I ieth0 --op=update -n iface.net_ifacename -v eth0

 [root]# iscsiadm -m  iface -I ieth1 --op=update -n iface.net_ifacename -v eth1

 [root]# iscsiadm -m iface

 ieth0 tcp,default,eth0

 ieth1 tcp,default,eth1

 [root]# cat /var/lib/iscsi/ifaces/ieth0

 iface.iscsi_ifacename = ieth0

 iface.net_ifacename = eth0

 iface.hwaddress = default

 iface.transport_name = tcp

 [root]# cat /var/lib/iscsi/ifaces/ieth1

 iface.iscsi_ifacename = ieth1

 iface.net_ifacename = eth1

 iface.hwaddress = default

 iface.transport_name = tcp

 [root]# iscsiadm -m discovery -t st -p 192.168.100.50 -I ieth0 -I ieth1

 192.168.100.50:3260,1 iqn.2001-05.com.equallogic:0-8a0906-3a36e3f02-b990000003e48af0-your_volume_name

 192.168.100.50:3260,1 iqn.2001-05.com.equallogic:0-8a0906-3a36e3f02-b990000003e48af0-your_volume_name

 [root]# iscsiadm -m node --loginall=all

 [root]# cat /proc/partitions

 major minor  #blocks  name

 

    8     0   71041024 sda

    8     1     104391 sda1

    8     2   10241437 sda2

  253     0    8192000 dm-0

  253     1    2031616 dm-1

  253     2   24130560 dm-2

    8    64   24130560 sdc

    8    80   24130560 sdd

 [root]# iscsiadm -m session

 tcp: [8] 192.168.100.50:3260,1 iqn.2001-05.com.equallogic:0-8a0906-3a36e3f02-b990000003e48af0-your_volume_name

 tcp: [9] 192.168.100.50:3260,1 iqn.2001-05.com.equallogic:0-8a0906-3a36e3f02-b990000003e48af0-your_volume_name

[root]# pvs

  PV         VG         Fmt  Attr PSize   PFree

  /dev/sda2  VolGroup00 lvm2 a-     9.75G    0

In this example the local disk is /dev/sda

If you are not using LVM, you may use the mount command:

[root]# mount

/dev/sda1 on /boot type ext3 (rw)

Once the local disk is determined, obtain the scsi id of that disk:

[root]# scsi_id -g -u -s /block/sda

36001e4f010fde3000f39f9f6066b384c

Now edit the multipath configuration to enable multipath on your non-local devices:

[root]# vi /etc/multipath.conf

blacklist {

        devnode "*"

}

Add the scsi id of your local disk:

blacklist {

        wwid 36001e4f010fde3000f39f9f6066b384c

}

Change:

defaults {

        user_friendly_names yes

}

To:

defaults {

        user_friendly_names no

}

[root]# chkconfig multipathd on

Start multipathd:

[root]# service multipathd start

List multipath devices:

[root]# multipath -ll

36090a028f0e3363af08ae403000090b9dm-2 EQLOGIC,100E-00

[size=23G][features=0][hwhandler=0]

\_ round-robin 0 [prio=1][enabled]

 \_ 11:0:0:0 sdc 8:64  [active][ready]

\_ round-robin 0 [prio=1][enabled]

 \_ 10:0:0:0 sdd 8:80  [active][ready]

[root]# ls /dev/mpath/

36090a028f0e3363af08ae403000090b9

[root]# ls /dev/mapper/

36090a028f0e3363af08ae403000090b9

[root]# scsi_id -x -g -u -s /block/sdc

ID_VENDOR=EQLOGIC

ID_MODEL=100E-00

ID_REVISION=4.0

ID_SERIAL=36090a028f0e3363af08ae403000090b9

ID_TYPE=disk

ID_BUS=scsi

 

[root]# scsi_id -x -g -u -s /block/sdd

ID_VENDOR=EQLOGIC

ID_MODEL=100E-00

ID_REVISION=4.0

ID_SERIAL=36090a028f0e3363af08ae403000090b9

ID_TYPE=disk

ID_BUS=scsi

[root]# multipath -v3 -d

[root]# parted /dev/mapper/36090a028f0e3363af08ae403000090b

[root]# parted -s /dev/mapper/36090a028f0e3363af08ae403000090b mklabel gpt

[root]# parted -s /dev/mapper/36090a028f0e3363af08ae403000090b mkpart primary "0 -1"

[root]# partprobe -s  /dev/mapper/36090a028f0e3363af08ae403000090b

 [root]# kpartx -a /dev/mapper/36090a028f0e3363af08ae403000090b

[root]# ls /dev/mapper/

36090a028f0e3363af08ae403000090b  36090a028f0e3363af08ae403000090bp1

Use pvcreate on the new partition:

[root]# pvcreate /dev/mapper/36090a028f0e3363af08ae403000090bp1

Physical volume "/dev/mapper/36090a028f0e3363af08ae403000090bp1" successfully created

阅读(2857) | 评论(0) | 转发(0) |
0

上一篇:一个双机牛人的blog

下一篇:archive log

给主人留下些什么吧!~~