The dbzone on the source system has 2 zpools (dbzone and dbzone_db_primary) .The redo and archive logs are on a non-ZFS filesystem, and must be copied to the target dbzone before the dbzone database can be reconfigured:
dbzone (zpool)
dbzone_db_primary (zpool)
/logs/redologs (UFS filesystem for Database Redologs)
/logs/archivelogs (UFS filesystem for Database archivelogs)
Target dbzone disks mapped to the data (ASM) contained in the Source dbzone
This procedure uses the following methods to move the application data to the target zones:
The database logs are restored and copied to shared storage (/ovas1).
A combination of dd and gunzip commands are used to get a consistent copy of the source disks (database application data) and remap the data to the target disks (same size) on the zones after they are attached to the target guest domain.
root@TargetGuestDom# echo |format AVAILABLE DISK SELECTIONS: 0. c0d0 <SUN-DiskImage-16GB cyl 17064 alt 2 hd 96 sec 768> /virtual-devices@100/channel-devices@200/disk@0 1. c0d1 <600GB disk for guest second root dis cyl 17064 alt 2 hd 96 sec 768> /virtual-devices@100/channel-devices@200/disk@1 2. c0d2 <SUN-ZFS Storage 7355-1.0-300.00GB> /virtual-devices@100/channel-devices@200/disk@2 3. c0d3 <SUN-ZFS Storage 7355-1.0-300.00GB> /virtual-devices@100/channel-devices@200/disk@3 4. c0d4 <SUN-ZFS Storage 7355-1.0-150.00GB> /virtual-devices@100/channel-devices@200/disk@4 5. c0d5 <SUN-ZFS Storage 7355-1.0-150.00GB> /virtual-devices@100/channel-devices@200/disk@5 6. c0d6 <SUN-ZFS Storage 7355-1.0-200.00GB> /virtual-devices@100/channel-devices@200/disk@6 7. c0d7 <SUN-ZFS Storage 7355-1.0-200.00GB> /virtual-devices@100/channel-devices@200/disk@7 8. c0d8 <SUN-ZFSStorage7355-1.0 cyl 8124 alt 2 hd 254 sec 254> /virtual-devices@100/channel-devices@200/disk@8 9. c0d9 <SUN-ZFSStorage7355-1.0 cyl 8124 alt 2 hd 254 sec 254> /virtual-devices@100/channel-devices@200/disk@9 10. c0d10 <SUN-ZFSStorage7355-1.0 cyl 8190 alt 2 hd 8 sec 32> /virtual-devices@100/channel-devices@200/disk@a 11. c0d11 <SUN-ZFSStorage7355-1.0 cyl 8190 alt 2 hd 8 sec 32> /virtual-devices@100/channel-devices@200/disk@b Specify disk (enter its number): Specify disk (enter its number):
To copy the contents of the Database and ASM data (diskgroup, and so on) these steps are carried out on the dbzone zone.
The shared mount point from the target control domain is mounted on dbzone to provide access to the application data disk contents.
root@TargetDBzone# mkdir /ovas1 root@TargetDBzone# mount -F nfs TargetControlDom:/ovas1 /ovas1
root@TargetDBzone# cd /logs/redologs/ root@TargetDBzone# gunzip -c /ovas1/redo.ufsdump.gz | ufsrestore xvf - Verify volume and initialize maps Dump date: Mon Jul 30 11:09:29 2018 Dumped from: the epoch Level 0 dump of /zones/dbzone/root/logs/redologs on SourceGlobal:/dev/md/dsk/d20 Label: none Extract directories from tape Initialize symbol table. Extract requested files extract file ./redo04.log extract file ./redo05.log extract file ./redo06.log Add links Set directory mode, owner, and times. set owner/mode for '.'? [yn] y root@TargetDBzone# ls -rlth redo* -rw-r----- 1 oracle1 dba 200M Jul 30 11:00 redo05.log -rw-r----- 1 oracle1 dba 200M Jul 30 11:02 redo06.log -rw-r----- 1 oracle1 dba 200M Jul 30 11:09 redo04.log
root@TargetDBzone# cd /logs/archivelogs/ root@TargetDBzone# gunzip -c /ovas1/archive.ufsdump.gz | ufsrestore xvf - Verify volume and initialize maps Dump date: Mon Jul 30 11:09:29 2018 Dumped from: the epoch Level 0 dump of /zones/dbzone/root/logs/archivelogs on SourceGlobal:/dev/md/dsk/d30 Label: none Extract directories from tape Initialize symbol table. Make node ./ORCL9 Make node ./ORCL9/archivelog Make node ./ORCL9/archivelog/2018_07_17 Make node ./ORCL9/archivelog/2018_07_26 Make node ./ORCL9/archivelog/2018_07_27 Make node ./ORCL9/archivelog/2018_07_28 Make node ./ORCL9/archivelog/2018_07_29 Extract requested files extract file ./ORCL9/archivelog/2018_07_17/o1_mf_1_50_fnvzwkj8_.arc extract file ./ORCL9/archivelog/2018_07_26/o1_mf_1_51_foo2omnh_.arc extract file ./ORCL9/archivelog/2018_07_26/o1_mf_1_52_foo9vbdk_.arc extract file ./ORCL9/archivelog/2018_07_26/o1_mf_1_53_foobh0oh_.arc extract file ./ORCL9/archivelog/2018_07_27/o1_mf_1_54_foojrfps_.arc extract file ./ORCL9/archivelog/2018_07_27/o1_mf_1_55_foqy30ls_.arc extract file ./ORCL9/archivelog/2018_07_28/o1_mf_1_56_forhorlz_.arc extract file ./ORCL9/archivelog/2018_07_28/o1_mf_1_57_fosdvstz_.arc extract file ./ORCL9/archivelog/2018_07_28/o1_mf_1_58_fotb98gv_.arc extract file ./ORCL9/archivelog/2018_07_29/o1_mf_1_59_fovgm1cx_.arc extract file ./ORCL9/archivelog/2018_07_29/o1_mf_1_60_fow18vt2_.arc extract file ./ORCL9/archivelog/2018_07_29/o1_mf_1_61_fowydo5d_.arc Add links Set directory mode, owner, and times. set owner/mode for '.'? [yn] y root@TargetDBzone# ls -lrtRh ORCL9 ORCL9: total 16 drwxr-x--- 7 oracle1 dba 452 Jul 29 06:00 archivelog ORCL9/archivelog: total 80 drwxr-x--- 2 oracle1 dba 198 Jul 17 07:39 2018_07_17 drwxr-x--- 2 oracle1 dba 360 Jul 26 22:13 2018_07_26 drwxr-x--- 2 oracle1 dba 279 Jul 27 22:00 2018_07_27 drwxr-x--- 2 oracle1 dba 360 Jul 28 19:40 2018_07_28 drwxr-x--- 2 oracle1 dba 360 Jul 29 19:36 2018_07_29 ORCL9/archivelog/2018_07_17: total 4112 -rw-r----- 1 oracle1 dba 2.0M Jul 17 07:39 o1_mf_1_50_fnvzwkj8_.arc ORCL9/archivelog/2018_07_26: total 445936 -rw-r----- 1 oracle1 dba 73M Jul 26 20:00 o1_mf_1_51_foo2omnh_.arc -rw-r----- 1 oracle1 dba 74M Jul 26 22:02 o1_mf_1_52_foo9vbdk_.arc -rw-r----- 1 oracle1 dba 71M Jul 26 22:13 o1_mf_1_53_foobh0oh_.arc ORCL9/archivelog/2018_07_27: total 299728 -rw-r----- 1 oracle1 dba 72M Jul 27 00:00 o1_mf_1_54_foojrfps_.arc -rw-r----- 1 oracle1 dba 75M Jul 27 22:00 o1_mf_1_55_foqy30ls_.arc ORCL9/archivelog/2018_07_28: total 443696 -rw-r----- 1 oracle1 dba 73M Jul 28 03:00 o1_mf_1_56_forhorlz_.arc -rw-r----- 1 oracle1 dba 72M Jul 28 11:18 o1_mf_1_57_fosdvstz_.arc -rw-r----- 1 oracle1 dba 72M Jul 28 19:40 o1_mf_1_58_fotb98gv_.arc ORCL9/archivelog/2018_07_29: total 442768 -rw-r----- 1 oracle1 dba 73M Jul 29 06:00 o1_mf_1_59_fovgm1cx_.arc -rw-r----- 1 oracle1 dba 71M Jul 29 11:19 o1_mf_1_60_fow18vt2_.arc -rw-r----- 1 oracle1 dba 72M Jul 29 19:36 o1_mf_1_61_fowydo5d_.arc
root@TargetDBzone# gunzip -c /ovas1/asm1.img.gz | dd of=/dev/rdsk/c0d6s0 bs=104857600 root@TargetDBzone# gunzip -c /ovas1/asm2.img.gz | dd of=/dev/rdsk/c0d7s0 bs=104857600
The ownership of the ASM disks should owned by oracle1:dba and have permissions set to 660.
root@TargetDBzone# chown oracle1:dba /dev/rdsk/c0d6s0 /dev/rdsk/c0d7s0 root@TargetDBzone# chmod 660 /dev/rdsk/c0d6s0 /dev/rdsk/c0d7s0
root@TargetDBzone# ifconfig -a lo0:1: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 1 inet 127.0.0.1 netmask ff000000 vnet0:1: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2 inet 192.0.2.52 netmask fffffe00 broadcast 192.0.2.254 TargetDBzone# netstat -rn Routing Table: IPv4 Destination Gateway Flags Ref Use Interface -------------------- ---------------- ----- ----- ---------- --------- default 192.0.2.1 UG 1 225 192.0.2.0 192.0.2.52 U 1 2 vnet0:1 224.0.0.0 192.0.2.52 U 1 0 vnet0:1 127.0.0.1 127.0.0.1 UH 8 49807 lo0:1