- 论坛徽章:
- 1
|
V890上克隆磁盘
转载请注明Oldunix
很久以前写过一个克隆磁盘的帖子 http://bbs.chinaunix.net/viewthread.php?tid=136216&extra=
这是SCSI时代的技术,用在FC时代有点勉为其难了!
昨天参考论坛文章,http://bbs.chinaunix.net/thread-951614-1-1.html 在V890上做了一次。增加了一项解决不成功克隆后的处理方法。
下面是整个过程:
硬盘克隆目标 c1t0d0 -----> c1t1d0
1、复制分区信息
prtvtoc /dev/rdsk/c1t1d0s2 |fmthard -s - /dev/rdsk/c1t1d0s2
2、如果有以前不成功的复制,执行如下,进行清除:
lucancel
lustatus
ludelete c1t1d0s2
3、执行如下克隆每个启动盘的分区
lucreate -c c1t0d0 \
-m /:/dev/dsk/c1t1d0s0:ufs \
-m -:/dev/dsk/c1t1d0s1:swap \
-m /var:/dev/dsk/c1t1d0s3:ufs \
-m /globaldevices:/dev/dsk/c1t1d0s4:ufs \
-m /opt:/dev/dsk/c1t1d0s5:ufs \
-m /users:/dev/dsk/c1t1d0s6:ufs \
-n c1t1d0
-c c1t0d0 源盘
-n c1t1d0 目标盘
-m 目录:目标盘块设备分区:文件系统 或者 -:目标盘块设备交换分区:swap
4、克隆结束后,查看状态:
root@rac1 # lustatus
Boot Environment Is Active Active Can Copy
Name Complete Now On Reboot Delete Status
-------------------------- -------- ------ --------- ------ ----------
c1t0d0 yes yes yes no -
c1t1d0 yes no no yes -
5、激活克隆盘
root@rac1 # luactivate c1t1d0
**********************************************************************
The target boot environment has been activated. It will be used when you
reboot. NOTE: You MUST NOT USE the reboot, halt, or uadmin commands. You
MUST USE either the init or the shutdown command when you reboot. If you
do not use either init or shutdown, the system will not boot using the
target BE.
**********************************************************************
In case of a failure while booting to the target BE, the following process
needs to be followed to fallback to the currently working boot environment:
1. Enter the PROM monitor (ok prompt).
2. Change the boot device back to the original boot environment by typing:
setenv boot-device
/pci@8,600000/SUNW,qlc@2/fp@0,0/disk@w5000cca004261389,0:a
3. Boot to the original boot environment by typing:
boot
**********************************************************************
Activation of boot environment <c1t1d0> successful.
root@rac1 #
6、记录以上的信息,根据需要是否修改PROM,或者通过:
boot disk1
boot disk
来选择启动哪块硬盘
[ 本帖最后由 oldunix 于 2008-6-4 17:32 编辑 ] |
|