设为首页 收藏本站
查看: 1011|回复: 1

[经验分享] AIX 7.1.0.0 硬盘克隆并移植

[复制链接]
累计签到:1 天
连续签到:1 天
发表于 2017-1-25 08:25:19 | 显示全部楼层 |阅读模式
# oslevel
7.1.0.0
# bootlist -m normal -o
cd0
hdisk0 blv=hd5 pathid=0
hdisk1 blv=hd5 pathid=0
ent0
# bootlist -m normal cd0 hdisk0 ent0
# bootlist -m normal -o
cd0
hdisk0 blv=hd5 pathid=0
ent0

# chpv -c hdisk1
# lspv
hdisk0          00c843b42d414eb9                    rootvg          active      
hdisk1          00c843b4bb3cf61e                    rootvg          active      
# reducevg rootvg hdisk1
0516-016 ldeletepv: Cannot delete physical volume with allocated
        partitions. Use either migratepv to move the partitions or
        reducevg with the -d option to delete the partitions.
0516-884 reducevg: Unable to remove physical volume hdisk1.
# rmdev -dl hdisk1
Method error (/usr/lib/methods/ucfgdevice):
        0514-062 Cannot perform the requested function because the
                 specified device is busy.
# lspv
hdisk0          00c843b42d414eb9                    rootvg          active      
hdisk1          00c843b4bb3cf61e                    rootvg          active
--------------------------------------分割线---------------------------------------------------------
注:如果有hdisk1有lv参考下边,lv迁移操作,没有lv,直接跳过
# lspv -l hdisk1
hdisk1:
LV NAME               LPs     PPs     DISTRIBUTION          MOUNT POINT
mqmloglv              4       4       00..00..00..00..04    /var/mqm/log
mqmlv                 4       4       00..00..00..00..04    /var/mqm
# migratepv -l mqmloglv hdisk1 hdisk0                         //迁移mqmloglv从hdisk1到hdisk0

# migratepv -l mqmlv hdisk1 hdisk0                              //迁移mqmlv从hdisk1到hdisk0
# lspv -l hdisk1
# reducevg rootvg hdisk1
----------------------------------------分割线-------------------------------------------------------

# lspv
hdisk0          00c843b42d414eb9                    rootvg          active      
hdisk1          00c843b4bb3cf61e                    None   
# bootinfo -B hdisk1
1
# 如果此命令返回值 1,则选择的磁盘可以由 AIX 引导。任何其它值表示 hdisk1 不是rootvg 制作镜像的候选。

# lslpp -L bos.alt_disk_install.rte      //检查是否有安装了alt_disk_install
error: incorrect format: unknown tag
error: incorrect format: unknown tag
error: incorrect format: unknown tag
error: incorrect format: unknown tag
error: incorrect format: unknown tag
error: incorrect format: unknown tag
error: incorrect format: unknown tag
error: incorrect format: unknown tag
error: incorrect format: unknown tag
error: incorrect format: unknown tag
error: incorrect format: unknown tag
error: incorrect format: unknown tag
error: incorrect format: unknown tag
error: incorrect format: unknown tag
error: incorrect format: unknown tag
error: incorrect format: unknown tag
error: incorrect format: unknown tag
error: incorrect format: unknown tag
error: incorrect format: unknown tag
error: incorrect format: unknown tag
error: incorrect format: unknown tag
error: incorrect format: unknown tag
  Fileset                      Level  State  Type  Description (Uninstaller)
  ---------------------------------分割线-------------------------------------------
lslpp: Fileset bos.alt_disk—nstall.rte not installed.


State codes:
A -- Applied.
B -- Broken.
C -- Committed.
E -- EFIX Locked.
O -- Obsolete.  (partially migrated to newer version)
? -- Inconsistent State...Run lppchk -v.

Type codes:
F -- Installp Fileset
P -- Product
C -- Component
T -- Feature
R -- RPM Package
E -- Interim Fix
#
------------------------------------分割线-----------------------------------------------
如果返回结果:
lslpp: 0504-132  Fileset bos.alt_disk_install.rte not installed

则表明alt_disk_install未安装
将 AIX 第二张安装盘放入光驱, 安装 alt_disk_install 文件集.
# geninstall -d/dev/cd0 bos.alt_disk_install.rte

这里对于安装alt_disk_install,不再详细说明
---------------------------------------------------------------
# alt_disk_install -OCB hdisk1
+-----------------------------------------------------------------------------+
ATTENTION: calling new module /usr/sbin/alt_disk_copy. Please see the
alt_disk_copy man page and 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_hd5.
Creating logical volume alt_hd6.
Creating logical volume alt_hd8.
Creating logical volume alt_hd4.
Creating logical volume alt_hd2.
Creating logical volume alt_hd9var.
Creating logical volume alt_hd3.
Creating logical volume alt_hd1.
Creating logical volume alt_hd10opt.
Creating logical volume alt_hd11admin.
Creating logical volume alt_fwdump.
Creating logical volume alt_lg_dumplv.
Creating logical volume alt_livedump.
Creating logical volume alt_lv_u01.
Creating logical volume alt_mqmlv.
Creating logical volume alt_mqmloglv.
Creating /alt_inst/ file system.
Creating /alt_inst/admin file system.
Creating /alt_inst/home file system.
Creating /alt_inst/opt file system.
Creating /alt_inst/tmp file system.
Creating /alt_inst/u01 file system.
Creating /alt_inst/usr file system.
Creating /alt_inst/var file system.
Creating /alt_inst/var/adm/ras/livedump file system.
Creating /alt_inst/var/adm/ras/platform file system.
Creating /alt_inst/var/mqm file system.
Creating /alt_inst/var/mqm/log file system.
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 new
system console.
Resetting all device attributes.
NOTE: The first boot from altinst_rootvg will prompt to define the new
system console.
forced unmount of /alt_inst/var/mqm/log
forced unmount of /alt_inst/var/mqm/log
forced unmount of /alt_inst/var/mqm
forced unmount of /alt_inst/var/mqm
forced unmount of /alt_inst/var/adm/ras/platform
forced unmount of /alt_inst/var/adm/ras/platform
forced unmount of /alt_inst/var/adm/ras/livedump
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/u01
forced unmount of /alt_inst/u01
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/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...
#
# lspv
hdisk0          00c843b42d414eb9                    rootvg          active      
hdisk1          00c843b4bb3cf61e                    altinst_rootvg            
# bootlist -m normal -o
cd0
hdisk0 blv=hd5 pathid=0
# lspv -l hdisk1
0516-010 : Volume group must be varied on; use varyonvg command.
将克隆磁盘移植到新服务器。
    将hdisk1插入新服务器,新插入的盘不会自动引导系统的启动,需要在分区启动时进入SMS菜单,手动指定磁盘启动。

