Chinaunix首页 | 论坛 | 博客
  • 博客访问: 3154112
  • 博文数量: 443
  • 博客积分: 11301
  • 博客等级: 上将
  • 技术积分: 5678
  • 用 户 组: 普通用户
  • 注册时间: 2004-10-08 12:30
个人简介

欢迎加入IT云增值在线QQ交流群:342584734

文章分类

全部博文(443)

文章存档

2022年(1)

2021年(1)

2015年(2)

2014年(1)

2013年(1)

2012年(4)

2011年(19)

2010年(32)

2009年(2)

2008年(4)

2007年(31)

2006年(301)

2005年(42)

2004年(2)

分类:

2006-04-23 15:34:16

 

一、在SUN E250上增加大容量硬盘

SUN E250服务器是一款可插入六块硬盘的工作组服务器,SUN公司官方称此服务器只可使用36GB以下的SCSI硬盘,通过实践我们成功的在SUN E250上插入了一块18GBSCSI硬盘安装操作系统,五块146GBSCSI硬盘作数据存储,具体操作过程如下:

  • 1、先插入18GB硬盘,安装Solaris 9操作系统。
  • 2、关闭系统,调整每一块SCSI大容量硬盘的ID号,使之不重复后,插入机器中。
  • 3、开机按Stop-A进入PROM状态 % init 0 ok (PROM状态提示)
  • 4、在PROM状态提示符下确认当前系统所连接的SCSI设备状况键入
§         probe-scsi  probe-scsi-all 

这时,系统将显示所能识别的SCSI设备极其设备号(Target ID),如果新连接的硬盘信息没有出现时,请按下述方法进行确认。
1)
检查设备号是否重复?

Target-ID SunOS 4.xSolaris 2.x 
  3 内藏硬盘 
  1 硬盘 通常与SunOS 4.x一致.
  2 硬盘 ID不重复时, 4,5
  0 硬盘 可以用于硬盘. 
  4 磁带  
  5 磁带  
  6 CD-ROM CD-ROM 

2) 检查电缆,插口,终端器等物理连接是否无误?
3) SCSI
电缆的总长度是否在6米以内?

  • 5、重新起动系统,键入
§         boot -r

注意,只有加入"-r"选项时, 系统在起动时才给所识别了的设备(包括SCSI设备) 生成相应的设备文件。

  • 6、对新增设的硬盘进行盘区划分
    进入系统状态后,执行format命令,对新增设的硬盘进行盘区划分。
