天下网吧 >> 网吧天地 >> 网吧技术 >> 网吧系统 >> 正文

SunOS 5.8下单硬盘模拟各种RAID

2008-4-8techtarget佚名

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 <ST315320A cyl 29649 alt 2 hd 16 sec 63>  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  

欢迎访问最专业的网吧论坛,无盘论坛,网吧经营,网咖管理,网吧专业论坛https://bbs.txwb.com

关注天下网吧微信,了解网吧网咖经营管理,安装维护:


本文来源:techtarget 作者:佚名

声明
本文来源地址:0
声明:本站所发表的文章、评论及图片仅代表作者本人观点,与本站立场无关。若文章侵犯了您的相关权益,请及时与我们联系,我们会及时处理,感谢您对本站的支持!联系Email:support@txwb.com.,本站所有有注明来源为天下网吧或天下网吧论坛的原创作品,各位转载时请注明来源链接!
天下网吧·网吧天下
  • 本周热门
  • 本月热门
  • 阅读排行