Exadata Patching, Step by Step: The Order and Why
How an Exadata machine is patched, from choosing the quarterly patch to the final ExaChecks: the timeline, the prerequisites, the pre-checks, and the order on patching day, as I do it with Oracle's Platinum service.
Exadata patching is planned weeks ahead and done in a fixed sequence. You choose the quarterly patch (QFSDP), book a date, upload ExaChecks, review Oracle's patch assessment and plan, meet the prerequisites, let the pre-checks run, take your backups, and then on the day patch the compute nodes, the cells and the switches, finishing with datapatch and a final ExaChecks.
Here is each step, the way it happens when Oracle's Platinum team patches our rack. For customers on Premier Support whose systems qualify, Platinum Services come at no extra charge, and they include patching done by Oracle up to four times a year. If you patch manually, the steps are the same, you just do them yourself.
Step 1: choose the patch cycle
The first word on the white paper: which cycle do I patch to?
You patch for audit, compliance, vulnerabilities, security fixes and bug fixes. Oracle releases the patches quarterly, so you choose from the last few quarters.
Everybody follows the n minus one rule: go one release behind the latest. One exception. If your lower environments and DR are already on an older cycle, apply that same cycle to production. The application has been tested on it, and the bug fixes have been addressed there. For a new test or a new DR environment, always go n minus one.
Step 2: know what is in the patch
Everything comes under one number, the QFSDP, the quarterly full stack download patch. It downloads in several zip parts, which you unzip and join into one folder. Inside it:
- Database: the Grid Infrastructure and database Release Update, OJVM and OPatch
- Infrastructure: the database servers, the storage servers and the fabric switches: operating system, Exadata software and firmware
- Systems management: the Enterprise Manager agent, OMS and plug ins. Nobody does these as part of Platinum patching
- PDU: the PDU metering unit firmware
Choose the database server patch that matches your own OS version. One switch patch serves all switches; an option picks the admin, RoCE or InfiniBand switch.
Since Release Update 19.17 there are also Monthly Recommended Patches (MRPs) for 19c on Linux. They bundle a few important one off fixes on top of the Release Update, and they are not part of the QFSDP. You download them from My Oracle Support when you need them.
Step 3: the timeline before patching day
- 2 to 3 months before: your DBAs schedule the patching on Oracle's support portal, like booking a flight ticket. It takes 30 to 60 minutes. Plan early or you won't get a date.
- Right after booking: Oracle opens a patching SR with the "solution implementation date". Your patching coordinator asks for ExaChecks and the patch template.
- 4 weeks before: you upload ExaChecks (automatic if the firewall allows; 60 to 90 minutes to generate and upload) and fill the patch template.
- 3 weeks before: Oracle publishes the patch assessment, a Word document.
- 2 to 3 weeks before: Oracle publishes the patch plan, an Excel sheet attached to the SR. You give Oracle the war room password.
- 2 weeks before: all prerequisites met, by you.
- 1 week before: pre-checks done, and every issue found fixed, together.
- 1 to 2 days before: backups, by you.
The patch assessment: read section 5.2.1
Every patching SR says: please review section 5.2.1 of the patch assessment. That section is the critical issues, taken from your ExaChecks report. Address every critical check, with Oracle's help if needed. I know many people in the industry never open the assessment. Open it.
The patch plan: check the overview tab
The plan is an Excel sheet with tabs for the overview, communication plan, special instructions, pre-patch checklist and the compute plan. On the overview tab, make sure the target Exadata image and Release Update versions match what your business expects.
The war room user
Up to this point Oracle has not touched your system. To run the pre-checks, they connect from their gateway server to your first database node as a dedicated war room user, then sudo to root. That user must have sudo to root. Without its password, Oracle will not connect, will not download the patches and will not run the pre-checks. Your patching coordinator tells you how to hand the password over; never put it in the SR text.
Step 4: prerequisites, two weeks before
On Platinum, Oracle downloads and stages the patches in /u01/patches on the database server. Everything else on this list is yours:
- Group files for the database servers, the cells and the switches, so one command runs on all of them with dcli.
- SSH keys. Passwordless root SSH from the first compute node to the other compute nodes and to the cells. The RoCE and Cisco switches have no root, so they get SSH with a password. Wrong keys make the pre-checks fail.
- Mount points. Save the output of
df -h. After patching, some mount points can go missing; this happened to me with/opt/oracle.support. The patching unmounts non-standard mounts such as NFS and DBFS, so tell the application team. - Services. Note the listeners, the services and every OS agent: audit, security, backup, monitoring. You will bring them back.
- No open hardware failures and no offline disks. Oracle's scripts stop if there is one.
- Replication in sync. GoldenGate and Data Guard in sync now, stopped on patching day.
df -h
dcli -g dbs_group -l root "imageinfo"Step 5: pre-checks, one week before
Oracle runs the pre-checks two or three times: weeks before, one week before and on the day. Each run takes 30 to 60 minutes and leaves a timestamped log directory on the first compute node. Count the directories and you know how many times they ran. Fix every FAIL; use judgement on every WARNING.
What they check, top to bottom like a body check-up:
- SSH equivalence to every node, cell and switch
- Free space on
/,/u01and the logical volumes; inode usage - OS and hardware versions, and whether an intermediate upgrade is needed
- Known critical issues on the cells and compute nodes
- Switch, firmware and BIOS versions; fabric link status
- Flash status, grid disk and flash disk health, CPU count
- Invalid objects for datapatch. If they have been invalid for years, you can tell Oracle to ignore them
- Non-standard RPMs. Only the ones that conflict must go; reinstall them after, in a version that fits the new kernel
If a hardware part must be replaced, give it one to two weeks.
Step 6: backups, one or two days before
Take an Oracle home backup, a grid home backup and a backup of /etc, and confirm your database backups. Why /etc? Sometimes the SSH configuration changes during patching. One DBA in my class told me /etc itself went missing.
Step 7: patching day
- The application team shuts down. You tell Oracle to proceed.
- Oracle runs the pre-checks once more (25 to 30 minutes, sometimes 60).
- A clean reboot, so any problem shows before the patch, not after.
- Compute nodes. On each node: the infrastructure patch (OS kernel, Exadata software and firmware: BIOS, ILOM, disk controllers, power supplies and more), then the Release Update for the grid and database homes, then OJVM. The infrastructure patch is like one syringe with three colours: one patch, three upgrades.
- After the infrastructure patch on a node, check the image version and tell Oracle to go on. After the Release Update, check the patch list.
- Rolling means one node at a time; non-rolling means all together, faster but with downtime. One to two hours per node is healthy. I have seen a node take 5 to 6 hours. Eight nodes rolling, count eight hours.
- Datapatch only after the binaries are patched on every node, because it is database level: it loads the SQL changes into the data dictionary to match the new binaries. It runs once for each database, from one node, with all its PDBs open.
- Cells and switches. Oracle's script calls
patchmgrfor the cells. Cells and InfiniBand or RoCE switches can be patched together. - Post-check and a final ExaChecks. Then the machine goes back to the application team.
$ORACLE_HOME/OPatch/opatch lspatchesIs there a fixed order?
No. You can start with the database nodes, the cells or the switches. But finish one group before you start the next.
Think about the downtime window. If OJVM needs two hours of downtime at noon and patching starts at 5 a.m., make sure the cells don't eat that window. Usually Oracle starts with the compute nodes.
When something fails
Look in the pre-check directory for two files: debug.log, which has everything, and the failure summary, which has only the failures. Start with the failure summary.
How often each component is patched
- Database servers, cells, InfiniBand and RoCE switches: every QFSDP you apply, usually twice a year.
- Admin switch and PDU: rarely. I have seen environments that never patched them in the rack's 5 year life.
Patching is not complex
Once you have watched the scripts and the logs two or three times, it looks very easy. In your free time, go and read the stage log in your own environment.
Manual patching is only a handful of commands. patchmgr runs from the unzipped patch directory on the first database server, against a group file. These are the forms from Oracle's documentation for current releases (the options take two dashes since Exadata software 19.3). The prerequisite check only reads; the patch and upgrade commands change the servers, so run them in your window.
Storage cells, check first, then patch one cell at a time:
./patchmgr --cells cell_group --patch_check_prereq --rolling
./patchmgr --cells cell_group --patch --rollingDatabase servers, check, then upgrade:
./patchmgr --dbnodes dbs_group --precheck --repo <patch zip> --target_version <version>
./patchmgr --dbnodes dbs_group --upgrade --repo <patch zip> --target_version <version> --rollingOne rule: patchmgr cannot update the database server it runs on. Run it from the first node against a group file of the other nodes, then patch the first node from one of them. So patching is no more complex now.