利用lucreate克隆V880的系统盘详细过程(转)

今天有同事重装了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 successful. 5、用命令启动服务器(注意不能用reboot, halt, or uadmin命令重启) root@v880-2 # init 6 6、检查是否从目标盘启动(与format输出比较) root@v880-2 # prtpicl -v |grep bootpath 以上步骤在V880上操作成功完成. -------------------------------------------------------------------------------- 东方蜘蛛 回复于:2007-06-20 17:21:54 不错,收藏先。。。。。:mrgreen::em02: -------------------------------------------------------------------------------- susbin 回复于:2007-06-20 19:47:10 It is easy to create a new boot environment, but the BEs are not esay to use if you customer is not familiar with Solaris Live Upgrade. If there is something wrong with the two BEs, you could be unable to activate the alternate BE or to repair them. In that case, you might want to remove all BEs and make the system back to the original status. However, I have not seen a Sun doc on how to remove a primary BE from Solaris. [ 本帖最后由 susbin 于 2007-6-20 21:27 编辑 ] -------------------------------------------------------------------------------- bencyber 回复于:2007-06-21 09:15:34 在这里我的想法是克隆一个系统盘.尤其光纤硬盘.当然想使用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 编辑 ] -------------------------------------------------------------------------------- brucewoo 回复于:2007-06-21 09:24:47 不错,好东西 -------------------------------------------------------------------------------- xieliangcheng 回复于:2007-06-21 09:37:04 速度快不快? 跟 DD SDS flarcreate 相比速度怎样? -------------------------------------------------------------------------------- susbin 回复于:2007-06-23 09:20:14 "每次成功创建了一个BE后,在/etc/lutab将增加一行,当觉得不想要时,个人觉得可以简单地移除这个文件就行了." 我原来也是像楼主这么想的,可是看到 /etc/lu 下被 lucreate 新建的这些文件,就觉得不是那么简单了。 # pwd /etc/lu # ls -l | grep Jun -rw-r--r-- 1 root other 417 Jun 4 13:02 ICF.1 -rw-r--r-- 1 root other 448 Jun 4 13:12 ICF.2 drwxr-xr-x 2 root sys 512 Jun 4 13:09 compare -rw-r--r-- 1 root other 1761 Jun 4 13:02 ludb.global.xml -rw-r--r-- 1 root other 286 Jun 4 13:12 ludb.local.xml drwxr-xr-x 2 root sys 512 Jun 4 13:02 tmp -rw-r--r-- 1 root other 136 Jun 4 13:12 vtoc.1 -rw-r--r-- 1 root other 136 Jun 4 13:12 vtoc.2 # -------------------------------------------------------------------------------- yuhuohu 回复于:2007-06-25 11:15:38 呵呵 努力,各位老大继续研究~ -------------------------------------------------------------------------------- bencyber 回复于:2007-06-26 09:41:22 引用:原帖由 susbin 于 2007-6-23 09:20 发表 "每次成功创建了一个BE后,在/etc/lutab将增加一行,当觉得不想要时,个人觉得可以简单地移除这个文件就行了." 我原来也是像楼主这么想的,可是看到 /etc/lu 下被 lucreate 新建的这些文件,就觉得不是 ... 你非常仔细,看得挺认真! 不过在这里,我想的就是复制系统盘,那些文件的内容也是关于这个硬盘的分区信息,还是校验信息,以及在升级过程中需要读取的内容.如果就是单一复制系统盘,我还是坚持我的看法. 这个命令的目的主要是用于live升级OS.这不过是其中的一种用法. -------------------------------------------------------------------------------- susbin 回复于:2007-06-29 04:24:25 前天掉电,一个 V250 出问题,刚好用来做个实验: 从CD 启动, 用备用盘替换坏掉的系统盘 (c0t0d0s0), 拆除镜像,再做两处改动: # mv /a/etc/lutab /a/etc/lutab-saved # mv /a/etc/lu /a/etc/lu-saved # reboot ... 系统可以正常启动。 # lustatus ERROR: No boot environments are configured on this system ERROR: cannot determine list of all boot environment names # # cd /etc # mv lutab-saved lutab # mv lu-saved lu # # lustatus Boot Environment Is Active Active Can Copy Name Complete Now On Reboot Delete Status -------------------------- -------- ------ --------- ------ ---------- d0_0518 yes yes yes no - t10s3_0604 yes no no yes - # # lufslist t10s3_0604 boot environment name: t10s3_0604 Filesystem fstype device size Mounted on Mount Options ----------------------- -------- ------------ ------------------- -------------- /dev/md/dsk/d3 swap ? - - /dev/dsk/c0t10d0s3 ufs 18339594240 / logging /dev/md/dsk/d6 ufs 18339594240 /usr/local logging /dev/md/dsk/d9 ufs 18339594240 /web.logs logging /dev/dsk/c0t1d0s1 ufs 18339594240 /backup logging /dev/dsk/c0t1d0s3 ufs 18339594240 /u01 logging /dev/dsk/c0t2d0s1 ufs 18339594240 /u03 logging /dev/dsk/c0t2d0s3 ufs 18339594240 /system.bak logging /dev/dsk/c0t9d0s1 ufs 18339594240 /access.logs logging # # lufslist d0_0518 ERROR: mount: No such device or address mount: Cannot open /dev/md/dsk/d0ERROR: cannot mount mount point device ERROR: cannot mount root device to mount point for boot environment ERROR: cannot determine file system configuration for boot environment ERROR: cannot determine file system list of boot environment # # mv lutab lutab-saved # mv lu lu-saved # # lustatus ERROR: No boot environments are configured on this system ERROR: cannot determine list of all boot environment names # -------------------------------------------------------------------------------- susbin 回复于:2007-06-29 23:26:06 More testing on the same V250: # lustatus ERROR: No boot environments are configured on this system ERROR: cannot determine list of all boot environment names # # mv lutab-saved lutab # # lustatus ERROR: cannot determine current boot environment name ERROR: cannot determine status of boot environment ERROR: cannot determine current boot environment name ERROR: cannot determine status of boot environment # # mv lu-saved lu # # lustatus Boot Environment Is Active Active Can Copy Name Complete Now On Reboot Delete Status -------------------------- -------- ------ --------- ------ ---------- d0_0518 yes yes yes no - t10s3_0604 yes no no yes - #[@more@]

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/9650775/viewspace-924238/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/9650775/viewspace-924238/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值