Exadata: From Physical Disk to ASM Disk Group
Table of Contents
This article shows how storage on an Exadata storage server is built up, layer by layer: physical disk, LUN, cell disk, grid disk, ASM disk and finally an ASM disk group. Each step has the command to run, the command to verify it, and what you should see.
1. The Big Picture
Hard disk or flash device in the storage server
Created automatically, one per physical disk
(no command needed)
Container the cell builds on the LUN
CREATE CELLDISK
A slice (the “partition”) of a cell disk
CREATE GRIDDISK
The grid disk as ASM sees it: o/<cell_ip>/<griddisk>
(discovered by ASM)
Disks grouped together for database files
CREATE / ALTER DISKGROUP
| Layer | Created by | Where | Command |
|---|---|---|---|
| Physical Disk | Hardware | Storage server | list physicaldisk |
| LUN | Exadata System Software (automatic) | Storage server | list lun |
| Cell Disk | You (or the installer) | Storage server | create celldisk |
| Grid Disk | You (or the installer) | Storage server | create griddisk |
| ASM Disk | ASM discovers the grid disk | Database server | v$asm_disk |
| ASM Disk Group | You | Database server (ASM) | create / alter diskgroup |
About the “partition” step: on Exadata you do not partition a disk manually. The LUN is created automatically, and the grid disk is the partition: a cell disk is divided into one or more grid disks. (On X6 and earlier, the first two hard disks also keep a small system area for the operating system. From X7 onwards that system area is on separate M.2 devices.)
On a new Exadata, the installer (OEDA) does all of these steps for you. You do them yourself when you add a new storage server to an existing system, or when you build a lab.
2. Before You Start
WARNING: These commands create and drop storage objects. Run them only on a new, empty storage server or in a lab. Never run them on a cell that already holds database data.
Run the first three checks on the storage server.
# expect: online, running, running, running
[root@cell01 ~]# cellcli -e list physicaldisk attributes name,diskType,status
# expect: status = normal for every disk
- The cell has its IP addresses configured and the cell services are running.
- All physical disks show
normal. - You know the disk group names and the size of each grid disk you want (for example DATAC1 and RECOC1).
- If you are adding the cell to existing disk groups, you have the exact grid disk sizes from an existing cell (see Step 4).
Naming used in this article: cell name cell01, grid disk prefixes DATAC1 and RECOC1, and cell IP <cell_ip>. Replace them with your own values.
3. Step 1: Check the Physical Disks
Physical disks are the hard disks and flash devices inside the storage server. Note which ones are HardDisk and which are FlashDisk.
Result: every disk is listed with status = normal.
4. Step 2: Check the LUNs
The Exadata System Software creates one LUN for each physical disk automatically. You do not create LUNs. Just check that they exist and are normal.
Result: each LUN is normal. The cellDisk column is empty until you create the cell disks in the next step.
5. Step 3: Create the Cell Disks
A cell disk is the storage object the cell builds on a LUN. Create them for all candidate LUNs with one command:
# or only one type:
CellCLI> create celldisk all harddisk
CellCLI> create celldisk all flashdisk
# or one cell disk on one LUN:
CellCLI> create celldisk CD_00_cell01 lun=0_0
Verify:
Result: one cell disk per LUN (typically CD_00_cell01 and so on for hard disks, and FD_00_cell01 and so on for flash), all normal. At this point freeSpace equals the full size, because no grid disks exist yet.
Flash disks: create the flash log and flash cache
On a High Capacity cell, the flash cell disks are normally used for Smart Flash Cache and Smart Flash Log, not for grid disks:
CellCLI> create flashcache all
WARNING: Do not use the FORCE option with CREATE CELLDISK unless Oracle Support tells you to. It reuses an existing LUN and any previous configuration on it is lost.
6. Step 4: Create the Grid Disks (the “Partitions”)
A grid disk is a slice of a cell disk that is handed to ASM. You decide how much space each disk group gets by choosing the grid disk sizes. Look at the space available first:
Case A: new system or lab (you choose the sizes)
Create the DATA grid disks first with an explicit size, then the RECO grid disks. If you leave out size, the grid disk uses all the remaining free space of the cell disk.
CellCLI> create griddisk all harddisk prefix=RECOC1, cachingpolicy=’none’
Case B: adding a new cell to existing disk groups (sizes must match)
Every disk in a disk group must be the same size, so copy the size and caching policy from a cell that is already in the disk group. Run this on an existing cell:
CellCLI> list griddisk attributes name,size,cachingPolicy where name like ‘RECOC1.*’
Then, on the new cell, create the grid disks with exactly those values, starting with the first disk group:
CellCLI> create griddisk all harddisk prefix=RECOC1, size=<exact_size_from_existing_cell>, cachingpolicy=’none’
WARNING: Always type the exact size, including the unit (G or T). A different size on the new cell causes uneven disks in the disk group.
Verify:
Example output (your names and sizes will differ):
GridDisk DATAC1_CD_01_cell01 successfully created
…
DATAC1_CD_00_cell01 CD_00_cell01 <size> active UNUSED
Result: the grid disks are named <prefix>_<cell disk name> (for example DATAC1_CD_00_cell01), with status = active and asmModeStatus = UNUSED. UNUSED is correct: ASM is not using them yet.
Optional: use availableTo='+asm,<db_name>' on create griddisk to restrict which ASM and database clients may use a grid disk (ASM-scoped or database-scoped security).
7. Step 5: Make the Cell Visible to the Database Servers
This step is needed only when you add a new storage server. The database servers find storage cells through the file /etc/oracle/cell/network-config/cellip.ora. Add the new cell’s IP address(es) to it on every database server. The file must be identical on all of them.
[root@db01 ~]# cp cellip.ora cellip.ora.orig
[root@db01 ~]# cp cellip.ora cellip.ora-bak
# edit cellip.ora-bak and add one line for the new cell, for example:
cell=”<cell_ip1>;<cell_ip2>”
# copy the edited file to all database servers
[root@db01 ~]# dcli -g database_nodes -l root -f cellip.ora-bak -d /etc/oracle/cell/network-config/cellip.ora
Check the ASM discovery string (ASM instance):
# on Exadata this is normally o/*/* (all grid disks on all cells in cellip.ora)
Note: a cell with two network ports (for example InfiniBand or RoCE) is listed with both IP addresses separated by a semicolon. Grid disk paths then look like o/<ip1>;<ip2>/<griddisk>. If you changed asm_diskstring to a narrower pattern, make sure it also matches your new prefixes.
8. Step 6: See the Grid Disks as ASM Disks
ASM discovers every grid disk as an ASM disk with the path o/<cell_ip>/<griddisk_name>. Disks that are not yet in any disk group have header_status = CANDIDATE. Run this in the ASM instance (as SYSASM):
from v$asm_disk
where path like ‘o/%’
and header_status = ‘CANDIDATE’
order by path;
Result: you see all the new grid disks (for example o/<cell_ip>/DATAC1_CD_00_cell01) as CANDIDATE. If you see none, go to the Troubleshooting section.
9. Step 7: Add the Disks to an ASM Disk Group
Option A: create a new disk group
Use this on a new system or in a lab. Normal redundancy mirrors data across storage cells, so you need at least 2 cells (3 are recommended).
failgroup cell01 disk ‘o/<cell01_ip>/DATAC1_*’
failgroup cell02 disk ‘o/<cell02_ip>/DATAC1_*’
failgroup cell03 disk ‘o/<cell03_ip>/DATAC1_*’
attribute ‘compatible.asm’ = ‘19.0.0.0.0’,
‘compatible.rdbms’ = ‘19.0.0.0.0’,
‘au_size’ = ‘4M’,
‘cell.smart_scan_capable’ = ‘TRUE’;
Note: set compatible.asm and compatible.rdbms to match your Grid Infrastructure and database versions. Each cell is one failure group, so ASM can lose a whole cell and still keep a copy of the data. A shorter form such as disk 'o/*/DATAC1_*' also works.
Option B: add the new disks to an existing disk group
Use this when you added a new cell. Add the disks of the new cell only, and set the rebalance power. Run the commands from different ASM instances so the rebalances can run in parallel.
SQL> alter diskgroup RECOC1 add disk ‘o/<new_cell_ip>/RECOC1_*’ rebalance power 4;
Watch the rebalance:
from gv$asm_operation;
# repeat until no rows are returned
ASM now moves some data onto the new disks. When the rebalance finishes, the new disks are fully part of the disk group.
WARNING: Add the disks of only the new cell, and use the exact prefix for each disk group. A pattern such as o/*/* in ADD DISK can match disks you did not mean to touch.
10. Step 8: Verify End to End
On the storage server:
Result: asmModeStatus = ONLINE, and the disk group, ASM disk name and failure group are filled in.
In the ASM instance:
from v$asm_diskgroup g, v$asm_disk d
where g.group_number = d.group_number
and d.path like ‘o/%’
order by g.name, d.failgroup, d.name;SQL> select name, state, type, total_mb, free_mb from v$asm_diskgroup;
Result: all new disks are ONLINE and NORMAL, grouped under the new cell’s failure group, and the disk group is MOUNTED.
11. Undo: Remove Everything in Reverse Order
WARNING: This destroys data. Use it only for a lab or for a cell you are removing, and only after the data has been moved away.
Work from the top layer down, the reverse of how you built it.
# or, for a lab disk group you no longer need:
SQL> drop diskgroup DATAC1 including contents;# wait until gv$asm_operation shows no rows, then on the storage server:
CellCLI> drop griddisk all prefix=DATAC1
CellCLI> drop griddisk all prefix=RECOC1
CellCLI> drop celldisk all
# (drop flashcache and flashlog first if you created them)
Note: a cell disk can be dropped only after all of its grid disks are dropped. Grid disks that are still used by ASM must first be dropped from the disk group.
12. Troubleshooting
| Symptom | What to Check |
|---|---|
No CANDIDATE disks in v$asm_disk | The new cell’s IP is missing from cellip.ora on one or more database servers. asm_diskstring does not match. The grid disks are not active. The cell services are not running. |
Grid disk is not UNUSED after creation | It is already used by ASM, or a previous configuration is still there. Check asmDiskGroupName in list griddisk detail. |
| Disk sizes differ inside a disk group | The grid disks were created with a different size from the existing cells. Drop and re-create them with the exact size (Step 4, Case B). |
| Rebalance is slow | Check gv$asm_operation for the estimated time. A higher power speeds it up but uses more I/O. Never start a second cell change until it finishes. |
| Disks not visible to some database servers only | cellip.ora differs between database servers. Copy the same file to all of them with dcli. |
create celldisk all creates nothing | A LUN is missing or already has a cell disk. Check list lun and list celldisk. |
13. Quick Cheatsheet
| Layer | Create | Verify | Remove |
|---|---|---|---|
| Physical Disk | (hardware) | list physicaldisk | (hardware) |
| LUN | (automatic) | list lun | (automatic) |
| Cell Disk | create celldisk all | list celldisk | drop celldisk all |
| Grid Disk | create griddisk all harddisk prefix=P, size=S | list griddisk | drop griddisk all prefix=P |
| ASM Disk | (discovered by ASM) | v$asm_disk | (follows the disk group) |
| ASM Disk Group | create diskgroup / alter diskgroup ... add disk | v$asm_diskgroup, gv$asm_operation | alter diskgroup ... drop disk / drop diskgroup |