2 拆除现有镜像
root@xz_netman # cd /etc
root@xz_netman # ls //下面输出有删减
LGTOuscsi nsswitch.conf
TIMEZONE nsswitch.dns
log syslog.pid
logindevperm system
lp system-INSTALL
lu tar
lvm telinit
name_to_major utmpx
name_to_sysnum uucp
nca vfstab
ncheck vfstab-INSTALL
net volcopy
netconfig vold.conf
root@xz_netman # more vfstab-I* //确认是否为镜像前的内容
root@xz_netman # more system-I* //确认是否为镜像前的内容
root@xz_netman # cp vfstab vfstab.bak //备份现有的vfstab
root@xz_netman # cp system system.bak //备份现有的system文件,供故障时还原
root@xz_netman # more system.bak //确认备份成功
root@xz_netman # more vfstab.bak
root@xz_netman # format
Searching for disks...done
AVAILABLE DISK SELECTIONS:
0. c1t0d0
/pci@8,600000/SUNW,qlc@4/fp@0,0/ssd@w21000004cfc333eb,0
1. c1t1d0
/pci@8,600000/SUNW,qlc@4/fp@0,0/ssd@w21000004cfc333ff,0
Specify disk (enter its number): ^D
root@xz_netman # prtconf -vp|grep bootpath //查看当前启动盘为0号盘
bootpath: '/pci@8,600000/SUNW,qlc@4/fp@0,0/disk@w21000004cfc333eb,0:a'
********************************************************************************
说明:因为当前的启动盘为0号盘,所以无法删0号盘上的故障子镜像,如果此时试图删除子镜像d11,会报一个错,如:
root@xz_netman # metadetach d10 d11
metadetach: xz_netman: d10: attempt an operation on a submirror that has erred components
必须先把系统启动到1号盘上,在进行删除。而要想从1号盘启动系统,现有的镜像不能拆。
*******************************************************************************
root@xz_netman # init 0
ok boot disk1
root@xz_netman#format
root@xz_netman # prtconf -vp|grep bootpath //确认启动盘是否为1号盘
root@xz_netman # metastat //再次确认镜像状态
root@xz_netman # metadetach -f d10 d11
d10: submirror d11 is detached
//删除处于需要维护状态的子镜像必须加-f参数进行强制删除
root@xz_netman # metaclear d11
d11: Concat/Stripe is cleared
root@xz_netman # metadetach d20 d21
d20: submirror d21 is detached
root@xz_netman # metaclear d21
d21: Concat/Stripe is cleared
root@xz_netman # metastat //确认0号盘上的子镜像已经全部删除
注:此处把0号盘上的子镜像删除,是因为防止把1号盘上的系统dump完成后,如果0号盘子镜像不删除,在最后重新同步镜像时可能会出错。