The steps and examples in this section provide commands you can use to determine the configuration of your source system, including details about the zones that you plan to lift and shift. After the lift and shift process, the configuration information can also serve as a reference when you verify the migrated zones on the target system.
As you perform this procedure, take into account the state of your source system and adjust and omit steps as needed.
Capturing the commands and output provides a means to refer back to the data that is collected.
There are a variety of methods to capture output. You can run the script(1M) command to make a record of a terminal session, or use a terminal window with command and output collection capabilities.
Example:
root@SourceGlobal# script /tmp/source_zones_output.txt
Note – When you want to stop capturing output, type Ctr-D.
root@SourceGlobal# uname -a SunOS SourceGlobal 5.10 Generic_150400-61 sun4u sparc SUNW,SPARC-Enterprise root@SourceGlobal# prtdiag|grep "Memory size" Memory size: 163840 Megabytes
root@SourceGlobal# swap -l swapfile dev swaplo blocks free /dev/zvol/dsk/rpool/swap 256,1 16 335544304 335544304 root@SourceGlobal # zfs list rpool/swap NAME USED AVAIL REFER MOUNTPOINT rpool/swap 165G 344G 160G -
root@SourceGlobal# zfs list rpool/dump NAME USED AVAIL REFER MOUNTPOINT rpool/dump 3.01G 339G 3.00G -
root@SourceGlobal# ifconfig -a lo0: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 1 inet 127.0.0.1 netmask ff000000 bge0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2 inet 203.0.113.5 netmask ffffff00 broadcast 203.0.113.255 groupname ipmp0 ether 0:b:5d:dc:2:3f bge2: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 3 inet 0.0.0.0 netmask ff000000 broadcast 0.255.255.255 groupname ipmp0 ether 0:b:5d:dc:2:3f sppp0: flags=10010008d1<UP,POINTOPOINT,RUNNING,NOARP,MULTICAST,IPv4,FIXEDMTU> mtu 1500 index 4 inet 203.0.113.2 --> 203.0.113.1 netmask ffffff00 ether 0:0:0:0:0:0 root@SourceGlobal# ls -l /etc/hostname* -rw-r--r-- 1 root root 46 May 16 15:55 /etc/hostname.bge0 -rw-r--r-- 1 root root 16 May 16 15:56 /etc/hostname.bge2 root@SourceGlobal# cat /etc/hostname.bge0 SourceGlobal netmask + broadcast + group ipmp0 up root@SourceGlobal# cat /etc/hostname.bge2 group ipmp0 up
root@SourceGlobal# zoneadm list -cv ID NAME STATUS PATH BRAND IP 0 global running / native shared 1 webzone running /rpool/webzone native shared 2 dbzone running /zones/dbzone native shared
This example displays the zpool configuration information including the zone names, state, and storage information.
root@SourceGlobal# zpool status pool: dbzone state: ONLINE scan: resilvered 94K in 0h0m with 0 errors on Fri Apr 6 12:08:40 2018 config: NAME STATE READ WRITE CKSUM dbzone ONLINE 0 0 0 mirror-0 ONLINE 0 0 0 c2t600144F0E635D8C700005AC56A460011d0 ONLINE 0 0 0 c2t600144F0E635D8C700005AC56A6A0012d0 ONLINE 0 0 0 errors: No known data errors pool: dbzone_db_binary state: ONLINE scan: resilvered 94K in 0h0m with 0 errors on Fri Apr 6 12:10:24 2018 config: NAME STATE READ WRITE CKSUM dbzone_db_binary ONLINE 0 0 0 mirror-0 ONLINE 0 0 0 c2t600144F0E635D8C700005AC56AB30013d0 ONLINE 0 0 0 c2t600144F0E635D8C700005AC56ADA0014d0 ONLINE 0 0 0 errors: No known data errors pool: rpool state: ONLINE scan: resilvered 11.7G in 0h4m with 0 errors on Wed Apr 4 19:27:39 2018 config: NAME STATE READ WRITE CKSUM rpool ONLINE 0 0 0 mirror-0 ONLINE 0 0 0 c0t1d0s0 ONLINE 0 0 0 c1t1d0s0 ONLINE 0 0 0
root@SourceGlobal# zonecfg -z dbzone info pool pool: dbzone-pool root@SourceGlobal# zonecfg -z webzone info pool pool: webzone-pool root@SourceGlobal# poolstat pset id pool size used load 1 dbzone-pool 32 0.00 0.05 0 pool_default 16 0.00 0.04 2 webzone-pool 32 0.00 0.00
root@SourceGlobal# psrinfo -pv The physical processor has 4 virtual processors (0-3) SPARC64-VI (portid 1024 impl 0x6 ver 0x92 clock 2280 MHz) The physical processor has 4 virtual processors (40-43) SPARC64-VI (portid 1064 impl 0x6 ver 0x92 clock 2280 MHz) The physical processor has 4 virtual processors (80-83) SPARC64-VI (portid 1104 impl 0x6 ver 0x92 clock 2280 MHz) The physical processor has 4 virtual processors (120-123) SPARC64-VI (portid 1144 impl 0x6 ver 0x92 clock 2280 MHz) The physical processor has 8 virtual processors (128-135) SPARC64-VII (portid 1152 impl 0x7 ver 0x90 clock 2520 MHz) The physical processor has 8 virtual processors (136-143) SPARC64-VII (portid 1160 impl 0x7 ver 0x90 clock 2520 MHz) The physical processor has 8 virtual processors (144-151) SPARC64-VII (portid 1168 impl 0x7 ver 0x90 clock 2520 MHz) The physical processor has 8 virtual processors (152-159) SPARC64-VII (portid 1176 impl 0x7 ver 0x90 clock 2520 MHz) The physical processor has 8 virtual processors (160-167) SPARC64-VII (portid 1184 impl 0x7 ver 0xa0 clock 2880 MHz) The physical processor has 8 virtual processors (168-175) SPARC64-VII (portid 1192 impl 0x7 ver 0xa0 clock 2880 MHz) The physical processor has 8 virtual processors (176-183) SPARC64-VII (portid 1200 impl 0x7 ver 0xa0 clock 2880 MHz) The physical processor has 8 virtual processors (184-191) SPARC64-VII (portid 1208 impl 0x7 ver 0xa0 clock 2880 MHz)
The dbzone is assigned the last 4 physical processors (the last 32 virtual processors, CPU IDs 160 to 191).
root@SourceGlobal# zlogin dbzone psrinfo -pv The physical processor has 8 virtual processors (160-167) SPARC64-VII (portid 1184 impl 0x7 ver 0xa0 clock 2880 MHz) The physical processor has 8 virtual processors (168-175) SPARC64-VII (portid 1192 impl 0x7 ver 0xa0 clock 2880 MHz) The physical processor has 8 virtual processors (176-183) SPARC64-VII (portid 1200 impl 0x7 ver 0xa0 clock 2880 MHz) The physical processor has 8 virtual processors (184-191) SPARC64-VII (portid 1208 impl 0x7 ver 0xa0 clock 2880 MHz)
The webzone is assigned 4 physical processors (32 virtual processors, CPU IDs 128 to 159). These processors are the set of processors before the dbzone processors.
root@SourceGlobal# zlogin webzone psrinfo -pv The physical processor has 8 virtual processors (128-135) SPARC64-VII (portid 1152 impl 0x7 ver 0x90 clock 2520 MHz) The physical processor has 8 virtual processors (136-143) SPARC64-VII (portid 1160 impl 0x7 ver 0x90 clock 2520 MHz) The physical processor has 8 virtual processors (144-151) SPARC64-VII (portid 1168 impl 0x7 ver 0x90 clock 2520 MHz) The physical processor has 8 virtual processors (152-159) SPARC64-VII (portid 1176 impl 0x7 ver 0x90 clock 2520 MHz)
root@SourceGlobal# format AVAILABLE DISK SELECTIONS: 0. c0t0d0 <SUN146G cyl 14087 alt 2 hd 24 sec 848> /pci@0,600000/pci@0/scsi@1/sd@0,0 1. c0t1d0 <SEAGATE-ST960004SSUN600G-0115 cyl 64986 alt 2 hd 27 sec 668> /pci@0,600000/pci@0/scsi@1/sd@1,0 2. c1t0d0 <SUN600G cyl 64986 alt 2 hd 27 sec 668> /pci@24,600000/pci@0/scsi@1/sd@0,0 3. c1t1d0 <SUN600G cyl 64986 alt 2 hd 27 sec 668> /pci@24,600000/pci@0/scsi@1/sd@1,0 4. c2t600144F0E635D8C700005AC7C46F0017d0 <SUN-ZFSStorage7420-1.0 cyl 8124 alt 2 hd 254 sec 254> /scsi_vhci/ssd@g600144f0e635d8c700005ac7c46f0017 5. c2t600144F0E635D8C700005AC7C4920018d0 <SUN-ZFSStorage7420-1.0 cyl 8124 alt 2 hd 254 sec 254> /scsi_vhci/ssd@g600144f0e635d8c700005ac7c4920018 6. c2t600144F0E635D8C700005AC56A6A0012d0 <SUN-ZFS Storage 7420-1.0-300.00GB> /scsi_vhci/ssd@g600144f0e635d8c700005ac56a6a0012 7. c2t600144F0E635D8C700005AC56A460011d0 <SUN-ZFS Storage 7420-1.0-300.00GB> /scsi_vhci/ssd@g600144f0e635d8c700005ac56a460011 8. c2t600144F0E635D8C700005AC56AB30013d0 <SUN-ZFS Storage 7420-1.0-150.00GB> /scsi_vhci/ssd@g600144f0e635d8c700005ac56ab30013 9. c2t600144F0E635D8C700005AC56ADA0014d0 <SUN-ZFS Storage 7420-1.0-150.00GB> /scsi_vhci/ssd@g600144f0e635d8c700005ac56ada0014 10. c2t600144F0E635D8C700005AC56B2E0016d0 <SUN-ZFS Storage 7420-1.0-200.00GB> /scsi_vhci/ssd@g600144f0e635d8c700005ac56b2e0016 11. c2t600144F0E635D8C700005AC56B080015d0 <SUN-ZFS Storage 7420-1.0-200.00GB> /scsi_vhci/ssd@g600144f0e635d8c700005ac56b080015 CTRL-C
The values in the ALLOC column are used to calculate the amount of storage that is needed in shared storage and on the target system.
root@SourceGlobal #zpool list NAME SIZE ALLOC FREE CAP HEALTH ALTROOT dbzone 298G 16.4G 282G 5% ONLINE - dbzone_db_binary 149G 22.2G 127G 14% ONLINE - rpool 556G 199G 357G 35% ONLINE -
In this example, the dbzone logs are on UFS file systems on disks 4 and 5.
The values in the used column are used to calculate the amount of storage that is needed in shared storage and on the target system.
root@SourceGlobal# zlogin dbzone df -h -F ufs Filesystem size used avail capacity Mounted on /logs/archivelogs 197G 13G 182G 7% /logs/archivelogs /logs/redologs 9.8G 1.2G 8.6G 13% /logs/redologs
In this example, the ASM raw disks are on slice 0 of disks 10 and 11 (as numbered by the format utility).
The capacities in GB can be extracted from the disk partition table using the following scripts.
For this example, each ASM raw disk is approximately 199 GB.
root@SourceGlobal# echo $((`prtvtoc /dev/rdsk/c2t600144F0E635D8C700005AC56B2E0016d0s2 | grep " 0 " | awk '{ print $5 }'`*512/1024/1024/1024)) 199 root@SourceGlobal# echo $((`prtvtoc /dev/rdsk/c2t600144F0E635D8C700005AC56B080015d0s2 | grep " 0 " | awk '{ print $5 }'`*512/1024/1024/1024)) 199
The disk capacity information is used to configure the target system storage that is needed for the migration. See Prepare the Target System.
The total amount of used storage is used to calculate the amount of space needed in the shared storage in Prepare the Shared Storage.
This table lists the disk calculation for this example.
|
In this example, two internal disks (c0t0d0s4 and c1t0d0s4) are used for redundancy of the metadevice state database.
root@SourceGlobal# metadb flags first blk block count a m pc luo 16 8192 /dev/dsk/c0t0d0s4 a pc luo 8208 8192 /dev/dsk/c0t0d0s4 a pc luo 16400 8192 /dev/dsk/c0t0d0s4 a pc luo 16 8192 /dev/dsk/c1t0d0s4 a pc luo 8208 8192 /dev/dsk/c1t0d0s4 a pc luo 16400 8192 /dev/dsk/c1t0d0s4
The file systems displayed in the previous command are carved out of SVM meta devices (which are in turn based on the disks mentioned above) and can be displayed with the metastat command.
root@SourceGlobal# metastat -p d30 -p d0 -o 21036096 -b 419430400 d0 -m d11 d12 1 d11 1 1 /dev/dsk/c2t600144F0E635D8C700005AC7C46F0017d0s0 d12 1 1 /dev/dsk/c2t600144F0E635D8C700005AC7C4920018d0s0 d20 -p d0 -o 64544 -b 20971520
root@SourceDBzone# uname -a SunOS SourceDBzone 5.10 Generic_150400-61 sun4u sparc SUNW,SPARC-Enterprise root@SourceDBzone# ifconfig -a lo0:1: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 1 inet 127.0.0.1 netmask ff000000 bge0:2: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2 inet 203.0.113.5 netmask ffffff00 broadcast 203.0.113.255 root@SourceDBzone# netstat -rn Routing Table: IPv4 Destination Gateway Flags Ref Use Interface -------------------- ------------------ ----- ----- --------- --------- default 203.0.113.1 UG 1 186588 203.0.113.0 203.0.113.5 U 1 2 bge0:2 224.0.0.0 203.0.113.5 U 1 0 bge0:2 127.0.0.1 127.0.0.1 UH 7 54 lo0:1 root@SourceDBzone# zfs list NAME USED AVAIL REFER MOUNTPOINT dbzone_db_binary 22.2G 124G 22.2G /u01
Log into the dbzone as an oracle grid user and enter asmcmd to start the ASMCMD command line.
Note that the ownership of the device slices (s0) for ASM is oracle:dba and relates to the Oracle installation in the non-global zone.
ASMCMD> lsdg State Type Rebal Sector Block AU Total_MB Free_MB Req_mir_free_MB Usable_file_MB Offline_disks Voting_files Name MOUNTED NORMAL N 512 4096 16777216 409568 356960 0 178480 0 N DATA/ ASMCMD> lsdsk -p -G DATA Group_Num Disk_Num Incarn Mount_Stat Header_Stat Mode_Stat State Path 1 0 4239149010 CACHED MEMBER ONLINE NORMAL /dev/rdsk/c2t600144F0E635D8C700005AC56B080015d0s0 1 1 4239149009 CACHED MEMBER ONLINE NORMAL /dev/rdsk/c2t600144F0E635D8C700005AC56B2E0016d0s0
root@SourceWebzone# uname -a SunOS SourceWebzone 5.10 Generic_150400-61 sun4u sparc SUNW,SPARC-Enterprise root@SourceWebzone# ifconfig -a lo0:3: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 1 inet 127.0.0.1 netmask ff000000 bge0:4: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2 inet 203.0.113.191 netmask ffffff00 broadcast 203.0.113.255 root@SourceWebzone# netstat -rn Routing Table: IPv4 Destination Gateway Flags Ref Use Interface -------------------- -------------------- ----- ----- ---------- --------- default 203.0.113.1 UG 1 186609 203.0.113.0 203.0.113.191 U 1 2 bge0:3 224.0.0.0 203.0.113.191 U 1 0 bge0:3 127.0.0.1 127.0.0.1 UH 4 89 lo0:2 root@SourceWebzone# zfs list no datasets available