Chapter 5. Workload partition rootvg support 93
5.2 WPAR system rootvg creation
System rootvg shared or non-shared WPARs are easily created with the mkwpar command or
with SMIT (smitty mkwpar).
A detached (private copy of /usr and /opt file systems) system rootvg WPAR is created with
the mkwpar command with the “-l” flag, or with a specification file (refer to Table 5-2 on
page 94).
Table 5-1 The mkwpar command with the -l flag and the specification file attributes
We create a shared rootvg WPAR named wparm91 with the rootvg based on disk hdisk0
(virtual SCSI disk), and another disk hdisk4 (MPIO DS4K Array disk) with network details, as
shown in Example 5-1.
Example 5-1 Creating shared system rootvg WPAR from the command line
mkwpar -n wparm91 -D devname=hdisk4 rootvg=yes -D devname=hdisk0 -N interface=en0
address=172.16.20.90 netmask=255.255.252 .0 -I rtdest=0 rtgateway=172.16.20.1
Creating workload partition's rootvg. Please wait...
mkwpar: Creating file systems...
/
/admin
/home
/opt
/proc
/tmp
/usr
/var
……Lines were removed…..
Finished populating scratch file systems.
Workload partition wparm91 created successfully.
mkwpar: 0960-390 To start the workload partition, execute the following as root:
startwpar [-v]
wparm91
Flag/attribute Description/value
-l This flag creates private and writable versions of
the /usr and /opt file systems.
rootvgwpar The value is “yes” for a rootvg WPAR or “no” for
non-rootvg WPAR.
privateusr The value is “yes” for a WPAR dedicated /usr file
system or “no” for a shared /usr file system with
the global environment.
Disk space: When you create a detached system rootvg WPAR, you must consider the
size of the file systems from the global environment for the hdisk rootvg sizing.
If the allocated disk for the rootvg is smaller than the current size of the file systems from
the global environment, the following mkwpar error message appears:
mkwpar: 0960-351 Failed to create the <corresponding file system>
94 Exploiting IBM AIX Workload Partitions
The mkwpar command accepts many input parameters when a new WPAR is created. You can
set parameters, such as logical volume management policy, mount directories, resource
control settings, and user customization script, and allocate disks and adapters. If you do not
provide all needed parameters to the mkwpar command, you can modify the created WPAR
configuration with the chwpar command.
Table 5-2 shows the important flags for the mkwpar command.
Table 5-2 Important mkwpar flags
Flag Description
-a Automatically resolve erroneous/conflicting
settings.
-B Device or path name of savewpar or mksysb
backup image.
-c Flag as checkpointable.
-e Get specification data from an existing WPAR.
-f Path to input specification file.
-l Create private, writable versions of /usr and /opt.
-L Logical volume management policy (image_data,
shrink, ignore_lvs, and ignore_maps).
-n WPAR name.
-N Network settings (interface, address, netmask,
broadcast, address6, and prefixlen).
-o Path to output specification file.
-O Overwrite an existing volume group on the
specified disks for a rootvg WPAR.
-p Preserve file system data from the named mount
group.
-r Copy global network name resolution
configuration into the WPAR.
-R Resource control settings (active, rset, CPU,
memory, procVirtMem, totalVirtMem,
shares_CPU, shares_memory, totalProcesses,
totalThreads, totalPTYs, totalLargePages,
pct_msgIDs, pct_semIDs, pct_shmIDs, and
pct_pinMem).
-S Configures the security settings of a WPAR
(secfile and privs[+|-]).
-X Configures the exported kernel extensions (kext,
exportfile, local, and major).
-w Only write specification file (do not create).
-C Create a Versioned WPAR.
-D Needed to export devices (to create a rootvg
WPAR).
Chapter 5. Workload partition rootvg support 95
The System rootvg detached WPAR can also be recreated with a WPAR specification file.
In Example 5-2, a detached rootvg WPAR is created using a specification file with the mkwpar
command. To create a shared rootvg WPAR with the same specification, just change the
attribute "privateusr", under the "general" stanza clause, from "yes" to "no".
Example 5-2 The mkwpar -f wpar11specPrivateUSR command
root@750_1_LPAR_9:/home: mkwpar -f wpar11specPrivateUSR
Creating workload partition's rootvg. Please wait...
mkwpar: Creating file systems...
/
/admin
/home
/opt
/proc
/tmp
/usr
/var
Mounting all workload partition file systems.
mkwpar: Copying base files...
...LINES REMOVED...
root@750_1_LPAR_9:/home: cat wpar11specPrivateUSR
general:
name = "wpar11"
checkpointable = "no"
hostname = "wpar11"
directory = "/wpars/wpar11"
privateusr = "yes"
devices = "/etc/wpars/devexports"
ostype = "0"
auto = "no"
rootvgwpar = "yes"
preserve = "no"
routing = "yes"
...LINES REMOVED...
device:
devid = "3E213600A0B8000114632000026614D882CF30F1815 FAStT03IBMfcp"
devtype = "2"
rootvg = "yes"
extension:
kext = "ALL"
...LINES REMOVED...
network:
broadcast = "172.16.23.255"
interface = "en0"
address = "172.16.20.115"
netmask = "255.255.252.0"

Get Exploiting IBM AIX Workload Partitions now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.