您好,欢迎来到华佗小知识。
搜索
您的当前位置:首页使用磁盘克隆 AIX操作系统new

使用磁盘克隆 AIX操作系统new

来源:华佗小知识


一.磁盘克隆安装操作系统。

1.操作系统环境。# oslevel -s

6100-04-10-1119

# bootlist -m normal -ocd0

hdisk0 pathid=0

ent0 speed=auto duplex=auto bserver=000.000.000.000 client=000.000.000.000 gateway=000.000.000.000

# lspv

hdisk0 00cc1ad4ef095bf0 rootvg active

hdisk1 00cc1ad46aff307f None

2.使用alt_disk_install工具克隆磁盘。

# alt_disk_install -OCB hdisk1

+-----------------------------------------------------------------------------+

ATTENTION: calling new module /usr/sbin/alt_disk_copy. Please see the alt_disk_copy man pageand documentation for more details.

Executing command: {/usr/sbin/alt_disk_copy -O -B -d \"hdisk1\

+-----------------------------------------------------------------------------+Calling mkszfile to create new /image.data file.Checking disk sizes.

Creating cloned rootvg volume group and associated logical volumes.

Creating logical volume alt_hd6 Creating logical volume alt_hd8 Creating logical volume alt_hd4 Creating logical volume alt_hd2

Creating logical volume alt_hd5Creating logical volume alt_hd9var

Creating logical volume alt_hd1

Creating logical volume alt_hd3Creating logical volume alt_hd10opt

Creating logical volume alt_livedump Creating /alt_inst/ file system. /alt_inst filesystem not converted.

Creating logical volume alt_hd11admin

Small inode extents are already enabled.Creating /alt_inst/admin file system.

/alt_inst/admin filesystem not converted.

Small inode extents are already enabled.Creating /alt_inst/home file system.

/alt_inst/home filesystem not converted.

Small inode extents are already enabled.Creating /alt_inst/opt file system.

/alt_inst/opt filesystem not converted.

Small inode extents are already enabled.Creating /alt_inst/tmp file system.

/alt_inst/tmp filesystem not converted.

Small inode extents are already enabled.Creating /alt_inst/usr file system.

/alt_inst/usr filesystem not converted.

Small inode extents are already enabled.Creating /alt_inst/var file system.

/alt_inst/var filesystem not converted.

Creating /alt_inst/var/adm/ras/livedump file system.

Small inode extents are already enabled./alt_inst/var/adm/ras/livedump filesystem not converted. Small inode extents are already enabled.Generating a list of files

for backup and restore into the alternate file system...Backing-up the rootvg files and restoring them to the alternate file system...

Modifying ODM on cloned disk.

Building boot image on cloned disk.Resetting all device attributes.

NOTE: The first boot from altinst_rootvg will prompt to define the newsystem console.

Resetting all device attributes.

NOTE: The first boot from altinst_rootvg will prompt to define the newsystem console.

forced unmount of /alt_inst/var/adm/ras/livedump forced unmount of /alt_inst/var forced unmount of /alt_inst/var forced unmount of /alt_inst/usr forced unmount of /alt_inst/usr forced unmount of /alt_inst/tmp forced unmount of /alt_inst/tmp forced unmount of /alt_inst/opt forced unmount of /alt_inst/opt forced unmount of /alt_inst/home forced unmount of /alt_inst/home forced unmount of /alt_inst/admin

forced unmount of /alt_inst/var/adm/ras/livedump

forced unmount of /alt_inst/admin

forced unmount of /alt_inst

forced unmount of /alt_inst

Changing logical volume names in volume group descriptor area.Fixing LV control blocks...

Fixing file system superblocks...

执行这个命令需要bos.alt_disk_install.rte软件包。alt_disk_install -OCB hdisk1

这个命令克隆的盘,可以拿到不同硬件配置的服务器上使用,使用它进行引导时,会删除ODM库里的所有信息,根据硬件重新配置所有设备信息,相当于使用克隆盘重新安装新的系统。

alt_disk_install -CB hdisk1

如果是相同硬件配置的机器,则可以运行这个命令克隆磁盘,保持所有设备信息。

3.查看克隆情况。# lspv

hdisk0 00cc1ad4ef095bf0 rootvg active hdisk1 00cc1ad46aff307f altinst_rootvg #alt_disk_install -X #rmdev -dl hdisk1

hdisk1对应的卷组名为altinst_rootvg。

# bootlist -o -m normalcd0

hdisk0 pathid=0

ent0 speed=auto duplex=auto bserver=000.000.000.000 client=000.000.000.000 gateway=000.000.000.000

查看引导列表,未发生变化。

4.重启操作系统。# lspv

hdisk0 00cc1ad4ef095bf0 rootvg active hdisk1 00cc1ad46aff307f altinst_rootvg # bootlist -o -m normalcd0

hdisk0 pathid=0

ent0 speed=auto duplex=auto bserver=000.000.000.000 client=000.000.000.000 gateway=000.000.000.000卷组名和引导顺序未发生变化。

5.拔掉克隆磁盘。

关闭操作系统,拔掉hdisk1,重启源服务器,查看服务器情况:# lspv

hdisk0 00cc1ad4ef095bf0 rootvg active # lsdev -Cc disk

hdisk1 Defined 01-08-00 SAS Disk Drive

删除被拔掉的磁盘: # rmdev -dl hdisk1 hdisk1 deleted # lsdev -Cc disk

hdisk0 Available 01-08-00 SAS Disk Drive

6.将克隆磁盘移植到新服务器。

hdisk0 Available 01-08-00 SAS Disk Drive

将hdisk1插入新服务器,新插入的盘不会自动引导系统的启动,需要在分区启动时进入SMS菜单,手动指定磁盘启动。

1).进入SMS菜单,选择5:

2).选择1:

3).选择7:

4).选择3引导系统:

5).选择2:

6).选择1:

7).选择2:

7.检查系统:# lspv

hdisk0 00cc1ad46aff307f rootvg active # lsdev -Cc disk

hdisk0 Available 00-08-00 SAS Disk Drive# bootlist -o -m normalcd0-

ent0 speed=auto duplex=auto bserver=000.000.000.000 client=000.000.000.000 gateway=000.000.000.000

修改引导顺序:

# bosboot -a -d /dev/hdisk0

bosboot: Boot image is 53276 512 byte blocks.# bootlist -o -m normal hdisk0

# bootlist -o -m normal hdisk0 blv=hd5 pathid=0

hdisk0 blv=hd5 pathid=0自此,分区重启即可自动启动。

因篇幅问题不能全部显示,请点此查看更多更全内容

Copyright © 2019- huatuo0.cn 版权所有 湘ICP备2023017654号-2

违法及侵权请联系:TEL:199 18 7713 E-MAIL:2724546146@qq.com

本站由北京市万商天勤律师事务所王兴未律师提供法律服务