§         # format (CR)
§         Searching for disks...done 
§         AVAILABLE DISK SELECTIONS:
§           0. c0t0d0 
§             /pci@1f,4000/scsi@3/sd@0,0
§           1. c0t1d0 
§             /pci@1f,4000/scsi@3/sd@9,0
§           2. c0t2d0 
§             /pci@1f,4000/scsi@3/sd@a,0
§           3. c0t3d0 
§             /pci@1f,4000/scsi@3/sd@b,0
§           4. c0t4d0 
§             /pci@1f,4000/scsi@3/sd@d,0
§           5. c0t5d0 
§             /pci@1f,4000/scsi@3/sd@f,0
§           Specify disk (enter its number): 1   //<-- 选择硬盘  
§             selecting c0t1d0 
§             [disk unformatted] 
§             format MENU: 
§             disk       select a disk 
§             type         select (define) a disk type 
§             partition    select (define) a partition table 
§             current      describe the current disk 
§             format       format and analyze the disk
§             repair       repair a defective sector 
§             show         translate a disk address 
§             label        write label to the disk 
§             analyze      surface analysis 
§             defect       defect list management 
§             backup       search for backup labels 
§             verify       read and display labels 
§             save         save new disk/partition definitions
§             inquiry      show vendor, product and revision
§             volname      set 8-character volume name 
§             !       execute , then return
§             quit 
§           format> partition  <-- 键入partition(p)进入分区状态 
§             PARTITION MENU: 
§                 0      - change `0' partition
§                 1      - change `1' partition
§                 2      - change `2' partition
§                 3      - change `3' partition
§                 4      - change `4' partition
§                 5      - change `5' partition
§                 6      - change `6' partition
§                 7      - change `7' partition
§                 select - select a predefined table
§                 modify - modify a predefined partition table
§                 name   - name the current table
§                 print  - display the current table
§                 label  - write partition map and label to the disk
§                 ! - execute , then return
§                 quit                      
§              partition> modify   <-- 键入modify(m),修改当前分区表.
§                 Select partitioning base: 
§                 0. Current partition table (original)
§                 1. All Free Hog Choose base 
§                 (enter number) [0]? 1 <-- 选择当前分区表. 
§         Part    Tag    Flag  Cylinders Size     Blocks 
§         0 unassigned   wm    0         0        (0/0/0)       0
§         1 unassigned   wm    0         0        (0/0/0)       0
§         2 unassigned   wm    0-49779  136.72GB  (49780/0/0) 286732800
§         3 unassigned   wm    0         0        (0/0/0)       0
§         4 unassigned   wm    0         0        (0/0/0)       0
§         5 unassigned   wm    0         0        (0/0/0)       0
§         6 unassigned   wm    0         0        (0/0/0)       0
§         7 unassigned   wm    0         0        (0/0/0)       0
§             Do you wish to continue creating a new partition 
§             table based on above table[yes]? y <-- 键入y,以当前分区表为基准分区。
§             Free Hog partition[6]? 7 <-- 选择适当的浮动区. (1)
§             Enter size of partition '0' [0b,0c,0mb]:0mb<-- 指定容量(2)
§         Enter size of partition '1' [0b,0c,0mb]:0mb
§             Enter size of partition '3' [0b,0c,0mb]:0mb
§             Enter size of partition '4' [0b,0c,0mb]:0mb
§             Enter size of partition '5' [0b,0c,0mb]:0mb
§         Enter size of partition '6' [0b,0c,0mb]:0mb
§             Enter size of partition '7' [0b,0c,0mb]:0mb
§             Part Tag Flag Cylinders Size Blocks 
§         0 unassigned   wm    0         0        (0/0/0)       0
§         1 unassigned   wm    0         0        (0/0/0)       0
§         2 unassigned   wm    0-49779  136.72GB  (49780/0/0) 286732800
§         3 unassigned   wm    0         0        (0/0/0)       0
§         4 unassigned   wm    0         0        (0/0/0)       0
§         5 unassigned   wm    0         0        (0/0/0)       0
§         6 unassigned   wm    0         0        (0/0/0)       0
§         7 unassigned   wm    0         0        (0/0/0)       0
§             Okay to make this the current partition table[yes]? y <-- 确认
§         Enter table name (remember quotes): new_table <-- 键入适当的名称. 
§             partition> label       <-- 键入label(lab),设定系统标识. 
§             ok to label disk? y    <-- 键入y 
§             partition> q           <-- 键入q退出分区状态. 
§             format> q              <-- 键入q退出format 

(1) 当改变其他分区尺寸时, 浮动区(Free Hog)用于在容量范围内进行自动调节。

(
2) 分区容量的具体指定方法为:
容量数值后面加"b": 指定块数。

容量数值后面加"c": 指定柱面数。
容量数值后面加"mb": 指定MB数。
建议采用"mb",以兆字节为单位指定分区容量。

如需要对硬盘阵列创建RAID,则需要对每块硬盘均进行上述操作,然后跳过7~12步直接创建RAID即可。

  • 7、生成新的文件系统
    newfs命令将所划分的分区生成为新的文件系统。
§         # /usr/sbin/newfs /dev/rdsk/c0t1d0s2 (CR) 

此命令将整个硬盘指定为一个分区。

  • 8、检查新生成的文件系统
    fsck命令检查新生成的文件系统是否正确。
