免费注册 查看新帖 |

Chinaunix

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

(原创) 利用lucreate克隆V880的系统盘详细过程 [复制链接]

论坛徽章:
2
IT运维版块每日发帖之星
日期:2016-03-19 06:20:00数据库技术版块每日发帖之星
日期:2016-07-05 06:20:00
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2007-06-20 16:43 |显示全部楼层 |倒序浏览
今天有同事重装了V880+S10,重新克隆了系统盘,建议先升级OS kernel patch到最新版本.

1、将目标盘的分区信息设置与原系统一样(目标c0t1d0s2);

root@v880-2 # prtvtoc /dev/rdsk/c0t0d0s2 |fmthard -s - /dev/rdsk/c0t1d0s2

2、执行复制

root@v880-2 # lucreate -c S10_org -m /:/dev/dsk/c0t1d0s0:ufs -m -:/dev/dsk/c0t1d0s1:swap  \
root@v880-2 >-m /globaldevices:/dev/dsk/c0t1d0s5:ufs \
root@v880-2 > -n BE_new

解释:m 是mountpoint 具体看man lucreate
      

3、查看复制是否完整

root@v880-2 # lustatus
Boot Environment           Is       Active Active    Can    Copy      
Name                       Complete Now    On Reboot Delete Status   
-------------------------- -------- ------ --------- ------ ----------
S10_org                    yes      yes    yes       no     -         
BE_new                     yes      no     no        yes    -         

检查Is Complete列下的目标盘项是不是为yes,如不是则表明复制没有完成或不完整,其它项请查看man lustatus


4、激活目标盘,测试是否可以启动

root@v880-2 # luactivate BE_new


**********************************************************************

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@w21000000876c1c54,0:a

3. Boot to the original boot environment by typing:

     boot

**********************************************************************

Activation of boot environment <BE_new> successful.


5、用命令启动服务器(注意不能用reboot, halt, or uadmin命令重启)

  root@v880-2 # init 6

6、检查是否从目标盘启动(与format输出比较)

root@v880-2 # prtpicl -v |grep bootpath

以上步骤在V880上操作成功完成.

论坛徽章:
2
IT运维版块每日发帖之星
日期:2016-03-19 06:20:00数据库技术版块每日发帖之星
日期:2016-07-05 06:20:00
2 [报告]
发表于 2007-06-21 09:15 |显示全部楼层
在这里我的想法是克隆一个系统盘.尤其光纤硬盘.当然想使用live upgrade,则需要做更多的准备,包括升级到什么版本,该升级哪些包等.
当做完升级或想做的事后,用luactivate激活目标盘后,然后用init ot shutdown重启机器,即实现了用目标启动.
当想回到原来的启动环境时,其实在用luactivate时屏幕有提示如下:
*********************************************************************

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@w21000000876c1c54,0:a

3. Boot to the original boot environment by typing:

     boot

**********************************************************************

或者从目标启动后,运行luactivate命令重新激活原来的系统盘,用命令init or shutdown即可恢复到原来的系统盘.

每次成功创建了一个BE后,在/etc/lutab将增加一行,当觉得不想要时,个人觉得可以简单地移除这个文件就行了.

个人认为对于简单地复制系统盘来说操作还是非常简单的.也不需要安装额外的软件包,复制完后也不需要做任何配置文件的修改,在需要时在ok 修改一下boot-device的路径,或者直接boot diskx就行了.

[ 本帖最后由 bencyber 于 2007-6-21 09:30 编辑 ]

论坛徽章:
2
IT运维版块每日发帖之星
日期:2016-03-19 06:20:00数据库技术版块每日发帖之星
日期:2016-07-05 06:20:00
3 [报告]
发表于 2007-06-26 09:41 |显示全部楼层
原帖由 susbin 于 2007-6-23 09:20 发表
"每次成功创建了一个BE后,在/etc/lutab将增加一行,当觉得不想要时,个人觉得可以简单地移除这个文件就行了."

我原来也是像楼主这么想的,可是看到 /etc/lu 下被 lucreate 新建的这些文件,就觉得不是 ...

你非常仔细,看得挺认真!

不过在这里,我想的就是复制系统盘,那些文件的内容也是关于这个硬盘的分区信息,还是校验信息,以及在升级过程中需要读取的内容.如果就是单一复制系统盘,我还是坚持我的看法.

这个命令的目的主要是用于live升级OS.这不过是其中的一种用法.
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP