EasyManuals Logo

Oracle ZFS Storage Appliance User Manual

Oracle ZFS Storage Appliance
650 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #53 background imageLoading...
Page #53 background image
Using the Choices Function
Understanding CLI Scripting Errors
When an error is generated, an exception is thrown. The exception is generally an object that
contains the following members:
code - a numeric code associated with the error
message - a human-readable message associated with the error
Exceptions can be caught and handled, or they may be thrown out of the script environment. If
a script environment has an uncaught exception, the CLI will display the details. For example:
dory:> script run('not a cmd')
error: uncaught error exception (code EAKSH_BADCMD) in script: invalid command
"not a cmd" (encountered while attempting to run command "not a cmd")
You could see more details about the exception by catching it and dumping it out:
dory:> script try { run('not a cmd') } catch (err) { dump(err); }
{
toString: <function>,
code: 10004,
message: 'invalid command "not a cmd" (encountered while attempting to
run command "not a cmd")'
}
This also allows you to have rich error handling, for example:
#!/usr/bin/ksh -p
ssh -T root@dory <<EOF
script
try {
run('shares select default select $1');
} catch (err) {
if (err.code == EAKSH_ENTITY_BADSELECT) {
printf('error: "$1" is not a share in the ' +
'default project\n');
exit(1);
}
throw (err);
}
printf('"default/$1": compression is %s\n', get('compression'));
exit(0);
EOF
About the Oracle ZFS Storage Appliance 53

Table of Contents

Other manuals for Oracle ZFS Storage Appliance

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Oracle ZFS Storage Appliance and is the answer not in the manual?

Oracle ZFS Storage Appliance Specifications

General IconGeneral
Connectivity10GbE, 40GbE, InfiniBand, Fibre Channel
ProtocolsNFS, SMB, iSCSI, Fibre Channel, HTTP
Operating SystemOracle Solaris
Data Protectionsnapshots, clones, remote replication
Data ReductionInline compression, deduplication
High AvailabilityRedundant hardware components (controllers, power supplies, fans). Automatic failover between controllers. Hot-swappable drives and components. Cluster configurations for increased availability and scalability.
Management InterfaceWeb-based GUI, CLI, REST API
Storage TypeHybrid (SSD + HDD), All-Flash
Storage CapacityUp to several petabytes
EncryptionAES-256 encryption at rest

Related product manuals