Sun volume manager(disksuite)用法
一、 组网需求:
SUN服务器或者工作站
SUNOS
二、 组网图:
无
三、 配置步骤:
适用于SUNOS 8以上版本
1.添加状态数据库副本
语法:Metadb –a –c –f dev_name_list
-f 用于在使用的文件系统
副本要求两个以上
# metadb -a -c 2 c1t2d0s3
2.metainit语法
metainit {volume-name} {number-of-stripes} {components-per-stripe}
{component-names…} [-i interlace-value]
volume-name 生成的卷名
number-of-stripes 生成的条带数
components-per-stripe 每个条带由几个slice组成
component-names slice名字列表
-iwidth interlace大小
3.生成raid0(stripe)
用例:
# metainit d20 1 3 c0t1d0s2 c0t2d0s2 c0t3d0s2 –i 32k(缺省16k)
d20: Concat/Stripe is setup
3.1生成RAID 0 (Concatenation)
用例:
# metainit d40 4 1 c0t1d0s2 1 c0t2d0s2 1 c0t2d0s3 1 c0t2d1s3
d40: Concat/Stripe is setup
3.2在线扩展卷RAID 0 (Concatenated Stripe) Volume
用例:
通过添加几个磁盘片生成一个 Concatenated Stripe
# metattach d25 c1t2d0s2 c1t2d1s2 c1t2d3s2
d25: components are attached
挂接路径:/dev/md/dsk/d25
清除卷:# umount d8
# metaclear d8
d8: Concat/Stripe is cleared
4.RAID 1 (Mirror) Volume
4.1 metainit {volume-name} [-m ] {submirror-name…}
volume-name 要生成的卷的名字
-m 指定生成镜像
submirror-name 第一个子镜像名
4.2 metattach {mirror-name} {new-submirror-name…}
添加第二个子镜像
用例:
# metainit d51 1 1 c0t0d0s2
d51: Concat/Stripe is setup
# metainit d52 1 1 c1t0d0s2
d52: Concat/Stripe is setup
# metainit d50 -m d51
d50: Mirror is setup
# metattach d50 d52
d50: Submirror d52 is attached
4.3 Creating a Mirror From root (/)
# metainit -f d1 1 1 c0t0d0s0
d11: Concat/Stripe is setup
# metainit d2 1 1 c0t1d0s0
d12: Concat/Stripe is setup
# metainit d0 -m d1
d10: Mirror is setup
# metaroot d0 对其他正在使用的文件系统作镜像不用执行此步操作
# lockfs –fa 对其他正在使用的文件系统作镜像不用执行此步操作
# reboot
...
# metattach d0 d2
d10: Submirror d12 is attached
4.4 解除镜像
# metastat
d5: mirror
Submirror 0: d50
...
# metadetach d5 d50
d5: submirror d50 is detached
4.5使能新的盘片
# metareplace -e mirror failed-slice
# metareplace -e d11 c1t4d0s7
d11: device c1t4d0s7 is enabled
5.raid5
5.1 命令:
metainit name -r component component component
用例:
# metainit d45 -r c2t3d0s2 c3t0d0s2 c4t0d0s2
d45: RAID is setup
命令:
metattach volume-name name-of-component-to-add
用例:
# metattach d2 c2t1d0s2
d2: column is attached
5.2 使能一个新组件
命令:
metareplace -e volume-name component-name
用例:
# metareplace -e d20 c2t0d0s2
5.3 替换失败盘
命令:
metareplace volume-name failed-component new-component
用例:
# metareplace d1 c0t14d0s6 c0t4d0s6
d1: device c0t14d0s6 is replaced with c0t4d0s6
Raid1和raid5可以使用hot spare pool
命令语法:
metainit hot-spare-pool-name ctds-for-slice
用例:
# metainit hsp001 c2t2d0s2 c3t2d0s2
hsp001: Hotspare pool is setup
新添加一个磁盘到pool
命令语法:
metahs -a hot-spare-pool-name slice-to-add
用例:
# metahs -a hsp001 /dev/dsk/c3t0d0s2
hsp001: Hotspare is added
5.4把一个hot spare pool分配给镜像卷d0
# metaparam -h hsp100 d10
# metaparam -h hsp100 d11
# metastat d0
把一个hot spare pool 分配给raid5卷
# metaparam -h hsp001 d10
# metastat d10
d10: RAID
State: Okay
Hot spare pool: hsp001
四、 配置关键点:
无
该案例暂时没有网友评论
✖
案例意见反馈
亲~登录后才可以操作哦!
确定你的邮箱还未认证,请认证邮箱或绑定手机后进行当前操作