aix 克隆rootvg(rootvg 存在镜像关系)

简介: 0516-404 allocp: This system cannot fulfill the allocation request. There are not enough free partitions or not enough physical volumes .

ARCHIVE FOR THE ‘CLONING ROOTVG TO A SINGLE DISK WHEN THE DISK IS MIRRORED’ CATEGORY!!!

系统版本

# uname -a
AIX test 1 6 00C2D8D44C00
# oslevel -s
6100-09-00-0000

系统环境

# lscfg -l hdisk0
  hdisk0           U78A0.001.DNWH9HP-P2-D3  SAS Disk Drive (300000 MB)
# lscfg -l hdisk1
  hdisk1           U78A0.001.DNWH9HP-P2-D4  SAS Disk Drive (300000 MB)
# lscfg -l hdisk2
  hdisk2           U78A0.001.DNWH9HP-P2-D5  SAS Disk Drive (300000 MB)
# lscfg -l hdisk3
  hdisk3           U78A0.001.DNWH9HP-P2-D6  SAS Disk Drive (300000 MB)                      
# lspv
hdisk0          00c2d8d49b5110cb                    rootvg          active      
hdisk1          00c2d8d400129a3f                    rootvg          active      
hdisk2          00c2d8d49b50c66c                    None                        
hdisk3          00c2d8d49b51115f                    None                        
hdisk4          00c824c04ee09efc                    None                        
hdisk5          00c2d8d49b51548e                    None                        
# lsvg -l rootvg
rootvg:
LV NAME             TYPE       LPs     PPs     PVs  LV STATE      MOUNT POINT
hd5                 boot       1       2       2    closed/syncd  N/A
hd6                 paging     1       2       2    open/syncd    N/A
hd8                 jfs2log    1       2       2    open/syncd    N/A
hd4                 jfs2       2       4       2    open/syncd    /
hd2                 jfs2       5       10      2    open/syncd    /usr
hd9var              jfs2       1       2       2    open/syncd    /var
hd3                 jfs2       1       2       2    open/syncd    /tmp
hd1                 jfs2       1       2       2    open/syncd    /home
hd10opt             jfs2       1       2       2    open/syncd    /opt
hd11admin           jfs2       1       2       2    open/syncd    /admin
lg_dumplv           sysdump    8       8       1    open/syncd    N/A
livedump            jfs2       1       2       2    open/syncd    /var/adm/ras/livedump

1,克隆rootvg到hdisk2

rootvg 已经存在hdisk0,hdisk1 两块磁盘,为镜像关系

lsvg -p rootvg
rootvg:
PV_NAME           PV STATE          TOTAL PPs   FREE PPs    FREE DISTRIBUTION
hdisk0            active            558         534         111..102..98..111..112
hdisk1            active            558         542         111..110..98..111..112

# lsvg -l rootvg       
rootvg:
LV NAME             TYPE       LPs     PPs     PVs  LV STATE      MOUNT POINT
hd5                 boot       1       2       2    closed/syncd  N/A
hd6                 paging     1       2       2    open/syncd    N/A
hd8                 jfs2log    1       2       2    open/syncd    N/A
hd4                 jfs2       2       4       2    open/syncd    /
hd2                 jfs2       5       10      2    open/syncd    /usr
hd9var              jfs2       1       2       2    open/syncd    /var
hd3                 jfs2       1       2       2    open/syncd    /tmp
hd1                 jfs2       1       2       2    open/syncd    /home
hd10opt             jfs2       1       2       2    open/syncd    /opt
hd11admin           jfs2       1       2       2    open/syncd    /admin
lg_dumplv           sysdump    8       8       1    open/syncd    N/A
livedump            jfs2       1       2       2    open/syncd    /var/adm/ras/livedump

2,生成image.data,并修改相关参数

生产image.data,默认位置在/目录下。

# mkszfile -X

使用vi 修改如下2个参数

COPIES= 2修改为COPIES= 1
hdisk1修改为hdisk0((IF ROOTVG HAS hdisk0 and hdisk1 ))

:1,$s/COPIES= 2/COPIES= 1/
:1,$s/hdisk1/hdisk0/

3,克隆rootvg 到hdisk3

