Mark,
> I can easily reproduce the problem on my SLES11 SP2 system with this
script:
> ...
Nice test case! I modified it a bit :)) I never got the chccwdev to fail.
I did see the mkswap fail regularly. Then I randomly added a "udevadm
settle" after the chccwdev -e. Every time the udevadm settle kicks in, the
mkswap works! So maybe the solution is as easy as adding a udevadm settle
after the chccwdev -e?
Here's the test run:
# for i in {1..10}
> do
> testudev
> done
seed is small - add udevadm settle
SUCCESS
seed is large
FAILURE
seed is large
FAILURE
seed is small - add udevadm settle
SUCCESS
seed is small - add udevadm settle
SUCCESS
seed is large
FAILURE
seed is large
FAILURE
seed is large
FAILURE
seed is large
FAILURE
seed is large
FAILURE
Here's the code:
# cat testudev
#!/bin/bash
let seed=$RANDOM
if [ $seed -lt 16384 ]; then # add a udevsettle
echo "seed is small - add udevadm settle"
else
echo "seed is large"
fi
vmcp define vfb-512 302 2000 > /dev/null
chccwdev -e 0.0.0302 > /dev/null
rc=$?
if [ $rc != 0 ]; then
echo "return code from chccwdev -e 0.0.0302 = $rc"
fi
if [ $seed -lt 16384 ]; then # add a udevsettle
udevadm settle
fi
mkswap /dev/disk/by-path/ccw-0.0.0302-part1 > /dev/null 2>&1
rc=$?
if [ $rc != 0 ]; then
echo "FAILURE"
else
echo "SUCCESS"
fi
chccwdev -d 0.0.0302 > /dev/null
rc=$?
if [ $rc != 0 ]; then
echo "return code from chccwdev -d 0.0.0302 = $rc"
fi
vmcp det 302 > /dev/null
"Mike MacIsaac" <mikemac at-sign us.ibm.com>
----------------------------------------------------------------------
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390
----------------------------------------------------------------------
For more information on Linux on System z, visit
http://wiki.linuxvm.org/