分类:
2005-10-17 17:21:26
The following task map identifies the procedures that are needed to manage solaris volume manager RAID-1 volumes:
1,create a mirror from unused slices:use the solaris volume manager GUI or the matainit command to create a mirror from unused slices
2,create a mirror from an existing file system:use the solaris volume manager GUI or the metainit command to create a mirror from an existing file system
3,record the path to the alternate boot device for a mirrored root:find the path to the alternative book device and enter it in the boot instructions
4,attach a submirror:use the solaris volume manager GUI or the metattach command to attach a submirror
5,detach a submirror:use the solaris volume manager GUI or the metadetach command to detach the submirror
6,place a submirror online or take a submirror offline:use the solaris volume manager GUI or the metaonline command to put a submirror online. use the solaris volume manager GUI or the metaoffline command to take a submirror offline
7,enable a slice within a submirror:use the solaris volume manager GUI or the metareplace command to enable a slice in a submirror
8,check mirror status:use the solaris volume manager GUI or the metastat command to check the status of RAID-1 volumes
9,change mirror options:use the solaris volume manager GUI or the metaparam command to change the options for a specific RAID-1 volume
10,expand a mirror:use the solaris volume manager GUI or the metattach command to expand the capacity of a mirror
11,replace a slice within a submirror:use the solaris volume manager GUI or the metareplace command to replace a slice in a submirror
12,replace a submirror:use the solaris volume manager GUI or the metattach command to replace a submirror
13,remove a mirror:use the solaris volume manager GUI the metadetach command, or the metaclear command to unmirror a file system
14,remove a mirror of a file system that can't be unmounted:use the solaris volume manager GUI, the metadetach command, or the metaclear command to unmirror a file system that can't be unmounted
15,use a mirror to perform backups:use the solaris volume manager GUI, the metaonline command, or the metaoffline commands to perform backups with mirrors
创建一个RAID-1卷的步骤:
1,创建两个stripes或者concatenations,这些组件变成了子镜像
2,用metainit命令创建one-way镜像:
# metainit volume-name -m submirror-name
3,如果要创建第二个子镜像,不用代m参数的metattach命令
实例:
# meatinit 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 d51
d50: submirror d52 is attached
从一个文件系统创建RAID-1卷的步骤:
1,确定要被做镜像的包含现有文件系统的分区,这里以c1t0d0s0为例
2,用命令metainit -f volume-name number-of-stripes components-per-stripe component-name创建一个新的RAID-0卷
3,在没有使用的分区c1t1d0s0上创建第二个RAID-0卷作为第二个子镜像,这个子镜像必须和原来的子镜像保持大小相同,使用metainit volume-name number-of-stripes components-per-stripe component-name命令创建
4,用命令metainit创建one-way镜像
# metainit volume-name -m submirror-name
5,如果在除了根文件系统之外的文件系统做镜像,编辑/etc/vfstab文件,例如将原有的/dev/dsk/c1t0d0s0改为/dev/md/dsk/d0
6,重新挂载新做镜像的文件系统(如果是对根文件系统做的镜像,运行metaroot volume-name命令并重启系统;如果是对不能卸载的文件系统做镜像,那么先卸载再挂载;如果是对除root之外的文件系统且不能被卸载的文件系统做镜像,直接重启)
7,用metattach命令来添加第二个子镜像
# metattach volume-name submirror-name
8,如果是对根文件系统做镜像,那么记录更改的boot路径