# alt_disk_copy -B -O -g -i /image.data -P all -d hdisk2  
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_lg_dumplv
Creating logical volume alt_livedump
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/usr file system.
Creating /alt_inst/var file system.
Creating /alt_inst/var/adm/ras/livedump 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/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/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...
# bootlist -m normal  -o
hdisk0 blv=hd5 pathid=0
# lspv
hdisk0          00c2d8d49b5110cb                    rootvg          active      
hdisk1          00c2d8d400129a3f                    rootvg          active      
hdisk2          00c2d8d49b50c66c                    altinst_rootvg              
hdisk3          00c2d8d49b51115f                    None                        
hdisk4          00c824c04ee09efc                    None                        
hdisk5          00c2d8d49b51548e                   None    

销毁

alt_disk_copy -Od hdisk3

报错

# alt_disk_copy -Od hdisk3
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
0516-404 allocp: This system cannot fulfill the allocation request.
        There are not enough free partitions or not enough physical volumes 
        to keep strictness and satisfy allocation requests.  The command
        should be retried with different allocation characteristics.
0516-822 mklv: Unable to create logical volume.
0505-115 alt_disk_install: mklv failed to create logical volume hd5.
Cleaning up.

使用2块大小相同的磁盘做克隆

# lspv
hdisk0          00c2d8d49b5110cb                    rootvg          active      
hdisk1          00c2d8d400129a3f                    rootvg          active      
hdisk2          00c2d8d49b50c66c                    None                        
hdisk3          00c2d8d4002f433c                    None                        
hdisk4          00c824c04ee09efc                    None                        
hdisk5          00c2d8d49b51548e                    None                        
# alt_disk_copy -Od "hdisk2 hdisk3"      
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_lg_dumplv
Creating logical volume alt_livedump
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/usr file system.
Creating /alt_inst/var file system.
Creating /alt_inst/var/adm/ras/livedump 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/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/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...
Bootlist is set to the boot disk: hdisk2
hdisk3 blv=hd5
# lspv
hdisk0          00c2d8d49b5110cb                    rootvg          active      
hdisk1          00c2d8d400129a3f                    rootvg          active      
hdisk2          00c2d8d49b50c66c                    altinst_rootvg              
hdisk3          00c2d8d4002f433c                    altinst_rootvg              
hdisk4          00c824c04ee09efc                    None                        
hdisk5          00c2d8d49b51548e                    None                        
# bootlist -m normal -o
hdisk2 blv=hd5 pathid=0
hdisk3 blv=hd5 pathid=0
# 

hdisk2,hdisk3也是镜像关系

# lsvg -l rootvg
rootvg:
LV NAME             TYPE       LPs     PPs     PVs  LV STATE      MOUNT POINT
hd5                 boot       1       2       2    closed/syncd  N/A
hd6                 paging     1       2       2    open/syncd    N/A
hd8                 jfs2log    1       2       2    open/syncd    N/A
hd4                 jfs2       2       4       2    open/syncd    /
hd2                 jfs2       5       10      2    open/syncd    /usr
hd9var              jfs2       1       2       2    open/syncd    /var
hd3                 jfs2       1       2       2    open/syncd    /tmp
hd1                 jfs2       1       2       2    open/syncd    /home
hd10opt             jfs2       1       2       2    open/syncd    /opt
hd11admin           jfs2       1       2       2    open/syncd    /admin
lg_dumplv           sysdump    8       8       1    open/syncd    N/A
livedump            jfs2       1       2       2    open/syncd    /var/adm/ras/livedump
# lsvg -p rootvg
rootvg:
PV_NAME           PV STATE          TOTAL PPs   FREE PPs    FREE DISTRIBUTION
hdisk2            active            558         534         111..102..98..111..112
hdisk3            active            558         542         111..110..98..111..112

