ORACLE: PRKF-1125 : multiple values specified for the single value option “diskstring”: /dev/sd*,/dev/nvme0*

  • Post author:
  • Post category:DB / Oracle

Have you ever tried to modify the ASM diskstring with the srvctl utility. I mean, not changing the diskstring, but adding a new one to it. Due to the documentation, the asm_diskstring parameter specifies a comma delimited list of strings that limits the set of disks that an Oracle ASM instance discovers.

https://docs.oracle.com/en/database/oracle/oracle-database/21/ostmg/init-params-asm-instance.html

So … if it works for the parameter file, why shouldn’t it work with the srvctl utility. The simple thing I want to do, is to change the ASM diskstring from /dev/sd* to /dev/sd* , /dev/nvme0*.

[grid@ocm199 oracleasm]$ srvctl config asm
ASM home: <CRS home>
Password file: +DATA/orapwasm
Backup of Password file:
ASM listener: LISTENER
Spfile: +DATA/ASM/ASMPARAMETERFILE/registry.253.1135337751
ASM diskgroup discovery string: /dev/sd*
[grid@ocm199 oracleasm]$

[grid@ocm199 oracleasm]$ srvctl modify asm -diskstring "/dev/sd* , /dev/nvme0*"
PRKF-1125 : multiple values specified for the single value option "diskstring": /dev/sd*,/dev/nvme0*

[grid@ocm199 oracleasm]$ srvctl modify asm -diskstring '/dev/sd*','/dev/nvme0*'
PRKF-1125 : multiple values specified for the single value option "diskstring": /dev/sd*,/dev/nvme0*

It doesn’t matter how I specify the diskstring, I always do get the error: PRKF-1125 : multiple values specified for the single value option “diskstring”: /dev/sd*,/dev/nvme0*

The second option to change the ASM diskstring, is the asmcmd utiliy. The asmcmd utility comes with the commands dsget (diskstring get) and dsset (diskstring set).

ASMCMD> help dsget
dsget
        Retrieves the discovery diskstring value that is
        used by the Oracle ASM Instance and its clients

Synopsis
        dsget [ --normal | --profile [ -f ] | --parameter ]

Description
        The options for the dsget command are described below.

        --normal        - Retrieves the discovery string from the Grid Plug
                          and Play (GPnP) profile and the one that is set in
                          the Oracle ASM instance. It returns one row each for
                          the profile and parameter setting. This is the
                          default setting.

        --parameter     - Retrieves the ASM_DISKSTRING parameter setting of
                          the Oracle ASM instance.

        --profile       - Retrieves the discovery string from the GPnP
                          profile.

        -f              - If -f is specified, retrieves the discovery string
                          from the local GPnP profile.  This parameter
                          can only be specified if --profile is specified.

Examples
        The following example uses dsget to retrieve the current discovery
        diskstring value from the GPnP profile and the ASM_DISKSTRING parameter.

        ASMCMD [+] > dsget
        profile: /devices/disk*
        parameter: /devices/disk*

See Also
       dsset

ASMCMD> help dsset
dsset
        Sets the discovery diskstring value that is used by the Oracle ASM
        instance and its clients.  The specified diskstring must be valid for
        existing mounted disk groups. The updated value takes effect
        immediately.

Synopsis
        dsset [ --normal | --parameter | --profile [ -f ] ] <diskstring>

Description
        The options for the dsset command are described below.

        --normal                - Sets the discovery string in the Grid Plug
                                  and Play (GPnP) profile and in the Oracle
                                  ASM instance.  The update occurs after the
                                  Oracle ASM instance has successfully
                                  validated that the specified discovery
                                  string has discovered all the necessary disk
                                  groups and voting files. Note that this
                                  command fails if the instance is not using
                                  a server parameter file (SPFILE).  This is
                                  the default setting.

        --profile               - Specifies the discovery diskstring that is
                                  pushed to the GPnP profile without any
                                  validation by the Oracle ASM instance,
                                  ensuring that the instance can discover
                                  all the required disk groups.  The update
                                  is guaranteed to be propagated to all the
                                  nodes that are part of the cluster

        -f                      - If -f is specified, the specified
                                  diskstring is pushed to the local GPnP
                                  profile without any synchronization with
                                  other nodes in the cluster. Note that this
                                  command option updates only the local profile
                                  file. This option should only be used in the
                                  case of recovery. The command fails if the
                                  Oracle Clusterware stack is running.  This
                                  option can be specified only if --profile is
                                  specified.
        --parameter             - Specifies that the diskstring is updated in
                                  memory after validating that the discovery
                                  diskstring discovers all the current mounted
                                  disk groups and voting files. The diskstring
                                  is not persistently recorded in either the
                                  SPFILE or the GPnP profile.
        diskstring              - Specifies the value for the discovery
                                  diskstring

Examples
        The following example uses dsset to set the current value of the
        discovery diskstring in the GPnP profile.

        ASMCMD [+] > dsset /devices/disk*

See Also
       dsget

ASMCMD>

OK. Let’s try them out.


[grid@ocm199 oracleasm]$ asmcmd dsget
parameter:/dev/sd*
profile:/dev/sd*
[grid@ocm199 oracleasm]$
[grid@ocm199 oracleasm]$ asmcmd dsset '/dev/sd*','/dev/nvme0*'
[grid@ocm199 oracleasm]$
[grid@ocm199 oracleasm]$ asmcmd dsget
parameter:/dev/sd*, /dev/nvme0*
profile:/dev/sd*,/dev/nvme0*
[grid@ocm199 oracleasm]$ srvctl config asm
ASM home: <CRS home>
Password file: +DATA/orapwasm
Backup of Password file:
ASM listener: LISTENER
Spfile: +DATA/ASM/ASMPARAMETERFILE/registry.253.1135337751
ASM diskgroup discovery string: /dev/sd*,/dev/nvme0*

Cool. It worked. 🙂

Conclusion

In Oracle you will find ofter different ways to reach your goal. My workaround this time was to switch from the srvctl to the asmcmd utility.