分享
 
 
 

Solstice Disksuite command line reference

王朝other·作者佚名  2006-11-24
窄屏简体版  字體: |||超大  

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 > <filename>

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 <-- the root partition

# metainit d0 -m d1

# metaroot d0

the metaroot command updates /etc/system and /etc/vfstab so that the device /dev/md/dsk/d0 is now the root device.

# reboot

you must do this to have d0 be the mounted device. Otherwise if you do the next step, data corruption will occur because of the round robin manner in which data is written

# metainit d2 1 1 c0t4d0s0

# metattach d0 d2

Now d2 is attached and data is mirrored on d1 and d2. The device to mount is d0.

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 <setname> options

you can do almost everything the same way, except specify -s <deskset>

metadevices in shared diskset are called /dev/md/<setname>/{dsk|rdsk}/dn

hot spare pools within a shared diskset are named <setname>/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 <setname> -a -h <hostname1> <hostname2>

adds hosts to a set

# metaset -s <setname> -a c2t0d0 c2t1d0 c2t2d0 c2t3d0

adds drives to a set. Notice we do not specify slice.

# metaset -s <setname> -d c2t3d0

# metaset -s <setname> -d -h <hostname>

removes hosts and drives

# metaset -s <setname> -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 <setname> -r

releases control of a diskset

Troubleshooting info to gather

------------------------------

output from following...

# metastat

# metadb -i

# prtvtoc on relevant devices

# mount

# /var/adm/messages

 
 
 
免责声明:本文为网络用户发布,其观点仅代表作者个人观点,与本站无关,本站仅提供信息存储服务。文中陈述内容未经本站证实,其真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
2023年上半年GDP全球前十五强
 百态   2023-10-24
美众议院议长启动对拜登的弹劾调查
 百态   2023-09-13
上海、济南、武汉等多地出现不明坠落物
 探索   2023-09-06
印度或要将国名改为“巴拉特”
 百态   2023-09-06
男子为女友送行,买票不登机被捕
 百态   2023-08-20
手机地震预警功能怎么开?
 干货   2023-08-06
女子4年卖2套房花700多万做美容:不但没变美脸,面部还出现变形
 百态   2023-08-04
住户一楼被水淹 还冲来8头猪
 百态   2023-07-31
女子体内爬出大量瓜子状活虫
 百态   2023-07-25
地球连续35年收到神秘规律性信号,网友:不要回答!
 探索   2023-07-21
全球镓价格本周大涨27%
 探索   2023-07-09
钱都流向了那些不缺钱的人,苦都留给了能吃苦的人
 探索   2023-07-02
倩女手游刀客魅者强控制(强混乱强眩晕强睡眠)和对应控制抗性的关系
 百态   2020-08-20
美国5月9日最新疫情:美国确诊人数突破131万
 百态   2020-05-09
荷兰政府宣布将集体辞职
 干货   2020-04-30
倩女幽魂手游师徒任务情义春秋猜成语答案逍遥观:鹏程万里
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案神机营:射石饮羽
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案昆仑山:拔刀相助
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案天工阁:鬼斧神工
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案丝路古道:单枪匹马
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:与虎谋皮
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:李代桃僵
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:指鹿为马
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案金陵:小鸟依人
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案金陵:千金买邻
 干货   2019-11-12
 
推荐阅读
 
 
 
>>返回首頁<<
 
靜靜地坐在廢墟上,四周的荒凉一望無際,忽然覺得,淒涼也很美
© 2005- 王朝網路 版權所有