当前位置: 首页 > 图文教程 > 操作系统 > Unix/Linux > 如何克隆HP-UX系统盘

Unix/Linux
Fedora Core 3 使用 YUM 安裝 Mono
Linux网络安全之经验谈2
解决在编译过程中需要链接静态库的问题
LINUX网络安全文献
RHEL AS3U3 "vsftpd dead but subsys locked" problem
系统入侵
Linux上如何阻止系统攻击者
中软Linux邮件系统解决方案
Linux安装要点
XteamLinux系统简介
Linux操作系统分析
红旗RS-Linux安全系统简介
linux系统上的网络应用
Linux下的3个windows仿真器评测(下)
Linux的7件武器(下)
在KDE的菜单&桌面上为某应用程序创建自定义图标的快捷方式?
最基本RedHat7.3汉化步骤
RedHatLinux网络服务器构架实务(三)
RedHatLinux网络服务器构架实务(二)
RedHatLinux网络服务器构架实务(一)

Unix/Linux 中的 如何克隆HP-UX系统盘


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-11-01   浏览: 99 ::
收藏到网摘: n/a


  可以分两个阶段来做;
  第一阶段
  1 pvcreate -B /dev/rdsk/cxtydz
  2 mkboot /dev/rdsk/cxtydz
  3 mkboot -a "hpux -lq(;0)/stand/vmunix" /dev/rdsk/cxtydz
  第二阶段
  1 dd if=/dev/dsk/c1t2d0 of=/dev/dsk/cxtydz
  bs=1024k
  供参考:
  If you do not have Mirror/UX you can manually duplicate your boot disk to another disk. This is the process.
  
  * Assuming current LVM boot disk is on c1t2d0 and you want to duplicate to c2t2d0.
  # pvcreate -B /dev/rdsk/c2t2d0
  # mkdir /dev/vgroot; mknod /dev/vgroot/group c 64 0x010000
  # vgcreate /dev/vgroot /dev/dsk/c2t2d0
  # mkboot /dev/rdsk/c2t2d0
  # mkboot -a "hpux (;0)/stand/vmunix" /dev/rdsk/c2t2d0
  # lifls /dev/rdsk/c2t2d0
  ==> do lifcp of all other boot utilities from c1t2d0 to c2t2d0.
  # lvcreate -C y -r n -n lvol1 /dev/vgroot
  # lvextend -L 84 /dev/vgroot/lvol1 /dev/dsk/c2t2d0
  ==> creating and extending boot lv (/stand)

  # lvcreate -C y -r n -L 2048 -n lvol2 /dev/vgroot
  ==> creating swap LV
  # lvcreate -C y -r n -n lvol3 /dev/vgroot
  # lvextend -L 6544 /dev/vgroot/lvol3 /dev/dsk/c2t2d0
  
  ==> creating and extending root lv (/)
  # lvlnboot -b lvol1 /dev/vgroot
  # lvlnboot -r lvol3 /dev/vgroot
  # lvlnboot -s lvol2 /dev/vgroot
  # lvlnboot -d lvol2 /dev/vgroot
  ==> update BDRA for boot, root, swap and dump LVs.
  # newfs -F hfs /dev/vgroot/rlvol1 ==> /stand must be hfs
  # newfs -F vxfs /dev/vgroot/rlvol3
  # mkdir /newstand
  # mount /dev/vgroot/lvol1 /newstand
  # cd /stand
  # find . -xdev -depth -print|cpio pxdm /newstand
  # umount /newstand
  # mkdir /newroot
  # mount /dev/vgroot/lvol3 /newroot
  # cd /
  # find . -xdev -depth -print|cpio -pxdm /newroot
  # cd /newroot/etc
  # vi fstab
  ==> edit appropriately
  # lvlnboot -R
  ==> resync vg headers
  # setboot -p 0/0/2/0.2.0
  ==> change prim boot path to new disk (c2t2d0)
  
  The above assume you have /, /stand and swap only. If you have separate /opt, /usr, /tmp mounted for example, perform appropriate lvcreate on those. When it's all done you should be able to boot up from your 2nd disk. From here onwards, you have to manually synchronize bot your boot disks.