Allocating a device
The allocation process consists of providing a storage device that can be used by the WPAR.
A device can be allocated to a WPAR when the WPAR is created or it can be added to WPAR in a later operation. For a device to be allocated to a WPAR, it must be in the available state or the defined state in the global environment.
lsdev -l <device>
mkwpar -D devname=<device name> -n <wpar name>
mkwpar -D devname=<device name> rootvg=yes -n <wpar name>
mkwpar -D devid=<unique device id> -n <wpar name>
chwpar -D devname=<device name> <wpar name>
chwpar -D devname=<device name> rootvg=yes <wpar name>
When you allocate a storage device to an active WPAR, the device is exported to the WPAR unless it was previously exported. To import the newly allocated device into the WPAR, invoke the cfgmgr command within the WPAR.
Exported
. To see the extended
state of a device, run the following lsdev command
with the new -x flag: lsdev -x -l hdisk1
A
message similar to the following example is displayed: hdisk1 Exported 01-08-02 MPIO Other DS4K Array Disk
Deallocating a device
chwpar -K -D devname=<device name> <wpar name>
When a storage device is deallocated from an inactive WPAR, the device is removed from the WPAR configuration. When a storage device is deallocated from an active WPAR, the chwpar command attempts to unconfigure the device. If the device is used, the unconfiguration operation fails and the command to remove the device from the WPAR also fails. When the command is successful, the device in the WPAR changes from the available state to the defined state.