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

Leave a Reply

Your email address will not be published. Required fields are marked *