免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1206 | 回复: 0
打印 上一主题 下一主题

[RAID与磁盘阵列] 单硬盘模拟各种RAID的做法 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2005-05-09 12:49 |只看该作者 |倒序浏览

单硬盘模拟各种raid的做法
SunOS 5.8
login: root
Password:
Last login: Fri Apr  1 17:25:16 from 192.168.1.10
Sun Microsystems Inc.   SunOS 5.8       Generic Patch   February 2004
# format
Searching for disks...done
AVAILABLE DISK SELECTIONS:
       0. c0t0d0   ST
          /pci@1f,0/ide@d/dad@0,0
Specify disk (enter its number):
创建metadb数据库
# metadb -afc 3 c0t0d0s7
# bash
创建串联
bash-2.03# metainit d10 3 1 c0t0d0s4 1 c0t0d0s5 1 c0t0d0s6
d10: Concat/Stripe is setup
bash-2.03# metastat
d10: Concat/Stripe
    Size: 5654400 blocks
    Stripe 0:
        Device              Start Block  Dbase
        c0t0d0s4                   0     No   
    Stripe 1:
        Device              Start Block  Dbase
        c0t0d0s5                   0     No   
    Stripe 2:
        Device              Start Block  Dbase
        c0t0d0s6                   0     No   
bash-2.03# metadb  
        flags           first blk       block count
     a        u         16              1034            /dev/dsk/c0t0d0s7
     a        u         1050            1034            /dev/dsk/c0t0d0s7
     a        u         2084            1034            /dev/dsk/c0t0d0s7
bash-2.03# metaclear -a   
d10: Concat/Stripe is cleared
bash-2.03# metastat
创建条带
bash-2.03# metainit d10 1 3 c0t0d0s4 c0t0d0s5 c0t0d0s6
d10: Concat/Stripe is setup
bash-2.03# metastat
d10: Concat/Stripe
    Size: 5654400 blocks
    Stripe 0: (interlace: 32 blocks)
        Device              Start Block  Dbase
        c0t0d0s4                   0     No   
        c0t0d0s5                   0     No   
        c0t0d0s6                   0     No   
bash-2.03# metaclear -a
d10: Concat/Stripe is cleared
做Mirror
bash-2.03# metainit d2 1 1 c0t0d0s4
d2: Concat/Stripe is setup
bash-2.03# metainit d3 1 1 c0t0d0s5
d3: Concat/Stripe is setup
bash-2.03# metainit d1 -m d2
d1: Mirror is setup
bash-2.03# metattach d1 d3
d1: submirror d3 is attached
bash-2.03# metastat
d1: Mirror
    Submirror 0: d2
      State: Okay         
    Submirror 1: d3
      State: Resyncing   
    Resync in progress: 0 % done
    Pass: 1
    Read option: roundrobin (default)
    Write option: parallel (default)
    Size: 1884800 blocks
d2: Submirror of d1
    State: Okay         
    Size: 1884800 blocks
    Stripe 0:
        Device              Start Block  Dbase State        Hot Spare
        c0t0d0s4                   0     No    Okay         
d3: Submirror of d1
    State: Resyncing   
    Size: 1884800 blocks
    Stripe 0:
        Device              Start Block  Dbase State        Hot Spare
        c0t0d0s5                   0     No    Okay         
bash-2.03# metadetach d1 d3
d1: submirror d3 is detached
bash-2.03# metaclear -a
d1: Mirror is cleared
d2: Concat/Stripe is cleared
d3: Concat/Stripe is cleared
bash-2.03# metastat
做RAID5
bash-2.03# metainit d10 -r c0t0d0s4 c0t0d0s5 c0t0d0s6 -i 20k
d10: RAID is setup
bash-2.03#
bash-2.03# metastat
d10: RAID
    State: Initializing
    Initialization in progress: 6% done
    Interlace: 40 blocks
    Size: 3764888 blocks
Original device:
    Size: 3768720 blocks
        Device              Start Block  Dbase State        Hot Spare
        c0t0d0s4                 410     No    Initializing
        c0t0d0s5                 410     No    Initializing
        c0t0d0s6                 410     No    Initializing
bash-2.03# metaclear -a
d10: RAID is cleared
做Concatenated Stripe
bash-2.03# metainit d1 2 1 c0t0d0s4 -i 16k 2 c0t0d0s5 c0t0d0s6 -i 32k
d1: Concat/Stripe is setup
bash-2.03# metastat
d1: Concat/Stripe
    Size: 5654400 blocks
    Stripe 0:
        Device              Start Block  Dbase
        c0t0d0s4                   0     No   
    Stripe 1: (interlace: 64 blocks)
        Device              Start Block  Dbase
        c0t0d0s5                   0     No   
        c0t0d0s6                   0     No   


本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/832/showart_25038.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP