Category Archives: Hardware

用arcconf在线创建StorageTek Raid Controller镜像/Make live mirror with arcconf for StorageTek RAID Controller

X4170 with StorageTek raid controller, 做系统的时候为了节省成本没有做镜像,以至于后来硬盘问题频发导致多次系统crash。让我想到必须做镜像和raid了。研究了下StorMan的手册,发现可以用GUI的StorMan来配置,也可以用arcconf来配置,我没有图形界面,所以只好用arcconf了。

X4170 with StorageTek raid controller has no mirror due to the budget limitation and this caused the OS crash many times by disk failure. This forces me to make mirror for OS. According to the manual of StorMan, this can be done by GUI or arcconf. I have no GUI so I must use arcconf.

其实很简单,至少有一个free的盘,我假设我现有OS的盘是0,0,free的盘是0,1,在线创建的命令为:
It’s easy. At least you need to have a free disk. I assume my OS disk is 0,0 and free disk is 0,1. The live creation command should be:

bash-3.2# arcconf modify 1 from 0 to max 1 0 0 0 1
Controllers found: 1
The requested modification does not support change of logical device size.
The target logical device must be 285696 MB

//I would like to use max as the volume size but the command says the size must be 285696

Command aborted.

bash-3.2# arcconf modify 1 from 0 to 285696 1 0 0 0 1
Controllers found: 1
Reconfiguration of a logical device is a long process. Are you sure you want to continue?
Press y, then ENTER to continue or press ENTER to abort: y

Reconfiguring logical device: os

Command completed successfully.

//It says the process is long but actually it takes less than 1 second.

当然,如果你使用的是新disk,需要首先initialize, 否则会出错://If you’re using a new inserted disk, please initialize first. Otherwise you’ll get aborted

bash-3.2# arcconf modify 1 from 0 to 285696 1 0 0 0 1
Controllers found: 1
Not enough available space.
Not enough available space.

Command aborted.

bash-3.2# arcconf task start 1 device 0 1 initialize
Controllers found: 1
Initializing Channel 0, Device 1.

Command completed successfully.

bash-3.2# arcconf getconfig 1
———————————————————————-

Logical device information
———————————————————————-
Logical device number 0
Logical device name : os
RAID level : 1
Status of logical device : Impacted
Size : 285686 MB
Read-cache mode : Enabled
Write-cache mode : Enabled (write-back)
Write-cache setting : Enabled (write-back) when protected by battery
Partitioned : Yes
Protected by Hot-Spare : No
Bootable : Yes
Failed stripes : No
——————————————————–
Logical device segment information
——————————————————–
Segment 0 : Present (0,0) 00084970458V 3SE0458V
Segment 1 : Present (0,1) 00095371FBS8 3SE1FBS8

命令格式/Command format:

arcconf modify <controller> from <logical_volume> to <volume_size> <raid_level> <disk1 IDs> <disk2 IDs>

Or for a more verbose explanation:

arcconf (the raid utility)

modify (modify an existing raid)

1 (the controller with your simple_volume you want to turn into a raid 1)

from 0 (the logical volume you want to convert into a raid 1)

to 139900 (the size of the volume. In my version of arcconf, this had to be set to a numeric value matching the current simple_volume size, and MAX was not a valid option)

1 (the raid level you want to convert to)

0 0 (the first disk ID (0,0) in the raid 1. This should be your existing disk containing the simple_volume that you want to convert to raid 1)

0 1 (the extra available disk ID (0,1) that you are adding to the raid 1 to make it a mirror)

3PAR 7200 setup and installation

Setup Procedure:

1. Physically cable the 3PAR, connect the mgt ports
2. Have a ESXi server in the same subnet, use Virtual Service Processor’s VOF template to deploy the VSP
3. In the console of VSP, use setupusr with blank password to setup the VSP IP
4. Use the SmartStart to connect to VSP to configure VSP and storage
5. Install management console to connect to storage for management

Change IP address of 7200

1. ssh to 3par 7200 storage with user 3paradm
2. setnet startaddr <old-IP> <new-IP> <new-subnet-mask>
3. setnet startgateway / setnet cleargateway
4. Now the storage listen to both new IP addresses and old address, try to ssh to new IP address to verify your IP
5. shownet will see the new IP verified, use ‘setnet finish’ to finish the configuration

X4170 with STK RAID controller 更换root disk

X4170,带STK RAID controller,两块硬盘,一块根盘一块数据,都是做了simple volume,根盘发现坏块,还好只是/export/home,保修,Oracle寄来一块硬盘,更换root disk。以下是几点提要:

1. 下载Sun StorageTek* RAID Manager for x86 Solaris* 10
URL:

https://downloadcenter.intel.com/confirm.aspx?httpDown=http://downloadmirror.intel.com/17959/eng/solaris_x86_raidman-arcconf_v6.10.0-17557.zip&lang=eng&Dwnldid=17959&ProductID=2875&ProductFamily=Server+Products&ProductLine=RAID+Controllers+for+OEMs&ProductProduct=Sun+StorageTek*+SAS+RAID+HBA%2c+Internal
安装在/opt/StorMan下,参考文档:http://docs.oracle.com/cd/E23383_01/html/820-2145-12/chapter2.html#0_pgfId-1001484