# lspv -l hdisk2
hdisk2:
LV NAME               LPs     PPs     DISTRIBUTION          MOUNT POINT
livedump              1       1       00..01..00..00..00    /var/adm/ras/livedump
lg_dumplv             8       8       00..08..00..00..00    N/A
hd11admin             1       1       00..00..01..00..00    /admin
hd10opt               1       1       00..00..01..00..00    /opt
hd1                   1       1       00..00..01..00..00    /home
hd3                   1       1       00..00..01..00..00    /tmp
hd9var                1       1       00..00..01..00..00    /var
hd2                   5       5       00..00..05..00..00    /usr
hd4                   2       2       00..00..02..00..00    /
hd8                   1       1       00..00..01..00..00    N/A
hd6                   1       1       00..01..00..00..00    N/A
hd5                   1       1       01..00..00..00..00    N/A
# lspv -l hdisk3
hdisk3:
LV NAME               LPs     PPs     DISTRIBUTION          MOUNT POINT
livedump              1       1       00..01..00..00..00    /var/adm/ras/livedump
hd11admin             1       1       00..00..01..00..00    /admin
hd10opt               1       1       00..00..01..00..00    /opt
hd1                   1       1       00..00..01..00..00    /home
hd3                   1       1       00..00..01..00..00    /tmp
hd9var                1       1       00..00..01..00..00    /var
hd2                   5       5       00..00..05..00..00    /usr
hd4                   2       2       00..00..02..00..00    /
hd8                   1       1       00..00..01..00..00    N/A
hd6                   1       1       00..01..00..00..00    N/A
hd5                   1       1       01..00..00..00..00    N/A
# lspv
hdisk0          00c2d8d49b5110cb                    None                        
hdisk1          00c2d8d400129a3f                    None                        
hdisk2          00c2d8d49b50c66c                    rootvg          active      
hdisk3          00c2d8d4002f433c                    rootvg          active      
hdisk4          00c824c04ee09efc                    None                        
hdisk5          00c2d8d49b51548e                    None                        
# lsvg rootvg
VOLUME GROUP:       rootvg                   VG IDENTIFIER:  00c2d8d400004c00000000000039e250
VG STATE:           active                   PP SIZE:        512 megabyte(s)
VG PERMISSION:      read/write               TOTAL PPs:      1116 (571392 megabytes)
MAX LVs:            256                      FREE PPs:       1076 (550912 megabytes)
LVs:                12                       USED PPs:       40 (20480 megabytes)
OPEN LVs:           11                       QUORUM:         1 (Disabled)
TOTAL PVs:          2                        VG DESCRIPTORS: 3
STALE PVs:          0                        STALE PPs:      0
ACTIVE PVs:         2                        AUTO ON:        no
MAX PPs per VG:     32512                                     
MAX PPs per PV:     1016                     MAX PVs:        32
LTG size (Dynamic): 1024 kilobyte(s)         AUTO SYNC:      no
HOT SPARE:          no                       BB POLICY:      relocatable 
PV RESTRICTION:     none                     INFINITE RETRY: no
DISK BLOCK SIZE:    512                                       
# 
相关文章
|
Oracle 关系型数据库 Windows
Windows环境下在Oracle VM VirtualBOX下克隆虚拟机镜像(克隆和导入)
Windows环境下在Oracle VM VirtualBOX下克隆虚拟机镜像: 注:直接复制一个.vdi 虚拟硬盘再挂上去就可以,但Virtualbox居然提示UUID重复,无法使用。 则,可以通过Vritualbox自带的一个命令行工具解决,UI上没有提供对应的解决方案 : 注:克隆镜像及导入镜像生成虚拟机 1.定位到Vritualbox的安装目录,不能用全路径的方式直
4545 0
|
5月前
|
安全 Windows
克隆虚拟机-纯净版-去SID
克隆虚拟机-纯净版-去SID
|
3月前
|
存储 Linux 测试技术
在Linux中,如何实现文件系统的快照和克隆?
在Linux中,如何实现文件系统的快照和克隆?
|
5月前
|
存储 数据管理 Linux
Linux - 记录问题:docker 迁移 更改镜像默认位置的注意事项
Linux - 记录问题:docker 迁移 更改镜像默认位置的注意事项
96 0
|
存储 Linux
【Linux】快照与克隆
【Linux】快照与克隆
|
KVM 虚拟化
KVM管理克隆+快照管理命令
KVM管理克隆+快照管理命令
99 0
|
Linux 虚拟化 Windows
【Linux基础篇一】如何使用虚拟机对其进行克隆、快照、迁移和删除
【Linux基础篇一】如何使用虚拟机对其进行克隆、快照、迁移和删除
【Linux基础篇一】如何使用虚拟机对其进行克隆、快照、迁移和删除