ITEM: BQ2784L

Error creating sblv - trying again using defaults ..



Question:

Env:
  AIX 4.1.4  (this bug will effect all levels of AIX)
  RISC J30
  sysback 3.3.3.9

Desc:
  The customer is recreating a volume group using the remakevg command.
  It fails to create one of the LVs, then fails to create it using
  defaults.  But the lv does exist  lslv \
  
  Error creating sblv - trying again using defaults ..
  
  Unable to create logical volume sblv.

  
Action:
  I was able to reproduce this one in the lab.  The bug was found to be
  in the remakevg command.

    mklv -y $lvname -t $type $strpopt $mapopt $intraopt $copyopt \\
                $interopt -b $bbpolicy $relocopt $strictopt $upperopt \\
                -v $verify $mwcopt -x $maxlps $label $vgname $lps \\
                $LVpvlist >/dev/null 2>/tmp/$$mklv || rc=$?  sleep 2
        if [ $rc -ne 0 -o -s /tmp/$$mklv ]
          then \# Error - try again using default disks, 1 copy,
                \#   no striping and no map file
                msg 323 '\\tError creating %s - trying again using defaults ..' \\
                        $lvname
                mklv -y $lvname -t $type -a $intra -c 1 -e $inter \\
                   -b $bbpolicy -r $relocate -s $strict $label \\
                   -v $verify -w $mwc -x $maxlps $vgname $lps \\
                   >/dev/null 2>/tmp/$$mklv || rc=$?
                if [ $rc -ne 0 -o -s /tmp/$$mklv ]
                   then cat /tmp/$$mklv
                        rm -f /tmp/$$mklv
                        msg 324 'Unable to create logical volume %s.' $lvname >&
2                        cancel 1
                fi


After the first mklv fails the rc value is set to a non-zero return code.
It is never reset back to zero.  So once the mklv fails it will always fail
when using the defaults settings (even though the lv  was created successfully)

It is never reset back to zero.  So once the mklv fails it will always fail
when using the defaults settings (even though the lv  was created successfully)

By adding this line it will correct the problem

       if [ $rc -ne 0 -o -s /tmp/$$mklv ]
           then \# Error - try again using default disks, 1 copy,
                \#   no striping and no map file

                \#ADD THIS LINE
                rc=0      
                \#ADD THIS LINE

                msg 323 '\\tError creating %s - trying again using defaults ..' \\
                        $lvname

This is a small fix, but the bug has caused major 
problems.  So it is a critical fix.  

Fix was added to sysback 3.3.3.10

Next Action:
  Closing with customer approval


Support Line: Error creating sblv - trying again using defaults .. ITEM: BQ2784L
Dated: November 1996 Category: N/A
This HTML file was generated 99/06/24~13:30:20
Comments or suggestions? Contact us