免费注册 查看新帖 |

Chinaunix

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

Solstice Disksuite command line reference [复制链接]

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

在精华区找到予默的一篇不错的资料,特收录于此。
Solstice Disksuite
Location of components
----------------------
command line utilities in /usr/opt/SUNWmd/sbin
driver modules in /kernel/drv and /kernel/misc
daemons in /usr/opt/SUNWmd/sbin
administrative files in /etc/opt/SUNWmd
metadevices are named /dev/md/{dsk|rdsk}/dn, with n from 0 to 127 by default
the packages are SUNWmd and SUNWmdg (the GUI)
Useful options
--------------
The -f option can be used with most commands to force the operation. This is needed when doing an operation on a mounted filesystem.
md.tab file
-----------
The /etc/opt/SUNWmd/md.tab file can be used to configure ODS automatically.
# metastat -p >
This will output your configuration in md.tab format
# metainit -a
This command reads the md.tab file and sets up the configuration accordingly
Creating replicas
-----------------
# metadb -a -f c0t3d0s7
Before you can use Disksuite software, you must create the metadevice state database. The replica can exist on a dedicated disk partition or within a concat, stripe, or logging metadevice.
There MUST be 3 replicas or Disksuite S/W cannot be used correctly.
Se Documentation for more info on replicas.
it modifies /etc/system, /etc/opt/SUNWmd/mddb.cf
you can also modify the md.tab file to create a configuration
Concatenation
-------------
# metainit d1 3 1 c0t1d0s2 1 c1t1d0s2 1 c2t1d0s2
where d1 is the metadevice, 3 is the number of components to concatenate and 1 is the number of components per device
Simple Stripe
-------------
# metainit d2 1 3 c0t1d0s2 c1t1d0s2 c2t1d0s2 -i 16k
where d2 is the metadevice, 1 is the number of components to concatenate and 3 is the number of slices to stripe across -i 16k indicates the amount of data to write to each disk in stripe before moving to next one
Concat/Stripe
-------------
# metainit d3 3 3 c0t1d0s2 c1t1d0s2 c2t1d0s2 -i 16k 3 c3t1d0s2 c4t1d0s2 c5t1d0s2 -i 16k 3 c6t1d0s2 c7t1d0s2 c8t1d0s2 -i 16k
Here there are three stripes concatenated together. d3 is the metadevice.
The first 3 is the number of components to concatenate.
The second and subsequent 3's indicate the number of slices to
stripe across. The options there are as in the simple stripe.
Extending a metadevice
----------------------
# metattach d1 c3t1d0s2
extends a metadevice by concatenating a slice to the end. It does not add a filesystem.
# growfs /dev/md/rdsk/d1
If the metadevice is not mounted, the above command extends the filesystem to include the added section. You cannot shrink this filesystem later.
# growfs -M /export/home /dev/md/rdsk/d1
If the metadevice is mounted, the above command will extend the filesystem to include the concatenated section. Again, you cannot shrink the filesystem later.
Removing a metadevice
---------------------
# metaclear d3
d3 is the metadevice.
# metaclear -a -f
clears all metadevices. Don't do this unless you want to blow away your entire configuration.
The devices cannot be open for use.., i.e. mounted
Viewing your configuration and status
-------------------------------------
# metastat
shows the configuration and status of all metadevices
# metastat d3
will tell the configuration and status of just metadevice d3
# metadb
tells the location and status of locally configured replicas
Hot Spare pools
---------------
# metainit hsp001
sets up a pool called hsp001. It contains no disks yet.
# metahs -a hsp001 c0t1d0s4
adds a slice to the hot spare pool.
NOTE: it is advisable to add disks/slices to the pool in order of smallest to largest.
This way the smallest hotspare capable of replacing a disk will kick in.
# metahs -s all c1t1d0s4
adds a slice to all pools
# metaparam -h hsp001 d1
makes a hot spare pool available to the metadevice d1 {submirror or RAID5}
# metahs -e c1t1d0s4
reenables a a hot spare that was previously unavailable
# metahs -r hsp001 c1t1d0s4 c2t1d0s4
replaces the first disk listed with the second
# metahs -d all c1t1d0s4
removes a disk from all hot spare pools
# metahs -d hsp001 c1t1d0s4
removes a slice from hsp001
# metahs -d hsp001
removes a hot spare pool
# metahs -i
# metastat
tell you the status
Mirrors
-------
# metainit d0 -m d1
makes a one-way mirror. d0 is the device to mount, but d1 is the only one associated with an actual device.
A "one-way mirror" is not really a mirror yet. There's only one place where the data is actually stored, namely d1.
# metattach d0 d2
attaches d2 to the d0 mirror. Now there are 2 places where the data are stored, d1 and d2. But you mount the metadevice d0.
# metadetach d0 d1
detaches d1 from the d0 mirror
# metaoffline d0 d2
# metaonline d0 d2
suspends/resumes use of d2 device on d0 mirror
# metareplace d0 c1t0d0s2 c4t1d0s2
replaces first disk listed with second on the d0 mirror
# metareplace -e d0 c1t1d0s2
re-enables a disk that has been errored.
Mirroring root
--------------
You must take a few extra steps to mirror the root partition
# metainit d1 1 1 c0t3d0s0  
RAID 5
------
# metainit d1 -r c0t1d0s2 c1t1d0s2 c2t1d0s2 -i 16k
sets up a RAID 5 configuration.
The -i option is the same as in striping.
# metareplace d1 c2t3d0s2 c3t1d0s2
# metareplace -e d1 c0t1d0s2
replacing disks as in the mirror.
# metattach d1 c4t3d0s2
concatenates a disk to the end of the RAID 5 configuration.
# metaparam -h hsp001 d1
adds a hot spare pool
# metaclear d1
removes a metadevice
# metastat
tells status
UFS logging
-----------
# metainit d0 -t d1 d2
sets up a trans device d0 with d1 as the master and d2 as the logging device.
recommended 1MB logging/1GB data on master
# metainit d0 -t c0t1d0s2 c3t2d0s5
same as above
# metattach d0 d1
# metattach d0 c3t1d0s5
# metadetach d0
attaching and detaching
Disksets
--------
# command -s options
you can do almost everything the same way, except specify -s
metadevices in shared diskset are called /dev/md//{dsk|rdsk}/dn
hot spare pools within a shared diskset are named /hspnnn
disksets are only supported on SSA disks and disks are repartitioned when put into a diskset unless slice 2 is zeroed out and slice 7 has cylinders 0-4 or 0-5 allocated to it for the diskset metadb
# metaset -s -a -h
adds hosts to a set
# metaset -s -a c2t0d0 c2t1d0 c2t2d0 c2t3d0
adds drives to a set. Notice we do not specify slice.
# metaset -s -d c2t3d0
# metaset -s -d -h
removes hosts and drives
# metaset -s -t
take control of a diskset. the -f option will force control but will panic other machine, unless it has been released from other host.
# metaset -s -r
releases control of a diskset
Troubleshooting info to gather
------------------------------
output from following...
# metastat
# metadb -i
# prtvtoc on relevant devices
# mount
# /var/adm/messages


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

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP