AIX

AIX

Connect with fellow AIX users and experts to gain knowledge, share insights, and solve problems.

 View Only
  • 1.  install wpar in non-rootvg

    Posted Thu February 12, 2009 04:02 PM

    Originally posted by: SystemAdmin


    Hello, I am testing wpars and would like to know if anyone has any success installing wpars in a non-rootvg? If so, how was this accomploshed and is there any good documentation on performing this? Thanks in advance.


  • 2.  Re: install wpar in non-rootvg

    Posted Thu February 12, 2009 04:42 PM

    Originally posted by: unixgrl


    We have our wpar creation scripted. It asks for wparname and IP, then
    makes a new volume group with the same name as the wpar. Then it creates
    the volumes needed within that volume group. It also creates a config file that will have the correct paths to the filesystems.
    The nice thing about doing it with a script is that we can add logic to find free disks, make sure mount points exist etc. When you create a config file first, you can then use "mkwpar -f configfile".

    Following is a snippet of a script:
    mkvg -f -y ${VGNAME} ${DISK}
    mklv -y ${WPARNAME}root -t jfs2 ${VGNAME} 5
    mklv -y ${WPARNAME}tmp -t jfs2 ${VGNAME} 5
    mklv -y ${WPARNAME}home -t jfs2 ${VGNAME} 5
    mklv -y ${WPARNAME}var -t jfs2 ${VGNAME} 5
    1. Create wpar configuration file.
    ##
    echo "general:" > /tmp/wparconfig.$$
    echo " name=${WPARNAME}" >> /tmp/wparconfig.$$
    echo " directory = /wpars/${WPARNAME}" >> /tmp/wparconfig.$$
    echo " hostname = ${WPARNAME}" >> /tmp/wparconfig.$$
    echo " devices = /etc/wpars/devexports" >> /tmp/wparconfig.$$
    echo " vg = ${VGNAME}" >> /tmp/wparconfig.$$
    echo " copy_nameres = yes" >> /tmp/wparconfig.$$

    echo "network:" >> /tmp/wparconfig.$$
    echo " interface=${WPARNIC}" >> /tmp/wparconfig.$$
    echo " address=${WPARIP}" >> /tmp/wparconfig.$$
    echo " netmask=${WPARMASK}" >> /tmp/wparconfig.$$
    echo "" >> /tmp/wparconfig.$$

    echo "mount:" >> /tmp/wparconfig.$$
    echo " vfs = jfs2" >> /tmp/wparconfig.$$
    echo " directory = /" >> /tmp/wparconfig.$$
    echo " dev = /dev/${WPARNAME}root" >> /tmp/wparconfig.$$
    echo " logname = INLINE" >> /tmp/wparconfig.$$


  • 3.  Re: install wpar in non-rootvg

    Posted Thu February 12, 2009 05:18 PM

    Originally posted by: SystemAdmin


    thanks, i'll give that a try.


  • 4.  Re: install wpar in non-rootvg

    Posted Fri February 20, 2009 06:26 PM

    Originally posted by: nagger


    Ugh!
    Talk about total overkill and I don't like dozens of volume groups.

    Just make /wpars a filesystem in a different volume group.
    Then mkwpar -n fred
    and every wpar (that is not NFS mounted) will have their data a sub-directory in a non-rootvg.
    KISS.

    Thanks Nigel