2. 安装后获取information

arcconf getversion
arcconf getconfig $CNUM
arcconf getstatus $CNUM
arcconf getlogs $CNUM uart
arcconf getlogs $CNUM device
arcconf getlogs $CNUM dead
arcconf getlogs $CNUM event
arcconf getlogs $CNUM event tabular
其中$CNUM是控制器号,

3. 添加new disk,热插拔,然后在arcconf getconfig里可以看到硬盘

Device #7
Device is a Hard drive
State : Ready
Supported : Yes
Transfer Speed : SAS 3.0 Gb/s
Reported Channel,Device : 0,7 —————————-> so you need to note this information
Reported Location : Enclosure 1, Slot 7
Reported ESD : 2,1
Vendor : SEAGATE
Model : ST914603SSUN146G
Firmware : 0B70
Serial number : 00112083G17Q 6SD3G17Q
World-wide name : 5000C5003AAD501C
Size : 140009 MB
Write Cache : Unknown
FRU : None
S.M.A.R.T. : No

4. 使用new disk创建新volume

# arcconf create 1 logicaldrive max volume 0 7 noprompt
or
# arcconf CREATE 1 LOGICALDRIVE NAME Data-2 max Simple_volume 0,2

“1″ means controller #; “0 7″ means “Reported Channel,Device” in the “arcconf getconfig 1″,
By default, once new disk inserted ,you just need to run one command “arcconf create” to generate one new disk

# devfsadm -vCc disk //this commands is not mandatory

5. 分区,创建文件系统,然后把现有系统dump到新硬盘上,比如/var

mount /dev/dsk/c0t2d0s3 /a
cd /a
ufsdump 0f – /dev/rdsk/c0t0d0s3 | ufsrestore rvf –
所有分区都dump完成之后安装grub:

# installgrub /boot/grub/stage1 /boot/grub/stage2 /dev/rdsk/c0t0d0s0

注意此时不要编辑/etc/vfstab和/boot/solaris/bootenv.rc,这点是因为这个raid控制器会把启动硬盘自动设置成卷0,也就是说c0t2d0在设置为启动卷之后,就成了c0t0d0,这种反人类思维让我烦恼了好久
也记录一下,如果需要编辑bootenv.rc时,setprob bootpath的内容应该是format看到的硬盘信息,例如:/pci@0,0/pci-ide@1f,2/ide@0/cmdk@0,0:a,a表示分区0

6. 重新启动,按提示按ctrl+A进入adaptec控制器utility,在manage volume里看到新建的卷,光标移上去按 ctrl+b设置为启动卷,此时可以看到volume的list顺序发生了改变,这个bootable的volume成了1st

7. 所以其实然后只要启动就好,然后可以在系统里删除logic drive

arcconf delete logictdrive 2

openboot prom下查看mac address

{0} ok devalias
cdrom /pci@0,600000/pci@0/pci@0/scsi@0/disk@4,0:f
net /pci@0,600000/pci@0/pci@1/pci@0/network@4
disk /pci@0,600000/pci@0/pci@0/scsi@0/disk@0
name aliases

{0} ok cd /pci@0,600000/pci@0/pci@1/pci@0
{0} ok ls
f00cdd30 network@4,1
f00c68e0 network@4
{0} ok cd network@4
{0} ok .properties
status okay
assigned-addresses 82062010 00000000 00800000 00000000 00200000
82062018 00000000 00610000 00000000 00010000
compatible pci14e4,1678.10cf.147a.a3
pci14e4,1678.10cf.147a
pci10cf,147a
pci14e4,1678.a3
pci14e4,1678
pciclass,020000
pciclass,0200
reg 00062000 00000000 00000000 00000000 00000000
03062010 00000000 00000000 00000000 00200000
03062018 00000000 00000000 00000000 00010000
local-mac-address 00 0b 5d e5 bb 72
max-frame-size 00010000
address-bits 00000030
network-interface-type ethernet
device_type network
name network
66mhz-capable
fast-back-to-back
devsel-speed 00000001

Solaris 10 8/11 doesn’t support Broadcom 5720 Dual-Port NIC of R420

Solaris 10 8/11 Doesn’t support broadcom 5720 dual-port NIC

Solution: Install driver manually
Download: http://www.broadcom.com/support/license.php?file=570x/sol86-15.2.2.zip
Use usb or CD upload the file into the system. Unpack it and run:

# rem_drv bge (remove old bge driver)
# pkgadd -d BRCMbge-Solaris_10u10-i386-15.2.2.pkg
# devfsadm

And you can find the bge in /dev

5720 is in the HCL of Solaris 11

WWN FC connection有關的命令

Server side:
fcinfo hba-port: 查看光纖卡端口WWN,速率,生產廠家,firmware等信息
在release較早的Solaris10裡可能不支持
luxadm -e port:
查看光纖卡端口的物理地址和連接狀態
cfgadm -al:
查看scsi及fc channel的物理連接狀況
luxadm probe
搜尋光纖通道上的卷信息,會自動根據路徑歸類
Cisco FC SW: show flogi database
查看每個SPF端口上的連接信息,包括WWN,連接類型等等
Brocade FC SW: switchShow
查看每個SPF端口上的連接信息,包括WWN,連接類型等等