§         # /usr/sbin/fsck /dev/rdsk/c0t1d0s2 (CR)
  • 9、安装新生成的文件系统
    建立安装用目录后用mount命令进行安装。
    例如,要将第2分区之文件系统用于home1时,可执行下述命令。
§         # mkdir /home1 (CR)
§         # mount /dev/dsk/c0t1d0s2 /home1 (CR)
  • 10、确认安装结果,用df命令确认安装结果。
§         # df -k (CR) 
  • 11、自动安装新设文件系统
    在系统起动时自动安装新设文件系统,修改/etc/vfstab文件。
§         # vi /etc/vfstab (CR)
§         #device    device    mount    FS     fsck   mount     mount
§         #to mount  to fsck    point    type   pass   at boot  options
§         #
§         /dev/dsk/c0t1d0s2 /dev/rdsk/c0t1d0s2 /home1  ufs  6   yes  - 
  • 12、重新起动系统
§         # reboot (CR)

至此,大容量SCSI硬盘即可被机器认可。

二、用软件对硬盘阵列创建RAID 5

以下是用solaris9系统和6块硬盘(一个系统盘,另外五块做raid5mount/var/eyou下做邮件系统的实例。

Solaris 9系统下用命令行形式下配置可分为9步完成!

  • 1、根据上述介绍的方法,使用format命令对每一块硬盘进行分区和格式化,设置硬盘卷标和其他参数。
  • 2、创建metadevice database他包括了硬盘分区在metadevices中的各项信息。
§         # metadb -a -f -c2 c0t1d0s2 c0t2d0s2 c0t3d0s2 c0t4d0s2 c0t5d0s2

用户应根据自己系统和添加硬盘的实际情况自己改变c0t1d0s2 c0t2d0s2 c0t3d0s2 c0t4d0s2 c0t5d0s2等参数。

  • 3、配置raid0 metadevice,此步定义了raid0 metadevice的名字,metadevice中的slices participatingstripe width等信息。
§         # metainit d0 -r c0t1d0s2 c0t2d0s2 c0t3d0s2 c0t4d0s2 c0t5d0s2 -i 65k 
  • 4、配置一个或多个hot spare pool,进行初始化。
§         # metainit hsp001
§         # metaparam -h hsp001 d0

此步操作需要时间较长,根据硬盘个数和容量而定,一般需要几个小时。是否结束可随时使用如下命令查看。

#metastat
  • 5、在metadevice创建一个文件系统
§         # newfs -c 256 -i 8192 -m 8 -C 65 /dev/md/rdsk/d0  

至此RAID 5已经创建成功。

  • 6、安装新生成的文件系统
    建立安装用目录后用mount命令进行安装。
§         # mkdir /var/eyou (CR)
§         # mount /dev/md/dsk/d0  /var/eyou (CR)
  • 7、确认安装结果,用df命令确认安装结果。
§         # df -k (CR) 
  • 8、自动安装新设文件系统
    将新建的文件系统mount在需要的目录,并设置开机自动加载!使用vi命令修改/etc/vfstab文件,在该文件后加入如下一行。
§         /dev/md/dsk/d0 /dev/md/rdsk/d0 /var/eyou ufs 6 yes -
  • 9、重新启动系统即可。
    solaris9系统下,也可启动管理控制台(SMC)工具在图型界面下配置,因为是中文图形界面,且每一步都有帮助提示,所以这里不再赘述!

    注意:不要采取图形和命令行形式混合使用,否则将导致配置不成功,在图形界面时也要先创建database,否则将无法进行下一步!

 

阅读(4150) | 评论(3) | 转发(0) |
给主人留下些什么吧!~~

gongerlin2008-01-28 09:52:20

头晕

gongerlin2008-01-28 09:51:43

配置raid0 metadevice 怎么回事 不是RAID5 ?