最新SUN sparc 平台下已知道的创建硬RAID是两种方法.
一、是在Solaris下使用raidctl命令
请参考蜘蛛大侠的 "[分享]Sun V440下如何创建、删除及恢复硬RAID 1的方法"
http://bbs.chinaunix.net/viewthread.php?tid=430792&highlight=%B6%AB%B7%BD%D6%A9%D6%EB
二、是基于OBP平台创建硬RAID。
这个功能我在以前的机器没见到过,这是最新发布的 V215 / V245平台才见到的。
下面我列出详细的创建步骤
1、在创建之前要设置auto-boot?为false fcode-debug? 为true
ok setenv auto-boot? false
auto-boot? = false
ok setenv fcode-debug? true
fcode-debug? = true
ok reset-all
:
: <system resets>
2、进入到disk目录
ok show-disks
a) /pci@1e,600000/pci@0/pci@a/pci@0/pci@8/scsi@1/disk
b) /pci@1e,600000/pci@0/pci@1/pci@0/ide@1f/cdrom
c) /pci@1e,600000/pci@0/pci@1/pci@0/ide@1f/disk
q) NO SELECTION
ok select /pci@1e,600000/pci@0/pci@a/pci@0/pci@8/scsi@1
这里的我想没习惯用select 使用cd /pci@1e,600000/pci@0/pci@a/pci@0/pci@8/scsi@1 也是可以的。
3、查看是否创建了卷,同时得到disk ID
ok show-volumes
No volumes to show
ok probe-scsi-all
其实这里如果确认没有创建卷,我们用probe-scsi-all来查看disk id。
4、创建卷,在这里使用create 命令。不过有点怪异,好像是反着用的:D
[color=red]ok 0 1 create-im-volume[/color]
Target 0 size is 143243264 Blocks, 73 GB
Target 1 size is 143243264 Blocks, 73 GB
The volume can be any size from 1 MB to 69943 MB
What size do you want? [69943]
Volume size will be 143243264 Blocks, 73 GB
PhysDisk 0 has been created for target 0
PhysDisk 1 has been created for target 1
Volume has been created
到这里的话,卷就创建好了。
5、查看我们建立的卷
[color=red]ok show-volumes[/color]
Volume 0 Target 0 Type IM (Integrated Mirroring)
Optimal Enabled
2 Members 143112591 Blocks, 73 GB
Disk 1
Primary Online
Target 4 FUJITSU MAY2073RCSUN72G 0401
Disk 0
Secondary Online
Target 1 FUJITSU MAY2073RCSUN72G 0401
6、退出设备目录
ok unselect-dev
7、把我们第一步的参数改回来。
auto-boot?为true fcode-debug? 为false ,reset系统
到这里基于OBP的硬RAID就创建的整个过程就完成了。
三、注意两点
基于OBP创建的RAID 1
1、在创建RAID 前,auto-boot? 一定要设置成false
2、当要换创建了卷的主板时,要重新激活。方法如下
ok select /pci@1e,600000/pci@0/pci@a/pci@0/pci@8/scsi@1
ok show-volumes ( Look for the inactive volume)
ok X activate-volume (X is the volume number)
ok unselect-dev
四、在OBP下删除卷
1、在创建之前要设置auto-boot?为false fcode-debug? 为true
ok setenv auto-boot? false
auto-boot? = false
ok setenv fcode-debug? true
fcode-debug? = true
ok reset-all
:
: <system resets>
2、进入到disk目录
ok show-disks
a) /pci@1e,600000/pci@0/pci@a/pci@0/pci@8/scsi@1/disk
b) /pci@1e,600000/pci@0/pci@1/pci@0/ide@1f/cdrom
c) /pci@1e,600000/pci@0/pci@1/pci@0/ide@1f/disk
q) NO SELECTION
ok select /pci@1e,600000/pci@0/pci@a/pci@0/pci@8/scsi@1
3、查看系统建立的卷
ok show-volumes
Volume 0 Target 0 Type IM (Integrated Mirroring)
Optimal Enabled
2 Members 143112591 Blocks, 73 GB
Disk 1
Primary Online
Target 4 FUJITSU MAY2073RCSUN72G 0401
Disk 0
Secondary Online
Target 1 FUJITSU MAY2073RCSUN72G 0401
4、删除卷
[color=red]ok 0 delete-volume[/color]
The volume and its data will be deleted
Are you sure (yes/no)? [no] yes
Volume 0 has been deleted
5、查看是否删除
ok show-volumes
No volumes to show
6、退出设备目录
ok unselect-dev
7、把我们第一步的参数改回来。
auto-boot?为true fcode-debug? 为false 。reset系统
[color=red]这里仅仅是篇文档[/color],有接触这两种机器的朋友可以把你们创建及使用OBP级RAID过程中的种种写下来。
[color=red]注意:[/color]上午的第三步有点错误,没创建之前是看不到卷的。只有创建好了才能看得到,这在第五步能看到。添加了如何删除OBP级别下创建的RAID。
[ 本帖最后由 huanglao2002 于 2007-1-11 13:15 编辑 ]
东方蜘蛛 回复于:2007-01-11 11:43:25
不错,收藏:)
东方蜘蛛 回复于:2007-01-11 11:48:34
创建完后是不是要把auto-boot?再设成true?
启动后在系统里面还能看到第二块硬盘吗?
如果有硬盘坏了,更换后会自动同步吗?
brucewoo 回复于:2007-01-11 11:50:35
不错,不过没有用过这款机器
xidian2002 回复于:2007-01-11 12:19:26
收藏!学海无涯阿!呵呵
huanglao2002 回复于:2007-01-11 12:41:07
引用:原帖由 东方蜘蛛 于 2007-1-11 11:48 发表
创建完后是不是要把auto-boot?再设成true?
启动后在系统里面还能看到第二块硬盘吗?
如果有硬盘坏了,更换后会自动同步吗?
蜘蛛大侠问问题真是厉害!!
1、创建完成了后把auto-boot? 设置成ture,那样才能自动启动。我想不设回来是可以的 。
只是创建RAID的时候一定要先设置auto-boot?成false,不然会报错的。
2、第二和第三个问题的话我看要CU上的兄弟共同努力,有谁能先看到实物了,做了试验。把蜘蛛大侠的提出的这两个问题的答案贴出来。在这里先谢了!!
“这里仅仅是篇文档,有接触这两种机器的朋友可以把你们创建及使用OBP级RAID过程中的种种写下来。”这也是我写这句话的原因。我看到的也只是篇文档,很多实际的问题我也和大家一样都不知道。如果我有机会接触一定把结果贴出来。
不知这样满意吗?:lol:
东方蜘蛛 回复于:2007-01-11 12:47:26
引用:原帖由 huanglao2002 于 2007-1-11 12:41 发表
蜘蛛大侠问问题真是厉害!!
1、创建完成了后把auto-boot? 设置成ture,那样才能自动启动。我想不设回来是可以的 。
只是创建RAID的时候一定要先设置auto-boot?成false,不然会报错的。
2、第二和第三 ...
谢谢,已经很不错了:mrgreen:
后面的我会关注并查找的,有结果会贴出来给大家分享:em02:
四平 回复于:2007-01-11 13:38:42
sunsovle上面的文档,参考一下喽
Document Audience: SPECTRUM
Document ID: 87435
Title: RAID on the Sun Fire [TM] V215/245 Servers
Copyright Notice: Copyright © 2007 Sun Microsystems, Inc. All Rights Reserved
Update Date: Tue Jan 09 00:00:00 MST 2007
Products: Sun Fire V245 Server, Sun Fire V215 Server
Technical Areas: RAID (Redundant Array of Independent Disks), Disk
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
Keyword(s):raid, disk, mirror, stripe, raid0, raid1, raidctl, format, v215, v245, sync, degraded
Description: Top
This document provides the basic information of RAID functionality on the Sun Fire[TM] V215 and V245 servers
Document Body: Top
Hardware - LSI SAS1064 4 Phy-wide SAS HBA built into the motherboard. The kernel module is "mpt".
Each LSI1064 HBA supports up to 2 RAID volumes at any one time.
Supported RAID Operations - Support for RAID0 (striping) and RAID1 (mirroring)
RAID1 - mirroring
A 2-disk primary->secondary configuration
All write I/Os are committed to both disks before returning to provide for data redundancy
Read I/Os may be serviced by either disk
Upon a single disk failure, the data is still available - the volume is in DEGRADED mode. The failed disk may be replaced and resync'd
If the volume is disabled (mirror is broken) the drives need to be relabeled and all data is lost.
When creating a RAID volume all data contained on the drives is lost. If mirroring of the boot drive is desired the RAID volume must be created before OS installation.
RAID0 - striping
A 2 or more disk configuration
No data is shared. Data is across all disks (concatenated) in exactly one location.
Write I/Os are committed in a round-robin fashion across all member disks, performance increased in some workload scenarios
Read I/Os are satisfied at their one location (performs as a single disk)
Upon a single disk failure, data is lost
If a RAID0 volume is disabled (broken), data is lost
When creating a RAID volume all data contained on the drives is lost.
Management of RAID volumes by use of the Solaris raidctl command
Create a mirror
raidctl -c [-r 1] primary secondary
Create a stripe
raidctl -c -r 0 disk1 disk2 [disk3] ...
Delete a RAID volume
raidctl -d volume
Display RAID volumes
raidctl
Update HBA controller firmware
raidctl -F file controller
Examples
1.) Creating a mirror
To create a RAID1 mirror
raidctl -c [-r 1] primary secondary
Example:
# raidctl -c c0t0d0 c0t1d0
RAID volume c0t0d0 will be created
Data on all drives will be lost
No file systems may be mounted on either disk
Secondary must be as large as primary
RAID volume has the capacity of one disk
2.) Creating a stripe
To create a RAID0 stripe
raidctl -c -r 0 disk1 disk2 [disk3] ..
Example:
# raidctl -c -r 0 c0t1d0 c0t2d0 c0t3d0
RAID volume c0t1d0 will be created
Data on all drives will be lost
No file systems may be mounted on any disk
RAID volume has the capacity of all disks
combined - smallest common size is used
After RAID volume creation
Member disk drives are no longer visible, only the RAID volume is presented
The RAID volume may be addressed as any other LUN in Solaris
The status of the RAID volume and it's member disks may be retrieved using raidctl(1M)
Each LSI1064 HBA supports up to 2 RAID volumes at any one time
Volumes must be labeled after creation before they can be used under Solaris
Labeling Volumes After Creation
After creating a RAID volume by using 'raidctl' or by using OBP level commands the volume must be labeled correctly before it can be used. This can be done using the 'format' command in Solaris:
As the root user run 'format' and choose the newly created volume from the list of drives.
(you may see some messages about the volume having a corrupt label or the block count being incorrect when booting or running format, this is due to the need for a correct label)
After the volume is selected chose "type" from the format menu, this will give you a list of available drive types to chose from.
Chose "0. Auto configure" from the list. This will define the volume with the correct type.
Then write the new label to the volume using the "label" command from the format> prompt. The system will ask you if you are ready to label the disk. type in "yes"
After you perform these steps the drive is ready for use. You can now partition the drive as needed and use the volume within Solaris normally.
Note also that after a RAID volume is deleted the drives that were previously part of the RAID volume should be re-labeled at that time for proper use also.
RAID Volumes Possible Status
OK - volume is optimal
DEGRADED - volume has a failed disk (mirror) or is otherwise functionally minimized
RESYNCING - volume is synchronizing (mirror)
FAILED - volume is offline
Disk Possible Status
OK - disk is operating normally
MISSING - disk is removed or otherwise offline
FAILED - disk is in a failed state and needs service
OBP Level Commands
Before running the RAID OBP commands the auto-boot? variable needs to be set to false and the fcode-debug? variable needs to be set to true, then a reset-all is performed. After the reset finishes the controller must be selected. In the example below the "show-disks" command is used to determine the controller path. Note that the "/disk" was left off the path since it is the controller you want to select. (You can also use the probe-scsi-all command to find the path.)
{1} ok setenv auto-boot? false
auto-boot? = false
{1} ok setenv fcode-debug? true
fcode-debug? = true
{1} ok reset-all
:
: <system resets>
:
{1} ok show-disks
a) /pci@1e,600000/pci@0/pci@a/pci@0/pci@8/scsi@1/disk
b) /pci@1e,600000/pci@0/pci@1/pci@0/ide@1f/cdrom
c) /pci@1e,600000/pci@0/pci@1/pci@0/ide@1f/disk
q) NO SELECTION
Enter Selection, q to quit: a
/pci@1e,600000/pci@0/pci@a/pci@0/pci@8/scsi@1/disk has been selected.
Type ^Y ( Control-Y ) to insert it in the command line.
e.g. ok nvalias mydev ^Y
for creating devalias mydev for /pci@1e,600000/pci@0/pci@a/pci@0/pci@8/scsi@1/disk
{1} ok select /pci@1e,600000/pci@0/pci@a/pci@0/pci@8/scsi@1
The "show-volumes" command will show if there are any existing volumes and their state.
{1} ok show-volumes
Volume 0 Target 0 Type IM (Integrated Mirroring)
Optimal Enabled
2 Members 143112591 Blocks, 73 GB
Disk 1
Primary Online
Target 4 FUJITSU MAY2073RCSUN72G 0401
Disk 0
Secondary Online
Target 1 FUJITSU MAY2073RCSUN72G 0401
{1} ok
If you wanted to create a volume you would select the controller as above and use the "create" command. The following example creates a mirrored volume with disks 0 and 1.
{0} ok 0 1 create-im-volume
Target 0 size is 143243264 Blocks, 73 GB
Target 1 size is 143243264 Blocks, 73 GB
The volume can be any size from 1 MB to 69943 MB
What size do you want? [69943]
Volume size will be 143243264 Blocks, 73 GB
PhysDisk 0 has been created for target 0
PhysDisk 1 has been created for target 1
Volume has been created
{0} ok
This command creates a striped volume using disks 0 and 1
{0} ok 0 1 create-is-volume
Target 0 size is 143243264 Blocks, 73 GB
Target 1 size is 143243264 Blocks, 73 GB
The volume can be any size from 1 MB to 139886 MB
What size do you want? [139886]
Volume size will be 286486528 Blocks, 146 GB
PhysDisk 0 has been created for target 0
PhysDisk 1 has been created for target 1
Volume has been created
{0} ok
To unselect
{0} ok unselect-dev
when you have completed managing the RAID volumes you can set the auto-boot? and fcode-debug? variables back and reset the system:
{1} ok setenv auto-boot? true
auto-boot? = true
{1} ok setenv fcode-debug? false
fcode-debug? = false
{1} ok reset-all
Remember that even if you create a RAID volume at the OBP level you will still need to label the volume using format in Solaris before they can be properly used.
If you have existing RAID volumes and have to replace the system board the
following commands will need to be run to see the volume with the new board
{1} ok show-disks
a) /pci@1e,600000/pci@0/pci@a/pci@0/pci@8/scsi@1/disk
b) /pci@1e,600000/pci@0/pci@1/pci@0/ide@1f/cdrom
c) /pci@1e,600000/pci@0/pci@1/pci@0/ide@1f/disk
q) NO SELECTION
Enter Selection, q to quit: q
/pci@1e,600000/pci@0/pci@a/pci@0/pci@8/scsi@1/disk has been selected.
Type ^Y ( Control-Y ) to insert it in the command line.
e.g. ok nvalias mydev ^Y
for creating devalias mydev for /pci@1e,600000/pci@0/pci@a/pci@0/pci@8/scsi@1/disk
{1} ok select /pci@1e,600000/pci@0/pci@a/pci@0/pci@8/scsi@1
{0} ok show-volumes ( Look for the inactive volume)
{0} ok X activate-volume (X is the volume number)
{0} ok unselect-dev
NOTE: IF the EEPROM variable "auto-boot?" was set to true you may get the following message.
{0} ok select /pci@1e,600000/pci@0/pci@a/pci@0/pci@8/scsi@1
Base SAS World Wide ID is 0!
This must be fixed immediately using set-sas-wwid
{0} ok
If you do see this message set "auto-boot?" to false and issue a "reset-all"
四平 回复于:2007-01-11 13:39:28
如何删除
Document Audience: SPECTRUM
Document ID: 87963
Title: How to delete a RAID volume on a Sun Fire[TM] V215/V245 at the OBP level
Copyright Notice: Copyright © 2006 Sun Microsystems, Inc. All Rights Reserved
Update Date: Tue Dec 12 00:00:00 MST 2006
Products: Sun Fire V215 Server, Sun Fire V245 Server
Technical Areas: Disk
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
Keyword(s):raid, disk, delete, raidctl, OBP, v215, v245
Description: Top
How do I delete a RAID volume from a Sun Fire[TM] V215/V245 if there is no bootable Solaris[TM] Operating System installed?
Document Body: Top
To create and delete RAID volumes normally it is recommended to boot into Solaris[TM] and use the raidctl command. However sometimes it is useful to be able to delete a volume while at the OBP level for troubleshooting or convenience (for example when a system is being redeployed and you would like to remove the previously setup RAID devices before performing a clean installation)
In these cases you can use the 'delete-volume' command at the OBP level to remove any unwanted volumes that are currently created.
follow these steps:
1. Set the auto-boot? parameter to false, set the fcode-debug? parameter to true and perform a reset-all:
{1} ok setenv fcode-debug? true
fcode-debug? = true
{1} ok setenv auto-boot? false
auto-boot? = false
{1} ok reset-all
2. After the reset completes you need to select the controller that has the volume you wish to remove. If you do not know the controller you can use the 'show-disks' command to find it (notice that /disk is removed from the path used):
{1} ok show-disks
a) /pci@1e,600000/pci@0/pci@a/pci@0/pci@8/scsi@1/disk
b) /pci@1e,600000/pci@0/pci@1/pci@0/ide@1f/cdrom
c) /pci@1e,600000/pci@0/pci@1/pci@0/ide@1f/disk
q) NO SELECTION
Enter Selection, q to quit: q
{1} ok select /pci@1e,600000/pci@0/pci@a/pci@0/pci@8/scsi@1
3. After selecting the controller, use the 'show-volumes' command to display the volumes that currently exist:
{1} ok show-volumes
Volume 0 Target 0 Type IM (Integrated Mirroring)
Optimal Enabled
2 Members 143112591 Blocks, 73 GB
Disk 1
Primary Online
Target 4 FUJITSU MAY2073RCSUN72G 0401
Disk 0
Secondary Online
Target 1 FUJITSU MAY2073RCSUN72G 0401
4. Using the volume number that you found in the previous step use 'delete-volume' to remove the RAID volume from the controller. Please note that deleting the volume WILL destroy the data on both of the drives:
{1} ok 0 delete-volume
The volume and its data will be deleted
Are you sure (yes/no)? [no] yes
Volume 0 has been deleted
5. Use the show-volumes command again to confirm that the volume has been properly deleted:
{1} ok show-volumes
No volumes to show
-you can then set the fcode-debug? variable back to false and reset-all the system.
Please Note: Just like when you create a RAID volume, when you delete a RAID volume you need to boot into Solaris and use the format utility to label the disks so that they have proper labels for use by Solaris. In format choose each of the drives that were affected by the change, select 'type' then '0' (auto-config) and then 'label' for each drive to ensure they are properly labeled. If there is no bootable Solaris OS on this system then you may boot single user mode off a dvd/cd or a Solaris network image to perform this action. e.g., 'boot net -s'
For more information on RAID with the V215/V245 please refer to infodoc 87435
kaka_sun 回复于:2007-01-11 21:09:40
收了
|