重启后:
# lspv
hdisk0          00c843b42d414eb9                    None            
hdisk1          00c843b4bb3cf61e                      rootvg          active     
# df -g                                                                              
Filesystem    GB blocks      Free %Used    Iused %Iused Mounted on                  
/dev/hd4          20.00     10.48   48%    78570     4% /                           
/dev/hd2           6.00      0.26   96%    60669    48% /usr                        
/dev/hd9var        5.00      1.79   65%     8402     2% /var                        
/dev/hd3           5.00      2.96   41%     3948     1% /tmp                        
/dev/fwdump        1.25      1.25    1%       12     1% /var/adm/ras/platform        
/dev/hd1          20.00     18.46    8%      137     1% /home                        
/dev/hd11admin      0.25      0.25    1%        5     1% /admin                     
/proc                 -         -    -         -     -  /proc                        
/dev/hd10opt       5.00      4.69    7%     9799     1% /opt                        
/dev/livedump      0.25      0.25    1%        4     1% /var/adm/ras/livedump        
/dev/lv_u01       50.00     41.63   17%     1877     1% /u01                        
/dev/mqmlv         1.00      1.00    1%      245     1% /var/mqm                     
/dev/mqmloglv      1.00      1.00    1%        9     1% /var/mqm/log
# lspv -l hdisk1                                                                     
hdisk1:                                                                              
LV NAME               LPs     PPs     DISTRIBUTION          MOUNT POINT              
mqmloglv              4       4       00..00..00..00..04    /var/mqm/log            
fwdump                5       5       00..05..00..00..00    /var/adm/ras/platform   
hd6                   77      77      00..77..00..00..00    N/A                     
hd8                   1       1       00..00..01..00..00    N/A                     
hd11admin             1       1       00..01..00..00..00    /admin                  
hd5                   1       1       01..00..00..00..00    N/A                     
mqmlv                 4       4       00..00..00..00..04    /var/mqm                 
hd9var                20      20      00..20..00..00..00    /var                     
hd3                   20      20      00..00..04..16..00    /tmp                     
lv_u01                200     200     21..05..00..73..101   /u01                     
hd4                   80      80      00..00..80..00..00    /                        
livedump              1       1       00..01..00..00..00    /var/adm/ras/livedump   
hd2                   24      24      00..00..24..00..00    /usr                     
lg_dumplv             8       8       08..00..00..00..00    N/A                     
hd1                   80      80      80..00..00..00..00    /home                    
hd10opt               20      20      00..00..00..20..00    /opt


至此克隆磁盘并移植完成




运维网声明 1、欢迎大家加入本站运维交流群:群②:261659950 群⑤:202807635 群⑦870801961 群⑧679858003
2、本站所有主题由该帖子作者发表,该帖子作者与运维网享有帖子相关版权
3、所有作品的著作权均归原作者享有,请您和我们一样尊重他人的著作权等合法权益。如果您对作品感到满意,请购买正版
4、禁止制作、复制、发布和传播具有反动、淫秽、色情、暴力、凶杀等内容的信息,一经发现立即删除。若您因此触犯法律,一切后果自负,我们对此不承担任何责任
5、所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其内容的准确性、可靠性、正当性、安全性、合法性等负责,亦不承担任何法律责任
6、所有作品仅供您个人学习、研究或欣赏,不得用于商业或者其他用途,否则,一切后果均由您自己承担,我们对此不承担任何法律责任
7、如涉及侵犯版权等问题,请您及时通知我们,我们将立即采取措施予以解决
8、联系人Email:admin@iyunv.com 网址:www.yunweiku.com

所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其承担任何法律责任,如涉及侵犯版权等问题,请您及时通知我们,我们将立即处理,联系人Email:kefu@iyunv.com,QQ:1061981298 本贴地址:https://www.yunweiku.com/thread-333064-1-1.html 上篇帖子: iSCSI磁盘阵列用作Proxmox VE的LVM共享存储 下篇帖子: Centos 6.5 安装 Atlassiana Crowd+JIRA+Confluence(Wiki)之一 数据库篇...
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

扫码加入运维网微信交流群X

扫码加入运维网微信交流群

扫描二维码加入运维网微信交流群,最新一手资源尽在官方微信交流群!快快加入我们吧...

扫描微信二维码查看详情

客服E-mail:kefu@iyunv.com 客服QQ:1061981298


QQ群⑦:运维网交流群⑦ QQ群⑧:运维网交流群⑧ k8s群:运维网kubernetes交流群


提醒:禁止发布任何违反国家法律、法规的言论与图片等内容;本站内容均来自个人观点与网络等信息,非本站认同之观点.


本站大部分资源是网友从网上搜集分享而来,其版权均归原作者及其网站所有,我们尊重他人的合法权益,如有内容侵犯您的合法权益,请及时与我们联系进行核实删除!



合作伙伴: 青云cloud

快速回复 返回顶部 返回列表