Print this page
6198 Let's EOL cachefs

Split Close
Expand all
Collapse all
          --- old/usr/src/cmd/stmsboot/mpxio-upgrade
          +++ new/usr/src/cmd/stmsboot/mpxio-upgrade
↓ open down ↓ 13 lines elided ↑ open up ↑
  14   14  # When distributing Covered Code, include this CDDL HEADER in each
  15   15  # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  16   16  # If applicable, add the following below this CDDL HEADER, with the
  17   17  # fields enclosed by brackets "[]" replaced with your own identifying
  18   18  # information: Portions Copyright [yyyy] [name of copyright owner]
  19   19  #
  20   20  # CDDL HEADER END
  21   21  #
  22   22  #
  23   23  # Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
       24 +# Copyright 2015 Nexenta Systems, Inc. All rights reserved.
  24   25  #
  25   26  
  26   27  . /lib/svc/share/fs_include.sh
  27   28  . /lib/svc/share/net_include.sh
  28   29  
  29   30  # Make sure that the essential libraries can be found.
  30   31  LD_LIBRARY_PATH=/lib; export LD_LIBRARY_PATH
  31   32  STMSBOOTUTIL=/lib/mpxio/stmsboot_util
  32   33  SAVEDIR=/etc/mpxio
  33   34  BOOTDEVICES=$SAVEDIR/boot-devices
↓ open down ↓ 132 lines elided ↑ open up ↑
 166  167                          new_special=$special
 167  168                          ;;
 168  169                  /dev/vx/*)
 169  170                          new_special=$special
 170  171                          ;;
 171  172                  *)
 172  173                          new_special=`$STMSBOOTUTIL -m $special`
 173  174                          ;;
 174  175                  esac
 175  176                  
 176      -                if [ "$fstype" = "cachefs" ]; then
 177      -                        # Mount read-only without the cache.
 178      -                        case "$mntopts" in
 179      -                        *backfstype=nfs*)
 180      -                                cfsbacktype=nfs
 181      -                                ;;
 182      -                        *backfstype=hsfs*)
 183      -                                cfsbacktype=hsfs
 184      -                                ;;
 185      -                        *)
 186      -                                cecho 'stmsboot: invalid vfstab entry for /usr'
 187      -                                cfsbacktype=nfs
 188      -                                ;;
 189      -                        esac
 190      -                        # see the comment below for /dev/null
 191      -                        $MOUNT -m -F $cfsbacktype -o ro $new_special $mountp \
 192      ->/dev/null 2>&1
 193      -                        ret_val=$?
      177 +                #
      178 +                # Must use -o largefiles here to ensure the read-only
      179 +                # mount does not fail as a result of having a large
      180 +                # file present on /usr.
      181 +                #
      182 +                if [ "$mntopts" = "-" ]; then
      183 +                        mntopts='ro,largefiles'
 194  184                  else
 195      -                        #
 196      -                        # Must use -o largefiles here to ensure the read-only
 197      -                        # mount does not fail as a result of having a large
 198      -                        # file present on /usr.
 199      -                        #
 200      -                        if [ "$mntopts" = "-" ]; then
 201      -                                mntopts='ro,largefiles'
 202      -                        else
 203      -                                checkopt largefiles $mntopts
 204      -                                if [ "$option" != "largefiles" ]; then
 205      -                                        mntopts="largefiles,$mntopts"
 206      -                                fi
      185 +                        checkopt largefiles $mntopts
      186 +                        if [ "$option" != "largefiles" ]; then
      187 +                                mntopts="largefiles,$mntopts"
      188 +                        fi
 207  189  
 208      -                                checkopt ro $mntopts
 209      -                                if [ "$option" != "ro" ]; then
 210      -                                        mntopts="ro,$mntopts"
 211      -                                fi
      190 +                        checkopt ro $mntopts
      191 +                        if [ "$option" != "ro" ]; then
      192 +                                mntopts="ro,$mntopts"
      193 +                        fi
 212  194  
 213      -                                # Requesting logging on a read-only mount
 214      -                                # causes errors to be displayed, so remove
 215      -                                # "logging" from the list of options.
 216      -                                checkopt logging $mntopts
 217      -                                if [ "$option" = "logging" ]; then
 218      -                                        mntopts="$otherops"
 219      -                                fi
      195 +                        # Requesting logging on a read-only mount
      196 +                        # causes errors to be displayed, so remove
      197 +                        # "logging" from the list of options.
      198 +                        checkopt logging $mntopts
      199 +                        if [ "$option" = "logging" ]; then
      200 +                                mntopts="$otherops"
 220  201                          fi
      202 +                fi
 221  203  
 222      -                        # In case of a manual restart of the service, mount
 223      -                        # will emit messages if /usr is already mounted.
 224      -                        # So redirect the output to /dev/null.
 225      -                        $MOUNT -m -F $fstype -o $mntopts $new_special /usr \
      204 +                # In case of a manual restart of the service, mount
      205 +                # will emit messages if /usr is already mounted.
      206 +                # So redirect the output to /dev/null.
      207 +                $MOUNT -m -F $fstype -o $mntopts $new_special /usr \
 226  208  >/dev/null 2>&1
 227      -                        ret_val=$?
 228      -                fi
      209 +                ret_val=$?
 229  210                  if [ $ret_val -eq 0 ]; then
 230  211                          usrmounted=1
 231  212                  fi
 232  213          fi
 233  214  
 234  215          return $ret_val
 235  216  }
 236  217  
 237  218  # update system dump configuration
 238  219  update_dumpconf()
↓ open down ↓ 159 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX