Skip to content


Przenośny WPAR – krok po kroku

Wersja Polska wkrótce.

NfsServer:/>crfs -v jfs2 -m /rootWpar1 -g WparVG –u testWpar –A yes –a size=1G -a log=INLINE
NfsServer:/>crfs -v jfs2 -m /varWpar1 -g WparVG –u testWpar –A yes –a size=1G -a log=INLINE
NfsServer:/>crfs -v jfs2 -m /homeWpar1 -g WparVG –u testWpar –A yes –a size=1G -a log=INLINE
NfsServer:/>crfs -v jfs2 -m /tmpWpar1 -g WparVG –u testWpar –A yes –a size=1G -a log=INLINE

“-u testWpar”
“-A yes”
“-a size=1G”
“-a log=INLINE”

SourceLpar:/root>mkwpar -n testWpar -N interface=en0 address=159.14.245.89 netmask=255.255.255.0 -r\
-M directory=/ vfs=nfs host=NfsServer dev=/rootWpar1 \
-M directory=/var vfs=nfs host=NfsServer dev=/varWpar1 \
-M directory=/home vfs=nfs host=NfsServer dev=/homeWpar1 \
-M directory=/tmp vfs=nfs host=NfsServer dev=/tmpWpar1

…..............................
…..............................
rsct.core.hostrm            2.5.5.0         ROOT        APPLY       SUCCESS
rsct.core.lprm              2.5.4.0         ROOT        APPLY       SUCCESS
rsct.core.lprm              2.5.5.0         ROOT        APPLY       SUCCESS
rsct.core.microsensor       2.5.4.0         ROOT        APPLY       SUCCESS
rsct.core.microsensor       2.5.5.0         ROOT        APPLY       SUCCESS
rsct.core.gui               2.5.5.0         ROOT        APPLY       SUCCESS
syncroot: Error synchronizing installp software.
syncroot: Returns Status = FAILURE
Copying network name resolution configuration...
/etc/resolv.conf
/etc/hosts
/etc/netsvc.conf
Workload partition testWpar created successfully.
mkwpar: 0960-390 To start the workload partition, execute the following as root: s
SourceLpar:/root> mkwpar -w -o testWpar.spec -e testWpar
SourceLpar:/root> lswarp
ksh: lswarp:  not found.
SourceLpar:/root> lswpar
Name      State  Type  Hostname  Directory        RootVG WPAR
--------------------------------------------------------------
testWpar  D      S     testWpar  /wpars/testWpar  no
SourceLpar:/root>

# df -g
Filesystem    GB blocks      Free %Used    Iused %Iused Mounted on
NfsServer:/rootWpar1      1.00      0.95    6%     3032     2% /
NfsServer:/homeWpar1      1.00      0.99    1%        5     1% /home
Global             0.50      0.31   39%     8705    11% /opt
Global                -         -    -         -     -  /proc
NfsServer:/tmpWpar1      1.00      0.99    2%       13     1% /tmp
Global             4.44      0.37   92%    43855    31% /usr
NfsServer:/varWpar1      1.00      0.92    9%     4358     2% /var

targetWpar:MDC:/root>mkwpar -p -f testWpar.spec
mkwpar: Creating file systems...
/
/home
/opt
/proc
/tmp
/usr
/var
Workload partition testWpar created successfully.
mkwpar: 0960-390 To start the workload partition, execute the following as root: startwpar [-v] testWpar

targetWpar:MDC:/etc>startwpar -v testWpar
Starting workload partition testWpar.
Mounting all workload partition file systems.
Mounting /wpars/testWpar
Mounting /wpars/testWpar/home
Mounting /wpars/testWpar/opt
Mounting /wpars/testWpar/proc
Mounting /wpars/testWpar/tmp
Mounting /wpars/testWpar/usr
Mounting /wpars/testWpar/var
Loading workload partition.
Exporting workload partition devices.
Starting workload partition subsystem cor_testWpar.
0513-059 The cor_testWpar Subsystem has been started. Subsystem PID is 5570670.
Verifying workload partition startup.
Return Status = SUCCESS.

