AIX WPAR tips and tricksHere’s some handy tips and tricks for managing WPARs in your AIX environment.
- In the Global.
root@750lpar11]/ # uname -W 0
- Global File System that you want to share with the WPAR (750wpar2).
[root@750lpar11]/ # df -g /cg Filesystem GB blocks Free %Used Iused %Iused Mounted on /dev/cglv 1.98 0.30 85% 64 1% /cg
[root@750lpar11]/ # lswpar Name State Type Hostname Directory RootVG WPAR ---- 750wpar1 A S 750wpar1 /wpars/750wpar1 yes 750wpar2 A S 750wpar2 /wpars/750wpar2 yes
- Create "namefs" file system from the Global. /cg file system will be mounted under /stuff in the WPAR.
[root@750lpar11]/ # crfs -v namefs -A yes -d /cg -m /wpa
[root@750lpar11]/ # lsfs /wpa Name Nodename Mount Pt VFS Size Options Auto Accounting /cg
-- /wpa
root@750lpar11]/ # grep -p /wpa /wpa dev = /cg vfs = namefs mount = true type = 750wpar2 account = false
- Mount the file system, in the Global.
[root@750lpar11]/ # mount /wpa
root@750lpar11]/ # mount | grep stuff
/cg
/wpa
- In the WPAR.
[roo 8 [roo Filesystem GB blocks Free %Used Iused %Iused Mounted on Global 1.98 0.30 85% 64 1% /stuff
[root@gibopvc1]/ # chdev -l lo0 -a netaddr6='' lo0 changed
[root@gibopvc1]/ # stopwpar -Fv p8wpar1 Stopping workload partition 'p8wpar1'. Stopping workload partition subsystem 'cor_p8wpar1'. 0513-044 The cor_p8wpar1 Subsystem was requested to stop. Shutting down all workload partition processes. WPAR='p8wpar1' CID=1 sysV mq ID=2097153 key=0x4107001c uid=0 gid=9 sysV sem ID=5242893 key=0x62023457 uid=0 gid=0 Unmounting all workload partition file systems. Umounting '/wp Umounting '/wp Umounting '/wp Umounting '/wpars/p8wpar1'. Return Status = SUCCESS. [root@gibopvc1]/ #
[root@gibopvc1]/ # startwpar -v p8wpar1 Starting workload partition 'p8wpar1'. Mounting all workload partition file systems. Mounting '/wpars/p8wpar1'. Mounting '/wp Mounting '/wp Mounting '/wp Loading workload partition. startwpar: 0960-231 ATTENTION: '/us startwpar: 0960-244 Error loading workload partition. Unmounting all workload partition file systems. Umounting '/wp Umounting '/wp Umounting '/wp Umounting '/wpars/p8wpar1'. Return Status = FAILURE. [root@gibopvc1]/ #
[root@gibopvc1]/ # chdev -l lo0 -a netaddr6='::1' lo0 changed [root@gibopvc1]/ # [root@gibopvc1]/ # [root@gibopvc1]/ # startwpar -v p8wpar1 Starting workload partition 'p8wpar1'. Mounting all workload partition file systems. Mounting '/wpars/p8wpar1'. Mounting '/wp Mounting '/wp Mounting '/wp Loading workload partition. en1 net default: gateway 10.1.1.10 Exporting workload partition devices. Exporting workload partition kernel extensions. Starting workload partition subsystem 'cor_p8wpar1'. 0513-059 The cor_p8wpar1 Subsystem has been started. Subsystem PID is 9896106. Verifying workload partition startup. Return Status = SUCCESS. [root@gibopvc1]/ #
[root@750lpar11]/ GLOBAL # uname -W 0
[root@750lpar11]/ GLOBAL # clogin 750wpar1 Remote logins are not allowed for this account.
[root@750lpar11]/ GLOBAL # chroot /wpars/750wpar1 /usr/bin/ksh 750lpar11 : / # chuser rlogin=true root 750lpar11 : / # exit
[root@750lpar11]/ GLOBAL # clogin 750wpar1 750wpar1 : / # oslevel -s 5300-12-09-1341 750wpar1 : / # uname -W 4
Backing up WPAR to NIM master over NFS mounted file system. ----
[root@750lpar11]/ GLOBAL # mount nimm [root@750lpar11]/ GLOBAL # savewpar -if /mnt Creating information file (/image.data) for 750w Creating list of files to back up Backing up 92766 file 92766 of 92766 files backed up (100%) 0512-038 savewpar: Backup Completed Successfully.
####
Backing up WPAR with NIM. ---- On the NIM master, check the Global LPAR is already configured as a NIM client.
# nim -o showlog 750lpar11 BEGIN:Thu Jan 30 17:25:47 2014:013017254714 Command line is: /usr/sbin/installp -acNgXY -e /var /tmp /tmp +--- Pre-installation Verification... +--- ...etc... Installation Summary ---- Name ---- open
END:Thu Jan 30 17:25:51 2014:013017255114
# lsnim -l 750lpar11 750lpar11: class = machines type = standalone connect = nimsh platform = chrp netboot_kernel = 64 if1 = 10_1_50 750lpar11 FAFAC00EF002 cable_type1 = N/A Cstate = ready for a NIM operation prev_state = not running Mstate = currently running cpuid = 00F603CD4C00 Cstate_result = success
Check that the WPAR hostname/IP can be resolved from the NIM master.
# host 750wpar2 750wpar2 is 10.1.50.44
# host 10.1.50.44 750wpar2 is 10.1.50.44
Define the WPAR in the NIM database. Where 750lpar11 is the Global partition NIM client name and 750wpar2 is the WPAR name.
# nim -o define -t wpar -a mgmt
Verify that the NIM master can now query the status of the WPAR.
# nim -o lswpar 750wpar2 Name State Type Hostname Directory RootVG WPAR ---- 750wpar2 A S 750wpar2 /wpars/750wpar2 yes
# lsnim -l 750lpar11 750lpar11: class = machines type = standalone connect = nimsh platform = chrp netboot_kernel = 64 if1 = 10_1_50 750lpar11 FAFAC00EF002 cable_type1 = N/A Cstate = ready for a NIM operation prev_state = not running Mstate = currently running cpuid = 00F603CD4C00 Cstate_result = success manages = 750wpar2
# lsnim -l 750wpar2 750wpar2: class = machines type = wpar connect = shell platform = chrp if1 = 10_1_50 750wpar2 0 mgmt_profile1 = 750lpar11 750wpar2 Cstate = ready for a NIM operation prev_state = managed system defined but not yet created Mstate = currently running
Backup the WPAR from the NIM master.
# nim -o define -t savewpar -a server=master -a loca
Creating list of files to back up. . Backing up 64560 files..........
64560 of 64560 files (100%) 0512-038 savewpar: Backup Completed Successfully.
"I
tested in the lab, for a versioned wpar you can use it more like a
regular LPAR - extend a disk into rootvg, mirror on it, unmirror from
the old one, reduce out and rmdev. No bosboot or bootlist
needed. There is no bootset in a versioned wpar for some reason.” add a new disk (hdisk10) to the vwpar:
6.Moving a Rootvg Workload Partition (WPAR) to Another Disk
http
Technote (FAQ)
Question I have a rootvg WPAR that is on one disk, is there a method to move it to a new disk?
Answer There may be an occasion where you have created a rootvg WPAR on a specific disk and you want to move the entire WPAR to another disk. One example might be that the original disk is from an older storage enclosure, and you wish to move the WPAR to newly purchased storage, connected to the system.
You can do this by means of an alternate bootset. Similar to how using the alt_disk_copy command in a global LPAR will create a copy of rootvg on another disk, an alternate bootset is a copy of a WPAR's rootvg on another disk.
The example in this technote will use a rootvg wpar that is on a single disk (hdisk11), and has private /opt and /usr filesystems (AKA a "detached" WPAR). This was initially created using these options:
|