A colleague was attempting to recreate a WPAR. The WPAR had previously been removed using the WPAR Manager Web GUI. This worked, or so he tells me!

Anyway, when he tried to create the WPAR again from the GUI, using the same WPAR name (wpar20), it failed. The error claimed that /wpars/wpar20 already existed. But it didnt!

Now, before I go any further, looking back at the issue now, it is pretty obvious what the problem might have been. However, the solution was not evident at first. This proves one thing for certain: some problems cannot be resolved without TWO cups of coffee in the morning.

Of course, I resorted to the command line to see what was REALLY happening.

The mkwpar command was indeed complaining that /wpars/wpar20 already existed.

# mkwpar -n wpar20

mkwpar: 0960-288 The /wpars/wpar20 file system already exists.

mkwpar: 0960-417 Specify -p to create this workload partition using the existing file system data.

I could not find any directory or file system with that name, anywhere under /wpars or elsewhere.

# ls -l /wpars/wpar20

/wpars/wpar20 not found

# ls -l /wpars

total 0


# df g | grep i wpar


# lsvg | lsvg il | grep i wpar


I ran the mkwpar with truss to try to find out where it was finding the reference to /wpars/wpar20. At this point you have probably already determined where the problem might be!

The truss output pointed me in the direction of /etc/filesystems.....of course! Another facepalm moment!

# truss mkwpar -n wpar20 > /tmp/wpar20 2>&1

# vi /tmp/wpar220

statx("/wpars/wpar20", 0x30008AB8, 128, 010) = -1

kopen("/etc/filesystems", O_RDONLY|O_LARGEFILE) = 4

Whatever my learned colleague had done when he removed the WPAR with the GUI, it left entries for the WPARs file systems in /etc/filesystems.

# grep wpar20 /etc/filesystems | grep -v type








And after removing these entries with the rmfs command, like so:

# grep wpar20 /etc/filesystems | grep -v type | sed -e 's/://'








# grep wpar20 /etc/filesystems | grep -v type | sed -e 's/://'

# cg="/wpars/wpar20

> /wpars/wpar20/home

> /wpars/wpar20/opt

> /wpars/wpar20/proc

> /wpars/wpar20/tmp

> /wpars/wpar20/usr

> /wpars/wpar20/var

> "

# echo $cg

/wpars/wpar20 /wpars/wpar20/home /wpars/wpar20/opt /wpars/wpar20/proc /wpars/wpar20/tmp /wpars/wpar20/usr /wpars/wpar20/var

# for i in $cg

> do

> rmfs $i

> done

We were able to create the WPAR once more without a problem.

# mkwpar -n wpar20

mkwpar: Creating file systems...








Mounting all workload partition file systems.

x ./usr

x ./lib

x ./admin

x ./admin/tmp

x ./audit

x ./dev

x ./etc

x ./etc/check_config.files

x ./etc/consdef

x ./etc/cronlog.conf

x ./etc/csh.cshrc

x ./etc/csh.login

x ./etc/dlpi.conf

x ./etc/dumpdates

x ./etc/environment

x ./etc/ewlm

x ./etc/ewlm/limits

x ./etc/ewlm/trc

x ./etc/ewlm/trc/config_schema.xsd

x ./etc/ewlm/trc/output_schema.xsd

x ./etc/filesystems

x ./etc/group

x ./etc/inittab

x ./etc/magic


Lessons I learnt from this were twofold, truss is (still) useful and drink more coffee before tackling a problem!