targetWpar:MDC:/etc>stopwpar -F -v testWpar
Stopping workload partition testWpar.
Stopping workload partition subsystem cor_testWpar.
0513-044 The cor_testWpar Subsystem was requested to stop.
Shutting down all workload partition processes.
WPAR='testWpar' CID=1
ID=9 KEY=0x62000086 UID=0 GID=0 RT=-1
wio0 Defined
Unmounting all workload partition file systems.
Umounting /wpars/testWpar/var.
Umounting /wpars/testWpar/usr.
Umounting /wpars/testWpar/tmp.
Umounting /wpars/testWpar/proc.
Umounting /wpars/testWpar/opt.
Umounting /wpars/testWpar/home.
Umounting /wpars/testWpar.
Return Status = SUCCESS.
targetWpar:MDC:/etc>lswpar
Name        State  Type  Hostname    Directory          RootVG WPAR
--------------------------------------------------------------------
testWpar    D      S     testWpar    /wpars/testWpar    no
vioprfp1n6  D      S     vioprfp1n6  /wpars/vioprfp1n6  yes
vioprfp1n7  D      S     vioprfp1n7  /wpars/vioprfp1n7  no

Posted in Real life AIX.

Tagged with , , , , , , , , .


9 Responses

Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.

  1. Brown Hair says

    Astonishing article . Will definitely copy it to my blog.Thanks

  2. Jay Kruemcke says

    AIX supports WPAR mobility with SAN devices since AIX 6.1 Technology Level 4 in October 2009

  3. MarkD:-) says

    Jay, do you have any links to documentation in this area?

  4. Israel says

    Hi.. really nice article. It’s one of the best in AIX’s blog world :-). Just a question, is possible to move a wpar running on AIX6.1 to a new LPAR running on AIX7.1? This explanation you did here is only possible on the same AIX’s version?

    Thanks a LOT!! Good work.

  5. MarkD:-) says

    Israel, I am not able to answer your question as I do not have yet any exposure to AIX7.

    Sorry,

    MarkD:-)

  6. Israel says

    OK Mark. I tested this on a hdisk instead a NFS filesystem, but I’m getting this error when try to restore on the target LPAR:
    :/tmp# mkwpar -p -f Microweb.spec
    mkwpar: 0960-330 Found registered file systems associated with microweb.
    mkwpar: 0960-368 To restore these file systems, use -p (general.preserve) without -M (mount).
    What I did? On the source LPAR, create the wpar on the hdisk4, stopwpar, exportvg, varyoffvg, change the hdisk rto the target LPAR, importvg, varyonvg and run the mkwpar command like above.
    Your steps are valid when using a hdisk instead NFS filesystems?
    Thanks.

  7. MarkD:-) says

    Israel,

    most likely it is because you built wpar on a local disk – hdisk4. Try to build it on an NFS file system instead and try again.

    Mark

  8. steve says

    Israel, All. did you actually get this working? when I use the mkwpar it works fine. I had to create the namefs filesystems manually on the second node as these are not part of the VG to exoirt/import.
    but on starting the wpar I get a load of errors, see below.
    any help would be appreciated

    Starting workload partition wp7103.
    Mounting all workload partition file systems.
    Loading workload partition.
    Exporting workload partition devices.
    Exporting workload partition kernel extensions.
    execle(): No such file or directory
    /usr/lib/wpars/wparinstcmd: 0960-231 ATTENTION: ‘/usr/lib/wpars/cleandev -a’ failed with return code 2.
    execle(): No such file or directory
    /usr/lib/wpars/wparinstcmd: 0960-231 ATTENTION: ‘/usr/bin/lppchk -Or -f bos.wpars’ failed with return code 2.
    Stopping workload partition subsystem cor_wp7103.
    0513-004 The Subsystem or Group, cor_wp7103, is currently inoperative.
    Shutting down all workload partition processes.
    execle(): No such file or directory
    /usr/lib/wpars/wparinstcmd: 0960-231 ATTENTION: ‘/usr/lib/methods/wpar_ucfgpty -l pty0’ failed with return code 2.
    execle(): No such file or directory
    /usr/lib/wpars/wparinstcmd: 0960-231 ATTENTION: ‘/usr/lib/wpars/wparlvmstop’ failed with return code 2.
    startwpar: 0960-232 ATTENTION: wpar_sweep() returned an unexpected result.
    Unmounting all workload partition file systems.
    startwpar: 0960-228 ATTENTION: Cleanup may not have completed successfully.

  9. steve says

    figured this out and got it working, you have to create the namefs (/proc/opt/usr) filesystems manually and ensure you use the -a type= name, otherwise they won’t to used during the mkwpar on the target system,



Some HTML is OK

or, reply to this post via trackback.

WordPress Anti Spam by WP-SpamShield



Copyright © 2016 - 2017 Waldemar Mark Duszyk. All Rights Reserved. Created by Blog Copyright.