mdadm (RAID) 78
mdadm is the Linux tool for software RAID (md) arrays, and these rows follow the manual of mdadm 4.6. The table covers status checks and scrubbing, creating, assembling and stopping arrays, replacing failed disks, growing and reshaping, monitoring and alerts, and the mdadm.conf file.
Checking status 7
| Command | What it does |
|---|---|
cat /proc/mdstat | Show all active arraysLists every running array with its level and members, plus a progress bar and finish estimate during recovery. |
mdadm --detail DEVICE | Show details of one arrayNeeds an active array; adding --brief or --scan shortens the output to a form fit for mdadm.conf. |
mdadm --query /dev/name-of-device | Identify an md deviceSays whether the given device is an active array, a member of one, or neither, with a short summary. |
mdadm --examine DEVICE | Read a member's superblockUse it on a component disk or partition; --detail is the view of a whole running array. |
mdadm --examine --brief --scan --config=partitions | Scan all partitions for arraysTakes its device list from /proc/partitions and prints one short line per array it can identify. |
mdadm -Ebsc partitions | Partition scan, short optionsThe same scan as the long form, with -E, -b, -s and -c bundled into one argument. |
mdadm --detail-platform | Show platform RAID supportReports the RAID capabilities of the firmware and controllers; with no argument every controller is scanned. |
Scrubbing and checks 5
md(4) of the same release: check leaves discrepancies uncorrected and stores their count in md/mismatch_count, repair corrects them, idle stops the pass.
| Command | What it does |
|---|---|
mdadm --detail --test DEVICE | Report health as exit statusExit code 0 means healthy, 1 at least one failed member, 2 unusable, 4 no information could be read. |
echo check > /sys/block/mdX/md/sync_action | Start a consistency checkA sysfs write rather than an mdadm command; it reads every block and counts discrepancies without correcting them. |
echo repair > /sys/block/mdX/md/sync_action | Check and repair mismatchesRuns the same pass as check but rewrites any inconsistent blocks it finds. |
--action= | Start or abort a scrubmdadm's own way to set sync_action to idle, frozen, check or repair; idle aborts what is running. |
mdadm --wait DEVICE | Wait for resync to finishBlocks until resync, recovery or reshape is done; success only when it actually waited on every listed array. |
Creating arrays 5
| Command | What it does |
|---|---|
mdadm --create /dev/md0 --level=1 --raid-devices=2 /dev/hd[ac]1 | Create a two-disk mirrorThe manual's RAID1 example; the new mirror starts with an initial resync of its members. |
mdadm --create DEVICE --chunk=X --level=Y --raid-devices=Z DEVICES | Create an array, general formMembers come last; the word missing in place of a device name creates the array degraded. |
mdadm --create /dev/md/ddf --metadata=ddf --raid-disks 6 /dev/sd[a-f] | Create a DDF containerSets up a container of six disks; RAID volumes are then created inside it. |
mdadm --create /dev/md/home -n3 -l5 -z 30000000 /dev/md/ddf | Create RAID5 inside a containerShort forms of --raid-devices, --level and --size; -z counts kilobytes, here about 30 GB per device. |
--zero-superblock | Erase md metadata from a diskWith --force it also wipes a superblock that looks invalid; on clustered arrays make sure no other node uses the array. |
Create options 10
| Command | What it does |
|---|---|
--level= | Set the RAID levelShort form -l; takes names or numbers, for example raid1 or 1, raid5 or 5, raid10 or 10. |
--raid-devices= | Set the number of active membersShort form -n; active plus spare devices must equal the devices listed, with missing counted. |
--spare-devices= | Add hot spares at creationShort form -x; the spare count can also be changed later by adding or removing devices. |
--chunk= | Set the chunk sizeIn kilobytes, 512 by default for new arrays; it matters only for RAID 0, 4, 5, 6 and 10. |
--metadata= | Choose the superblock formatShort form -e; --create uses 1.2 by default, other modes detect the format already present. |
--bitmap= | Choose write-intent bitmap storageShort form -b; internal stores it with the metadata on every member, none leaves the array without one. |
--name= | Name the arrayShort form -N, up to 32 characters; without it the basename of the new device is used. |
--size= | Limit the space used per driveShort form -z, in kilobytes unless K, M, G or T is added; a slightly smaller size leaves room for smaller replacement disks. |
--assume-clean | Skip the initial resyncDeclares the members already in sync; the manual discourages it except for recovery or zero-filled disks. |
--run | Create without askingShort form -R; suppresses the confirmation mdadm asks for when a member looks used by another array or filesystem. |
Assembling and stopping 14
| Command | What it does |
|---|---|
mdadm --assemble --scan | Assemble all known arraysArrays listed in mdadm.conf come first; with none listed, it assembles whatever arrays it finds on the devices. |
mdadm -A /dev/md/ddf1 /dev/sd[a-f] | Assemble from named disksThe first device is the array to start, the rest are searched for its members. |
mdadm --stop --scan | Stop all unused arraysArrays that are still mounted or otherwise busy keep running; the manual places it in shutdown scripts. |
mdadm --stop DEVICE | Stop one arrayReleases the array and its member disks; it fails while the array is mounted or in use. |
mdadm --readonly DEVICE | Make an array read-onlyAllowed only while nothing uses the array; no writes, resync or recovery happen until it is switched back. |
mdadm --readwrite DEVICE | Make an array writable againReverses --readonly, so the array accepts writes again. |
--uuid= | Assemble by array UUIDShort form -u; candidate devices whose superblock carries another UUID are ignored. |
--force | Assemble despite stale metadataMarks members recorded as failed as working so the array can start; the result may hold corrupt data. |
--run | Start a degraded arrayShort form -R; otherwise an array missing expected drives is assembled but left stopped unless --scan is used. |
--no-degraded | Refuse to start degradedOnly needed with --scan; useful when the connections to the disks are not fully reliable. |
mdadm -IRs | Start incrementally assembled arraysRun once device discovery is finished; arrays start read-auto and stay read-only until the first write. |
mdadm -Iq /dev/somedevice | Add a found device incrementallyFor device discovery: the disk joins its array, which starts once all expected members are present; -q prints only errors. |
mdadm --incremental --rebuild-map --run --scan | Rebuild the array mapRegenerates /run/mdadm/map from the running arrays and then starts every array able to run. |
mdadm -I /dev/md/ddf1 | Start arrays in a containerGiven an assembled container device, it starts every array its metadata describes. |
Replacing disks 10
In manage mode the array is named first, and each operation applies to the devices listed after it until the next operation.
| Command | What it does |
|---|---|
mdadm /dev/md0 --fail /dev/sdb1 | Mark a member faultyThe array comes first; an active member must be failed before it can be removed. |
mdadm /dev/md0 --remove /dev/sdb1 | Remove a failed memberWorks only on spares and failed devices, never on an active member. |
mdadm /dev/md0 --add /dev/sda1 | Add a disk to an arrayA recent former member is re-added; any other disk becomes a spare, and a degraded array starts rebuilding at once. |
mdadm /dev/md0 --add /dev/sda1 --fail /dev/sdb1 --remove /dev/sdb1 | Swap members in one commandEach operation covers the devices after it up to the next operation; only one array per command. |
mdadm /dev/md0 -f /dev/hda1 -r /dev/hda1 -a /dev/hda1 | Fail, remove and re-add a diskShort forms of --fail, --remove and --add; the partition ends up back in the array as a spare. |
mdadm /dev/md4 --fail detached --remove detached | Drop disconnected membersdetached matches every member whose device has disappeared from the system. |
--re-add | Re-add a removed memberReturns it to its old slot; with a write-intent bitmap only blocks changed meanwhile are recovered. |
--add-spare | Add strictly as a spareUnlike --add it never tries a re-add first, even for a recent member. |
--replace | Replace a member while onlineThe marked disk keeps serving until a spare has been rebuilt in its place, then it is marked faulty. |
--with | Choose the replacement spareFollows a --replace list; the devices named must already be spares in the array. |
Growing and reshaping 6
| Command | What it does |
|---|---|
mdadm --grow /dev/md4 --level=6 --backup-file=/root/backup-md4 | Convert RAID5 to RAID6Have a spare in the array first, as the RAID6 layout uses an extra drive; the backup file belongs on another device. |
--raid-devices= | Change the member countShort form -n with --grow; a RAID 4, 5 or 6 reshape may need --backup-file on another device. |
--size= | Use the space of larger disksWith --grow, after all members were swapped for bigger ones; the value max takes as much as possible. |
--grow --bitmap=internal | Add an internal bitmapSpace for it is reserved at create time; a re-added member then only needs the blocks changed meanwhile. |
--backup-file= | Store reshape backup dataRequired to add devices to RAID5 or RAID6 without a spare, or to shrink or change level or layout. |
--array-size= | Change the visible sizeShort form -Z; not kept across a restart, and used to shrink the size before reducing the device count. |
Monitoring 8
Monitoring needs at least one destination for alerts: a mail address, a program or --syslog.
| Command | What it does |
|---|---|
mdadm --monitor --scan --daemonise > /run/mdadm/mon.pid | Monitor all arrays in backgroundRuns only if mdadm.conf names somewhere to send alerts; the daemon's process ID is written to the file. |
mdadm --follow --scan --delay=120 | Poll arrays every two minutes--follow is another name for --monitor; it runs only when the config file names a mail address or program. |
mdadm --monitor --scan -1 | Check once for degraded arraysReports DegradedArray and SparesMissing events once and exits; the manual suggests running it from cron. |
--mail | Send alerts to an addressShort form -m; the MAILADDR line in mdadm.conf sets the same address permanently. |
--program | Run a program on eventsAlso --alert or -p; the PROGRAM line in mdadm.conf is the config-file equivalent. |
--syslog | Report events to syslogShort form -y; messages use the daemon facility with priorities that vary by event. |
--delay | Set the polling intervalSeconds between polls, 60 by default; MONITORDELAY sets it in mdadm.conf. |
--test | Send a test alert per arrayUse it once to confirm that alert mail and the alert program really receive messages. |
Configuration file 4
With --detail or --stop, --scan takes its arrays from /proc/mdstat; in the other modes it reads the config file.
| Command | What it does |
|---|---|
mdadm --detail --scan >> mdadm.conf | Save running arrays to the configReview the result before use; the default config file is /etc/mdadm.conf or /etc/mdadm/mdadm.conf. |
mdadm --examine --scan --config=mdadm.conf >> mdadm.conf | Record arrays found on disksUses the DEVICE line written just before it to look for assemblable arrays; edit the result before relying on it. |
--config= | Use another config fileShort form -c; the word partitions makes mdadm scan /proc/partitions, none acts as an empty file. |
--scan | Fill in missing detailsShort form -s; with --detail or --stop it takes the list of arrays from /proc/mdstat instead. |
Help and output 9
| Command | What it does |
|---|---|
mdadm --help | Show general helpThe overview of all modes, with the usage line of each. |
mdadm --create --help | Show help for one modeWorks after any mode option, such as --assemble or --grow, and lists the options valid there. |
mdadm --config --help | Explain the config fileSummarises the mdadm.conf keywords; mdadm.conf(5) holds the full description. |
mdadm --help-options | Explain option parsingCovers how device names are recognised on the command line and lists the most common options. |
--version | Print the mdadm version |
--verbose | More detailed outputShort form -v; give it twice for extra detail in --detail --scan and --examine --scan. |
--brief | Shorter outputShort form -b, used with --detail and --examine; together with --verbose it gives a middle level. |
--quiet | Only report what mattersShort form -q; purely informative messages are left out. |
--export | Print key=value pairsShort form -Y; works with --detail, --detail-platform, --examine and --incremental, ready to import into the environment. |
Reading the state of an array
cat /proc/mdstat is the quickest view: every running array with its level and members, failed members flagged with (F), and a progress line with a finish estimate while a recovery runs. mdadm --detail DEVICE reports on one active array, while mdadm --examine DEVICE reads the superblock stored on a member disk; the manual draws the line there, components for --examine and whole running arrays for --detail. In scripts, mdadm --detail --test DEVICE turns the state into an exit status. echo check > /sys/block/mdX/md/sync_action starts a scrub through sysfs. The /proc/mdstat and sysfs rows are quoted from the Linux RAID wiki on kernel.org, which mdadm(8) links to and which is now archived.
Replacing a disk
Manage mode names the array first and the member devices after each operation. mdadm /dev/md0 --fail /dev/sdb1 marks a member faulty, mdadm /dev/md0 --remove /dev/sdb1 takes it out (only failed members and spares can be removed), and mdadm /dev/md0 --add /dev/sda1 adds the new disk; on a degraded array the rebuild onto it starts at once. --replace avoids running degraded: the old disk keeps serving until a spare has been rebuilt in its place, and --with picks that spare. A disk that has already vanished is handled with mdadm /dev/md4 --fail detached --remove detached.
Creating, recording and assembling
mdadm --create /dev/md0 --level=1 --raid-devices=2 /dev/hd[ac]1 is the manual's mirror example; new arrays get version 1.2 metadata and, for the levels that use one, a 512 KB chunk. mdadm --detail --scan >> mdadm.conf writes config lines for the running arrays into a file to review before it becomes /etc/mdadm.conf or /etc/mdadm/mdadm.conf. mdadm --assemble --scan, the command for a startup file, assembles the arrays listed there; with none listed it searches the devices, and arrays that do not obviously belong to this host get non-conflicting names and start read-auto. mdadm --stop DEVICE stops one array once nothing uses it. Level changes such as mdadm --grow /dev/md4 --level=6 --backup-file=/root/backup-md4 need a backup file on a separate device, as do shrinks and layout changes.
Why does mdadm refuse to remove a disk from the array?
Only spares and failed devices can be removed. Mark the member faulty first with mdadm /dev/md0 --fail /dev/sdb1, then remove it with mdadm /dev/md0 --remove /dev/sdb1. For a disk that has already disappeared from the system, the word detached stands in for its name: mdadm /dev/md4 --fail detached --remove detached.
What is the difference between mdadm --detail and mdadm --examine?
--detail reports on a whole array that is currently active; --examine prints the metadata stored on one component device. Run mdadm --examine DEVICE on a member disk or partition and mdadm --detail DEVICE on the md device itself.
How do I get an email when an array degrades?
Put a MAILADDR line in mdadm.conf (or pass --mail) and run mdadm --monitor --scan --daemonise > /run/mdadm/mon.pid. Adding --test sends a TestMessage for every array at startup, which shows whether mail gets through; mdadm --monitor --scan -1 checks once and suits a cron job.
How do I scrub an md array for inconsistencies?
Write check to the array's sync_action file with echo check > /sys/block/mdX/md/sync_action, or use mdadm's --action= option. check only counts discrepancies, in md/mismatch_count; echo repair > /sys/block/mdX/md/sync_action also corrects them, and idle stops the pass.
Source: mdadm(8) manual page of mdadm 4.6 — mdadm.8.in at release tag mdadm-4.6, md-raid-utilities/mdadm repository. Checked row by row on .
4 more source pages
- mdadm 4.6 source — ReadMe.c, the text of mdadm --help and the mode help screens (tag mdadm-4.6)
- md(4) manual page shipped with mdadm 4.6 — md.4 at release tag mdadm-4.6
- Linux RAID wiki on kernel.org (archived; linked from the SEE ALSO section of mdadm(8)) — /proc/mdstat
- Linux RAID wiki on kernel.org (archived; linked from the SEE ALSO section of mdadm(8)) — RAID Administration
Ceph 100
Ceph is administered with the ceph tool alongside rados, rbd and cephadm, here following the Ceph v20.2.4 (Tentacle) documentation. The table covers health and status, OSD maintenance and deployment, pools and placement groups, users and keys, central configuration, hosts, services and upgrades through the orchestrator, RBD images and snapshots, RADOS objects and CephFS volumes.
Cluster status and health 9
Typing ceph with no arguments opens an interactive ceph> prompt, where status on its own gives the same report.
| Command | What it does |
|---|---|
ceph status | Cluster statusPrints the cluster ID, overall health and each service with its daemon count and monitor quorum. |
ceph -s | Status, short optionGives the same report as ceph status through the -s (--status) option of the tool. |
ceph -w | Watch eventsShows the status, then follows the cluster log and prints each new entry as it arrives. |
ceph health | Check cluster healthPrints the short form of the health report, a single line such as HEALTH_WARN. |
ceph health detail | Health detailThe long form: every active alert with the affected daemons, for example which OSDs are down. |
ceph health mute OSD_DOWN 4h | Mute an alert for a timeSilences one health check code; with a duration such as 4h the mute expires on its own. |
ceph df | Disk usageShows raw capacity and how stored data is spread across pools, like the Linux df tool. |
ceph mon stat | Monitor statusDisplays the monitor map; with several monitors, confirm quorum before reading or writing data. |
ceph quorum_status | Monitor quorum statusReturns JSON with the election epoch, the monitors in quorum and the current leader. |
OSD state and maintenance 10
| Command | What it does |
|---|---|
ceph osd stat | Count OSDs up and inOne line: total OSDs, how many are up, how many are in, and the map epoch. |
ceph osd tree | OSD treeLists OSDs under their hosts in CRUSH map order, with weight and up or down state. |
ceph osd tree down | List down OSDsLimits the tree to OSDs that are down, an alternative to reading health detail. |
ceph osd df | OSD usageShows data utilisation per OSD, to spot one approaching the nearfull or full ratio. |
ceph osd out OSD-NUM | Mark OSD outCeph then starts rebalancing, moving the OSD's data onto the remaining OSDs. |
ceph osd in OSD-NUM | Mark OSD inPuts an OSD that was marked out back into data placement. |
ceph osd set noout | Set the noout flagKeeps CRUSH from rebalancing while OSDs are stopped for maintenance. |
ceph osd unset noout | Clear the noout flagRestores normal rebalancing after the maintenance window. |
ceph osd ok-to-stop ID | Check OSDs can stopReturns success only if stopping those OSDs keeps all data readable and writeable. |
ceph osd purge ID --yes-i-really-mean-it | Purge an OSDOne command that deletes the OSD's auth key and drops it from the CRUSH and OSD maps. |
Deploying and removing OSDs 6
| Command | What it does |
|---|---|
ceph orch device ls | List storage devicesShows each host's disks with type, size and whether they are available for an OSD. |
ceph orch apply osd --all-available-devices | Use every free diskCreates OSDs on all unused devices, and drives added later are consumed automatically. |
ceph orch daemon add osd host1:/dev/sdb | Add an OSD on one deviceCreates a single OSD from the named device on the named host. |
ceph orch osd rm OSD_ID | Remove an OSDEvacuates the placement groups first, then removes the emptied OSD from the cluster. |
ceph orch osd rm status | OSD removal progressShows where each OSD queued for removal stands while it drains. |
ceph orch device zap HOSTNAME PATH | Zap a deviceWipes the disk through ceph-volume on its host so a new OSD can use it. |
Pools 11
| Command | What it does |
|---|---|
ceph osd pool ls | List pool namesPrints only the names, which is handy in scripts. |
ceph osd pool ls detail | Pool detailsAdds replica size, min_size, CRUSH rule, PG count and autoscale mode for each pool. |
rados lspools | List poolsThe same pool list from the rados utility instead of the ceph tool. |
ceph osd pool create POOL-NAME | Create poolLeave out pg_num and the PG autoscaler sets it from the amount of data stored. |
ceph osd pool application enable POOL-NAME APPLICATION-NAME | Tag a pool for an applicationFor custom uses; pools meant for RBD are initialised with rbd pool init instead. |
ceph osd pool set POOLNAME size NUM-REPLICAS | Set replica countThe count includes the primary copy, so 3 keeps three instances of every object. |
ceph osd pool set-quota data max_objects 10000 | Cap objects in a poolLimits pool data to 10,000 objects; max_bytes caps its size instead, or both can be set. |
ceph osd pool delete POOL-NAME POOL-NAME --yes-i-really-really-mean-it | Delete a poolMonitors refuse it unless mon_allow_pool_delete is true in central configuration. |
ceph osd pool stats | Pool I/O statisticsCovers every pool; add a pool name to see a single one. |
rados df | Pool utilisationReports usage in bytes and object counts for the whole cluster and per pool. |
ceph osd pool autoscale-status | PG autoscaler statusLists each pool's share of the cluster and any PG count change the autoscaler would make. |
Placement groups 8
| Command | What it does |
|---|---|
ceph pg stat | PG statusCounts PGs by state; in a healthy cluster they are all active and clean. |
ceph pg dump | Dump all PGsLists every placement group; with -o and --format=json the dump is saved to a file as JSON. |
ceph pg dump_stuck | List stuck PGsAdd unclean, inactive, stale, undersized or degraded to narrow it to one state. |
ceph pg map PG-ID | Show a PG's mapPrints the up and acting OSD sets for that PG. |
ceph pg PG-ID query | Query one PGReturns detailed statistics for a single placement group. |
ceph tell PG-ID scrub | Scrub a PG nowA shallow scrub that compares object metadata across the primary and replicas. |
ceph tell PG-ID deep-scrub | Deep-scrub a PG nowCompares object contents as well as metadata across all copies of the PG. |
ceph pg repair PGID | Repair a PG |
Users and keys 5
| Command | What it does |
|---|---|
ceph auth ls | List auth keysShows every cephx user with its key and capabilities. |
ceph auth get TYPE.ID | Show one userPrints that user's key and capabilities in keyring format. |
ceph auth get-or-create client.paul mon 'allow r' osd 'allow rw pool=liverpool' | Create a user with capsGives client.paul monitor read and read-write on one pool, or returns its key if it exists. |
ceph auth caps client.john mon 'allow r' osd 'allow rw pool=liverpool' | Change user capabilitiesThe new caps replace the old ones, so repeat any existing capability you want to keep. |
ceph auth del ENTITY | Delete a userRemoves the user together with all of its capabilities. |
Configuration and manager modules 7
Values set with ceph tell or ceph daemon are overrides for the running daemon only; ceph config set makes them permanent.
| Command | What it does |
|---|---|
ceph config dump | Dump central configLists every option stored in the monitors' central configuration database. |
ceph config get WHO OPTION | Read a config optionShows the stored value for one entity; leave out the option to see all of them. |
ceph config set WHO OPTION VALUE | Set a config optionStores the value centrally for global, a daemon type such as osd, or a single daemon. |
ceph config show WHO | Show running configReports the values a running daemon actually uses, which can differ from config get. |
ceph tell osd.* config set debug_osd 20 | Change a setting at runtimeApplies to every running OSD at once and is lost when the daemon restarts. |
ceph mgr module ls | List manager modulesShows which manager plugins are currently switched on. |
ceph mgr module enable MODULE | Enable a manager moduleModule names come from the MgrMap, which ceph mgr dump prints. |
Bootstrap and hosts 10
cephadm hosts need no Ceph packages installed; cephadm shell provides the ceph command in a container.
| Command | What it does |
|---|---|
cephadm bootstrap --mon-ip MON-IP | Bootstrap a new clusterCreates the first monitor and manager on this host and writes ceph.conf and the admin keyring. |
cephadm shell | Open a Ceph shellStarts bash in a container with all Ceph packages, using the config and keyring from /etc/ceph. |
cephadm ls | List daemons on this hostCovers only the local host, whereas the orchestrator lists daemons cluster-wide. |
ceph orch host ls | List hostsShows the hosts the orchestrator manages together with their labels. |
ceph orch host add NEWHOST IP | Add a hostJoins a new node to the cluster; labels can follow the address. |
ceph orch host label add HOST _admin | Give a host the admin labelHosts labelled _admin get a managed copy of ceph.conf and the client.admin keyring. |
ceph orch host drain HOST | Drain a hostSchedules removal of all daemons on the host and applies the _no_schedule label. |
ceph orch host rm HOST | Remove a hostRun it once draining has removed every daemon from the host. |
ceph orch host maintenance enter HOSTNAME | Enter maintenance modeStops all Ceph daemons on that host; --force skips warnings but not alerts. |
ceph orch host maintenance exit HOSTNAME | Exit maintenance modeEnds maintenance mode; --force with --offline is meant for hosts that are permanently offline. |
Services and upgrades 10
| Command | What it does |
|---|---|
ceph orch status | Orchestrator statusReports the orchestrator backend and whether it is available and operational. |
ceph orch ls | List servicesLists services known to the orchestrator; filter by type or name with the options. |
ceph orch ps | List daemonsEvery daemon the orchestrator knows, filterable by host, daemon type or service. |
ceph orch apply -i myservice.yaml | Apply a service specDeploys or updates services from a YAML spec; add --dry-run to preview the result. |
ceph orch restart SERVICE_NAME | Restart a serviceThe same form also takes start, stop, redeploy and reconfig. |
ceph orch rm SERVICE-NAME | Remove a serviceDeletes the service together with all of its daemons. |
ceph orch upgrade start --ceph-version VERSION | Start an upgradeCheck that all hosts are online and the cluster is healthy with ceph -s first. |
ceph orch upgrade status | Upgrade statusTells whether an upgrade is running and which version it is heading for. |
ceph -W cephadm | Watch the cephadm logFollows the cephadm channel of the cluster log, useful while an upgrade runs. |
ceph orch upgrade stop | Stop an upgrade |
RBD images 9
| Command | What it does |
|---|---|
rbd pool init POOL-NAME | Initialise an RBD poolPrepares a newly created pool to hold block device images. |
rbd create mypool/myimage --size 102400 | Create an imageMakes a 100 GB image; a bare --size value is read as megabytes. |
rbd ls POOLNAME | List images in a poolWithout a pool name the command lists images in the pool called rbd. |
rbd info IMAGE-NAME | Image detailsWrite pool/image to look at an image outside the default pool. |
rbd resize --size 2048 foo | Grow an imageImages are thin provisioned, so this changes the maximum capacity, not used space. |
rbd rm IMAGE-NAME | Remove an imageDeletes at once; moving it to the trash instead keeps it recoverable. |
rbd trash mv swimmingpool/bar | Move an image to trashThe image stays restorable by its ID until the trash entry is removed. |
sudo rbd device map rbd/myimage --id admin | Map an imageExposes the image as a local block device through the kernel RBD module. |
rbd device unmap /dev/rbd0 | Unmap a deviceDetaches a mapped image from this host. |
RBD snapshots and clones 5
| Command | What it does |
|---|---|
rbd snap create rbd/foo@snapname | Create a snapshotThe snapshot name follows @ after the pool and image. |
rbd snap ls rbd/foo | List snapshotsShows the snapshots of one image. |
rbd snap rollback rbd/foo@snapname | Roll back to a snapshotOverwrites the image with the snapshot data; cloning is faster for large images. |
rbd snap protect rbd/foo@snapname | Protect a snapshotRequired before cloning, so a clone can never lose its parent snapshot. |
rbd clone rbd/foo@snapname rbd/bar | Clone a snapshotCreates image bar as a child of the protected snapshot of foo. |
RADOS objects 5
| Command | What it does |
|---|---|
rados -p foo ls - | List objects in a poolThe trailing dash sends the list to standard output instead of a file. |
rados -p foo put myobject blah.txt | Store an objectWrites the contents of blah.txt as object myobject in pool foo. |
rados -p foo rm myobject | Delete an object |
ceph osd map POOL-NAME OBJECT-NAME | Locate an objectShows which placement group and OSDs hold the named object. |
rados list-inconsistent-obj 0.6 --format=json-pretty | List inconsistent objectsReports objects that scrubbing found inconsistent in PG 0.6, as indented JSON. |
CephFS volumes 5
| Command | What it does |
|---|---|
ceph fs volume create VOL_NAME | Create a CephFS volumeCreates the file system and its pools, and can deploy MDS daemons through the orchestrator. |
ceph fs volume ls | List volumes |
ceph fs subvolume create VOL_NAME SUBVOL_NAME | Create a subvolumeOptions set a size quota, a group, a data pool layout, owner and mode. |
ceph fs subvolume getpath VOL_NAME SUBVOL_NAME | Get a subvolume pathPrints the absolute path of the subvolume inside the file system. |
ceph mds stat | MDS status |
Status and health
ceph status (or ceph -s) is the first look: cluster ID, health, monitor quorum and the daemons of each service. When it reports HEALTH_WARN or HEALTH_ERR, ceph health detail names every active alert and what is behind it, for example which OSDs are down. ceph -w prints the status and then keeps following the cluster log. With several monitors, check that they form a quorum: ceph quorum_status names the monitors in quorum and the leader, and ceph mon stat shows the monitor map.
Capacity and placement
ceph df shows raw capacity and usage per pool, and ceph osd df shows how full each OSD is. That matters because one OSD above the full ratio (95% by default) stops clients from writing. ceph osd tree shows the CRUSH hierarchy with each OSD's up or down state, ceph pg stat summarises placement group states, and ceph pg dump_stuck lists the ones stuck in a state such as unclean or inactive. ceph osd pool ls detail shows each pool's replica size, PG count and autoscale mode, rados lspools lists pools, and ceph osd pool create POOL-NAME makes a new one.
OSDs in and out
ceph osd out OSD-NUM takes an OSD out of data placement so that Ceph rebalances and copies its data to other OSDs, the first step in removing one, and ceph osd in OSD-NUM reverses it. For maintenance where the OSDs come back, ceph osd set noout keeps CRUSH from rebalancing while they are stopped; clear it with ceph osd unset noout. On a cephadm cluster, ceph orch osd rm OSD_ID evacuates and removes an OSD in one command. ceph auth ls lists every cephx user with its key and capabilities.
Which command shows why a Ceph cluster is in HEALTH_WARN?
ceph health detail. It lists each active health alert with the daemons or placement groups involved; ceph health alone prints only the one-line summary.
How do I stop Ceph from rebalancing while I restart an OSD host?
Run ceph osd set noout before stopping the OSDs and run ceph osd unset noout afterwards. On a cephadm cluster, ceph orch host maintenance enter HOSTNAME stops all Ceph daemons on the host and ceph orch host maintenance exit HOSTNAME takes it out of maintenance again.
Why does Ceph refuse to delete a pool?
The monitors only delete pools when the mon_allow_pool_delete option is true in central configuration, and the command needs the pool name twice plus the confirmation flag: ceph osd pool delete POOL-NAME POOL-NAME --yes-i-really-really-mean-it.
What is the difference between ceph config get and ceph config show?
ceph config get WHO OPTION reads what is stored in the central configuration; ceph config show WHO reports what the running daemon actually uses, which can differ. A change made with ceph tell osd.* config set debug_osd 20 is a runtime override that is lost when the daemon restarts, so persist permanent changes with ceph config set WHO OPTION VALUE.
Source: ceph(8) manual page, Ceph v20.2.4 (Tentacle) documentation (doc/man/8/ceph.rst). Checked row by row on .
21 more source pages
- rados(8) manual page, Ceph v20.2.4 (Tentacle) documentation (doc/man/8/rados.rst)
- rbd(8) manual page, Ceph v20.2.4 (Tentacle) documentation (doc/man/8/rbd.rst)
- cephadm(8) manual page, Ceph v20.2.4 (Tentacle) documentation (doc/man/8/cephadm.rst)
- Monitoring a Cluster, Ceph v20.2.4 (Tentacle) documentation (doc/rados/operations/monitoring.rst)
- Pools, Ceph v20.2.4 (Tentacle) documentation (doc/rados/operations/pools.rst)
- cephadm: OSD Service, Ceph v20.2.4 (Tentacle) documentation (doc/cephadm/services/osd.rst)
- Monitoring OSDs and PGs, Ceph v20.2.4 (Tentacle) documentation (doc/rados/operations/monitoring-osd-pg.rst)
- Adding/Removing OSDs, Ceph v20.2.4 (Tentacle) documentation (doc/rados/operations/add-or-rm-osds.rst)
- User Management, Ceph v20.2.4 (Tentacle) documentation (doc/rados/operations/user-management.rst)
- cephadm: Service Management, Ceph v20.2.4 (Tentacle) documentation (doc/cephadm/services/index.rst)
- cephadm: Host Management, Ceph v20.2.4 (Tentacle) documentation (doc/cephadm/host-management.rst)
- Basic Block Device Commands, Ceph v20.2.4 (Tentacle) documentation (doc/rbd/rados-rbd-cmds.rst)
- Kernel Module Operations, Ceph v20.2.4 (Tentacle) documentation (doc/rbd/rbd-ko.rst)
- RBD Snapshots, Ceph v20.2.4 (Tentacle) documentation (doc/rbd/rbd-snapshot.rst)
- Configuring Ceph, Ceph v20.2.4 (Tentacle) documentation (doc/rados/configuration/ceph-conf.rst)
- cephadm: Upgrading Ceph, Ceph v20.2.4 (Tentacle) documentation (doc/cephadm/upgrade.rst)
- Using cephadm to Deploy a New Ceph Cluster, Ceph v20.2.4 (Tentacle) documentation (doc/cephadm/install.rst)
- CephFS: FS volumes and subvolumes, Ceph v20.2.4 (Tentacle) documentation (doc/cephfs/fs-volumes.rst)
- Orchestrator CLI, Ceph v20.2.4 (Tentacle) documentation (doc/mgr/orchestrator.rst)
- Troubleshooting OSDs, Ceph v20.2.4 (Tentacle) documentation (doc/rados/troubleshooting/troubleshooting-osd.rst)
- Placement Groups, Ceph v20.2.4 (Tentacle) documentation (doc/rados/operations/placement-groups.rst)
NetApp ONTAP 97
NetApp ONTAP clusters are run from a command line whose commands sit in a hierarchy of directories; the rows follow the ONTAP 9.18.1 command reference. The table covers session settings, cluster and node status, HA takeover and giveback, network interfaces, aggregates, disks and shelves, SVMs and file access, volumes, snapshots, SnapMirror replication and LUNs.
Cluster and nodes 10
| Command | What it does |
|---|---|
cluster show | Cluster statusLists every node with its health and whether it is eligible to take part in the cluster. |
cluster identity show | Show cluster identityReports the cluster name and UUID along with its serial number, location and contact details. |
system node show | List nodes with uptimeAdds uptime, model and location to the health and eligibility columns of cluster show. |
system health status show | Health monitor statusAnswers with one state: ok, ok-with-suppressed, degraded or unreachable. |
cluster image show | Show running ONTAP versionGives the current ONTAP release of every node and when it was installed, at admin privilege. |
system node image show | List software imagesNeeds advanced privilege; shows each node's images, which one is default, which is running, and their versions. |
system node reboot -node NODE -reason REASON | Reboot a nodeThe reason you give is written to the audit log, where support staff can read it later. |
system node autosupport invoke -node NODE -type test | Send a test AutoSupportGenerates a test AutoSupport message from that node; -message attaches your own text to it. |
job show | List cluster jobsWithout parameters it covers all current jobs; -id with a job number opens the detailed view. |
event log show | Event logLists recent events from the cluster's log; unless you filter, only EMERGENCY, ALERT and ERROR severities appear. |
High availability 6
| Command | What it does |
|---|---|
storage failover show | HA statusOne line per node with its partner, whether takeover is possible, and the current failover state. |
storage failover takeover -bynode NODE | Take over partner storageThe named node takes over its HA partner's storage in a negotiated, optimized way. |
storage failover takeover -bynode NODE -option immediate | Immediate takeoverSkips the clean shutdown of the partner, so its storage is taken without waiting for resources to close. |
storage failover giveback -ofnode NODE | Give back storageReturns taken-over storage to its home node; it fails while heavy operations such as system dumps run. |
storage aggregate relocation start -node node0 -destination node1 -aggregate-list aggr1, aggr2 | Relocate aggregateMoves the listed aggregates from one node to its partner node in the same HA pair. |
storage aggregate relocation show | Aggregate relocation statusReports on the aggregates moved in the most recent relocation operation. |
Network interfaces 8
| Command | What it does |
|---|---|
network interface show | LIF statusShows each LIF's admin and operational status, address, current node and port, and whether it sits on its home port. |
network interface show -failover | LIF failover settingsLists each LIF's home node and port together with its failover policy and failover group. |
network interface migrate -vserver VSERVER -lif LIF -dest-node NODE -dest-port PORT | Move a LIF to another portCan take up to 15 seconds and succeeds only if the target node and port are working. |
network interface revert -vserver * -lif * | Send all LIFs homeEvery LIF that is away from its home port reverts to it, provided the home node and port are up. |
network port show | List network portsPer node, shows each port's IPspace, broadcast domain, link, MTU, speed and health status. |
network port show -health | Port healthReports whether each port is healthy or degraded and lists the reasons when it is degraded. |
network route show | List static routesShows the static routes of each SVM with their destination and gateway. |
network ping -node NODE -destination 10.98.16.164 | Ping from a nodeThe ping leaves from the node you name and reports whether the remote address answers. |
Aggregates 7
| Command | What it does |
|---|---|
storage aggregate show | Aggregate statusOne line per aggregate with size, available space, used percent, state, volume count, node and RAID status. |
storage aggregate show -aggregate AGGREGATE | Details of one aggregateNaming an aggregate switches to a detailed record, including checksum style and number of disks. |
storage aggregate show-space | Aggregate space detailBreaks used space down by feature, such as volume footprints and metadata, including an attached capacity tier. |
storage aggregate show-status -aggregate AGGREGATE | RAID layout of an aggregateShows RAID groups and disks; the output is not paginated, so name the aggregate you need. |
storage aggregate create -aggregate AGGREGATE -node NODE -diskcount 20 -raidtype raid_dp | Create an aggregateBuilds a RAID-DP aggregate of twenty disks whose home is the given node. |
storage aggregate create -aggregate AGGREGATE -mirror -diskcount 20 | Create a mirrored aggregateThe disks are split between two plexes, ten in each for this count. |
storage aggregate add-disks -aggregate AGGREGATE -diskcount 10 | Add disks to an aggregateGiven a count and no disk list, ONTAP picks the disks itself; -raidgroup chooses the RAID group. |
Disks and shelves 8
| Command | What it does |
|---|---|
storage disk show | Disk inventoryLists disks and array LUNs with usable size, shelf, bay, container type and name, and owner. |
storage disk show -spare | List spare disksShows RAID details of the disks that are available as spares. |
storage disk show -broken | List broken disksShows RAID-related details of disks that have failed. |
storage disk show -partition-ownership | Partition ownershipFor partitioned disks, lists the home node and current owner of each partition. |
storage disk assign -disk DISK -owner NODE | Assign a disk to a nodeMeant for unowned disks; taking a spare that another system already owns needs -force as well. |
storage disk assign -all -node NODE | Claim all unowned disksEvery unowned disk or array LUN the node can see becomes owned by that node. |
storage shelf show | List storage shelvesShows name, ID, serial number, model, module type and status of every shelf. |
storage shelf show -errors | Shelves with errorsLimits the output to shelves that report errors, with the error details. |
SVMs and file access 9
| Command | What it does |
|---|---|
vserver show | List SVMsShows each SVM with type, subtype, admin and operational state, root volume and aggregate. |
vserver show -vserver VSERVER -fields rootvolume, rootvolume-security-style, aggregate | Show chosen SVM fieldsThe -fields list limits output to the columns you name, here the root volume details. |
vserver create -vserver VSERVER | Create an SVMWith only a name, defaults apply, including a root volume called after the SVM. |
vserver start -vserver VSERVER | Start an SVMStarts data access on the SVM; -foreground false lets it run in the background. |
vserver stop -vserver VSERVER | Stop an SVMStops data access on the SVM until vserver start is run for it again. |
vserver nfs show | NFS settings per SVMCovers NFS-enabled SVMs, showing whether general access, NFSv3, NFSv4, UDP and TCP are enabled. |
vserver cifs share show | List CIFS sharesShows the SVM, share name, path, properties and comment of each SMB share. |
vserver export-policy rule show | List export rulesShows policy, rule index, protocol, client match and the read-only and read-write rules. |
vserver export-policy rule create -vserver VSERVER -policyname POLICY -ruleindex 1 -protocol any -clientmatch ".example.com,.example.net" -rorule any -rwrule "ntlm,krb5,sys" | Add an export ruleClient match, read-only rule and read-write rule are mandatory; the index sets the rule's position in the policy. |
Volumes 19
| Command | What it does |
|---|---|
volume show | Volume statusLists each volume with its SVM, aggregate, state, type, size, available space and used percent. |
volume show -vserver VSERVER -volume VOLUME | Details of one volumeNaming a single volume prints its full record instead of the table. |
volume create -vserver VSERVER -volume VOLUME -aggregate AGGREGATE -size SIZE -junction-path PATH | Create volumeThe aggregate applies to FlexVol volumes, size takes a unit such as g or t, and the junction path mounts it. |
volume create -vserver VSERVER -volume VOLUME -auto-provision-as flexgroup | Create a FlexGroup volumeONTAP chooses the aggregates for the constituents itself. |
volume show-space | Volume space detailSplits a volume's usage into user data, filesystem metadata, inodes and snapshot reserve. |
volume size VOLUME | Show volume sizeLeave out the new size and the command only reports the current one. |
volume size VOLUME -250m | Shrink a volumeA minus sign reduces the size by that amount, a plus sign adds, and a bare value such as 1g sets it. |
volume modify -volume VOLUME -size +5g | Grow a volumeThe plus sign adds to the current size rather than setting an absolute value. |
volume modify -volume VOLUME -autosize-mode grow -max-autosize 500g | Enable volume autogrowLets the volume grow on its own until it reaches the maximum you set. |
volume offline VOLUME | Take a volume offlineEnds data access to the volume; the current root volume cannot be taken offline. |
volume online VOLUME | Bring a volume online |
volume delete -vserver VSERVER -volume VOLUME | Delete a volumeTake the volume offline first; ONTAP asks for confirmation unless -force is added. |
volume mount -vserver VSERVER -volume VOLUME -junction-path PATH | Mount at a junction pathAttaches the volume to the SVM namespace at the path you give. |
volume unmount -vserver VSERVER -volume VOLUME | Unmount a volumeDetaches it from its parent volume; volume mount can attach it again at the same or another path. |
volume move start -vserver VSERVER -volume VOLUME -destination-aggregate AGGREGATE | Move to another aggregateRuns as a job inside the same SVM; the target aggregate may be on the same node or another one. |
volume move start -vserver VSERVER -volume VOLUME -destination-aggregate AGGREGATE -perform-validation-only true | Check a move firstOnly runs the checks, for example whether the target has enough free space, and moves nothing. |
volume move show | Volume move statusWith no parameters it lists only moves that are running or have failed. |
volume clone create -vserver VSERVER -flexclone CLONE -parent-volume VOLUME | Create a FlexClone volumeThe clone is placed on the aggregate that holds its parent volume. |
volume efficiency show -vserver VSERVER | Storage efficiency statusLists the SVM's volumes with efficiency state (enabled, disabled or mixed) and current status. |
Snapshots 6
| Command | What it does |
|---|---|
volume snapshot show -volume VOLUME | List snapshots of a volumeShows each snapshot's name, state, size and share of the volume's blocks. |
snap show -volume VOLUME -snapshot SNAPSHOT -instance | Snapshot details via aliassnap is a built-in alias for volume snapshot, and -instance prints every field. |
volume snapshot create -vserver VSERVER -volume VOLUME -snapshot SNAPSHOT | Create a snapshot-comment attaches a note, and -foreground false runs the operation in the background. |
volume snapshot restore -vserver VSERVER -volume VOLUME -snapshot SNAPSHOT | Restore a volume from snapshotThrows away all changes made after the snapshot; update the volume's SnapMirror relationships straight afterwards. |
volume snapshot delete -vserver VSERVER -volume VOLUME -snapshot SNAPSHOT | Delete a snapshot |
volume snapshot policy show | List snapshot policiesShows each policy's schedules, how many copies each keeps, name prefixes and SnapMirror labels. |
SnapMirror replication 8
DESTINATION and SOURCE are endpoint paths, normally the SVM name and the volume name joined by a colon; older Pre 8.2 relationships also name the cluster.
| Command | What it does |
|---|---|
snapmirror show | Replication statusSummarises the relationships whose destinations are in this cluster, including mirror state, status and health. |
snapmirror show -expand | Include SVM DR constituentsExpands SVM-level relationships so that their constituent volume relationships are listed too. |
snapmirror create -destination-path DESTINATION -source-path SOURCE | Create a relationshipMust be run from the destination SVM or cluster; FlexVol relationships without a type or policy get MirrorAndVault. |
snapmirror initialize -destination-path DESTINATION | Start the baseline transferStarts the first, full transfer for a relationship made with snapmirror create. |
snapmirror update -destination-path DESTINATION | Run an incremental updateSends only the changes since the last transfer, and only works once the relationship is initialized. |
snapmirror quiesce -destination-path DESTINATION | Pause future transfersA transfer already running finishes first, and the state reads Quiescing until it does. |
snapmirror break -destination-path DESTINATION | Make destination writableEnds the mirror so the destination becomes read-write and can diverge from its source. |
snapmirror resync -destination-path DESTINATION | Resynchronize a broken mirrorRe-establishes mirroring, typically after a break has left the destination as a read-write volume. |
LUNs 4
| Command | What it does |
|---|---|
lun show -vserver VSERVER -volume VOLUME | List LUNs in a volume |
lun show -vserver VSERVER -path PATH -instance | Details of one LUNThe -instance view adds fields such as the serial number and space-reservation settings. |
lun mapping show | LUN to igroup mappingsShows which initiator group each LUN is mapped to and the LUN ID used for it. |
lun igroup show | List initiator groupsReports the status of every initiator group; the shorter igroup show also works. |
Cluster, nodes and network
cluster show lists the nodes with their health and eligibility, and cluster image show gives the ONTAP version each node runs. system node image show adds which image is the default and which is running, but needs advanced privilege. storage failover show reports for each node whether takeover is possible and, when takeover is disabled, the reason. network interface show lists LIFs with their current node and port and whether they are home, and network interface revert -vserver * -lif * sends every stray LIF back. event log show is the EMS log, filterable by severity and time.
Aggregates and disks
storage aggregate show lists aggregates with size, used percentage, state and RAID status, and storage aggregate show-space breaks down where the space went, from volume footprints to metadata. storage disk show lists disks with container type and owner, while storage disk show -spare and storage disk show -broken pick out spares and failed drives. storage aggregate relocation start -node node0 -destination node1 -aggregate-list aggr1, aggr2 hands aggregates to the HA partner node, and vserver show lists the storage virtual machines that own the volumes.
Volumes and replication
volume show lists volumes per SVM with size and state, and volume show-space splits a volume's usage into user data, metadata and snapshot reserve. volume create -vserver VSERVER -volume VOLUME -aggregate AGGREGATE -size SIZE -junction-path PATH makes a FlexVol volume: the SVM and volume name are the required parameters (the SVM may be left out when only one data SVM exists), the aggregate places it and the junction path mounts it. snapmirror show lists replication relationships with their state, status and health, and lag time is one of its fields. Tab completion works at every level of the hierarchy, and ? lists what can follow.
Which command shows the ONTAP version of each node?
cluster image show lists the current ONTAP version of every node with its installation date and works at admin privilege. system node image show also shows the second image and which one boots by default, but it needs set -privilege advanced first.
How do I reach the advanced-privilege commands?
Run set -privilege advanced and answer y to the warning; the prompt then ends in *> instead of >. NetApp describes these commands as potentially dangerous and meant for use when its support staff ask for them. Set the privilege back to admin when you are done.
Can ONTAP commands be abbreviated?
Yes. Each word needs only enough letters to be unique in its command directory, so st d sh runs storage disk show. Tab expands an abbreviation and shows the parameters the command takes, including default values.
How do I make a SnapMirror destination volume writable?
Run snapmirror break -destination-path DESTINATION: the destination becomes read-write and can diverge from the source, and later updates fail until snapmirror resync -destination-path DESTINATION re-establishes the mirror. Synchronous relationships must first be quiesced with snapmirror quiesce -destination-path DESTINATION.
Source: NetApp ONTAP 9.18.1 command reference (manual pages of the commands listed here). Checked row by row on .
Pure Storage FlashArray and FlashBlade 49
Pure Storage arrays, now documented under the Everpure name, are run with Purity commands named pure plus an object, such as purevol and purefs. The rows come from public Everpure solution guides for Proxmox, VMware, Oracle, NVIDIA, Splunk and cloud deployments rather than the Purity CLI reference, so they cover what those guides use: FlashArray volumes, hosts and protection groups, FlashBlade file systems and data VIPs, and array health, alerts, syslog and API tokens.
Volumes 6
| Command | What it does |
|---|---|
purevol create NAME --size SIZE | Create volumeMakes a FlashArray block volume; the size takes a unit such as 50M, 50G or 10T, and the output shows the new serial. |
purevol list | List volumesPrints every volume on the array; the vendor pipes it through grep to find one VM's volumes. |
purevol list --csv | List volumes as CSVMachine-readable output that includes the serial, which Linux hosts turn into the WWN after the 3624a9370 prefix. |
purevol setattr --size NEW-SIZE VOLUME-NAME | Resize volumeGrows a volume, for example to 4T; FlashArray volumes can be enlarged but never shrunk. |
purevol destroy VOLUME | Destroy volumePuts the volume into the destroyed state instead of deleting it outright; eradication is a separate step. |
purevol eradicate VOLUME | Eradicate volumeRemoves an already destroyed volume for good; the guide runs it right after purevol destroy. |
Hosts and connections 16
| Command | What it does |
|---|---|
purehost create --iqnlist IQN HOSTNAME | Create iSCSI hostRegisters the host's initiator IQN on the array so volumes can then be connected to that host name. |
purehost create --personality nvme --nqnlist nqn.2014-08.org.nvmexpress:uuid:ec2-instance-01 ec2-instance-01 | Create NVMe-TCP hostThe NVMe/TCP counterpart: the host's NQN goes after --nqnlist and the nvme personality is set at creation. |
purehost list | List hostsConfirms a host object exists; purehost connect cannot work for a host that was never created. |
purehost list --connect HOSTNAME | Show a host's volumesVerifies the volume mappings of one host after new or cloned volumes were connected to it. |
purevol connect NAME --host HOSTNAME | Connect volume to hostThe output names the host and the LUN number the volume received. |
purehost connect --vol VOLUME HOST | Connect from the host sideSame mapping as purevol connect, written from the host: --vol takes the volume, the last argument the host. |
purevol connect VOLUME --hgroup GROUP | Connect volume to host groupPresents the volume to every host in the group, the method the guide uses for a Proxmox cluster. |
purevol disconnect VOLUME --hgroup GROUP | Disconnect volume from groupRemoves the host group's access, the step the guide takes before destroying a cloned volume. |
purevol listconnection VOLUME | List volume connectionsShows which hosts or host groups see the volume, a quick check after each connect or disconnect. |
purevol list --connect | List all connectionsArray-wide view of which volumes are connected to which hosts, rather than one volume at a time. |
purehgroup create --hostlist ESXi-1-nvme-vvols,ESXi-2-nvme-vvols NVMe-vVols-Host-Group-FC | Create host groupMember hosts follow --hostlist separated by commas; the last argument is the new group's name. |
purehgroup list | List host groups |
purehgroup list --host | Show group membersAdds the member hosts of each group, to check membership before mapping new volumes. |
purehgroup list --connect TARGET_HGROUP | Show a group's volumesShows every volume mapped to the group together with the LUN it was given. |
pureport list | List array portsShows each controller port with its portal address and target IQN, which hosts need for iSCSI discovery. |
purehost monitor --balance --interval 3 | Monitor path balanceShows the I/O count on each initiator-to-target path, to confirm traffic flows only to the primary controller. |
Snapshots and protection groups 8
Inside a protection group snapshot, each volume is addressed by three dot-separated names (group, snapshot, volume) when it is cloned.
| Command | What it does |
|---|---|
purevol snap --suffix golden-v1 golden-rhel9-boot | Snapshot volumeThe snapshot takes the volume name plus the suffix, here golden-rhel9-boot.golden-v1. |
purevol copy SOURCE DEST | Copy volumeClones a volume under a new name, as the guide does with a VM's vVol before migrating it. |
purevol copy golden-rhel9-boot.golden-v1 ec2-instance-01-boot | Clone volume from snapshotBuilds a new boot volume from the snapshot, ready to be connected to an instance with purehost connect. |
purepgroup create pg-orcl26-prod1 | Create protection groupStarts an empty group; the guide keeps one protection group per container database so each restores independently. |
purevol add orcl26-p1-data orcl26-p1-logs --pgroup pg-orcl26-prod1 | Add volumes to a groupPuts the listed volumes into the protection group, so each group snapshot covers all of them. |
purepgroup create --vollist orcl26-p2-data orcl26-p2-logs pg-orcl26-prod2 | Create group with volumesOne-step form: --vollist names the member volumes and the last argument names the group. |
purepgroup snap --suffix "prod-ORCL-appcons-20260316-153000Z" pg-prod-ORCL-rac | Snapshot protection groupSnapshots every member volume in one coordinated, near-instant action; the suffix labels the result. |
purepgroup list --snap pg-orcl26-prod1 | List group snapshotsConfirms the new snapshot and its suffix before volumes are cloned from it. |
File systems 5
| Command | What it does |
|---|---|
purefs create --size 1T purefb | Create file systemCreates a 1T FlashBlade file system named purefb; a protocol such as NFSv3 is enabled afterwards with purefs add. |
purefs create rman-backups --size 32T --default-exports nfs | Create with NFS default exports |
purefs add purefb --protocol nfsv3 | Enable NFSv3Turns on a file protocol for an existing file system; DGX SuperPOD builds on FlashBlade//S require NFSv3. |
purefs list | List file systemsShows size, enabled protocols, writable state and promotion status for each file system. |
purefs list FILESYSTEM_NAME --protocol-specific nfs | Show NFS export rulesPrints one file system's protocols and export rules; empty rules mean default access. |
Network and administration 8
FlashBlade places data VIPs on its blades by itself and moves them when a blade fails over.
| Command | What it does |
|---|---|
purenetwork list | List network interfacesLists network addresses with subnet, VLAN, gateway, MTU and the services each one carries. |
purenetwork list --filter 'services="data"' | List data VIPsNarrows the list to data VIPs, the addresses clients mount from; FlashBlade spreads them over its blades. |
puresubnet create --prefix 100.127.199.0/25 --vlan 34 --gateway "" --mtu 9000 --lag uplink testnet | Create subnetSets prefix, VLAN, gateway, MTU and link aggregation group; data VIPs are added to it afterwards. |
purenetwork vip create --address 100.127.199.4 --servicelist data data-34-90 | Create data VIPAdds a virtual IP for client data traffic; on FlashBlade it needs a subnet from puresubnet create first. |
pureadmin create --api-token | Create API tokenRun once to issue the token that integrations such as the Splunk add-on authenticate with. |
pureadmin list --api-token --expose | Show existing API tokenPrints a token that already exists instead of creating another one. |
purelog create --uri URI NAME | Add syslog serverURI takes the form protocol://host:port, and the optional NAME labels the server inside Purity. |
purelog test | Send syslog testSends a test message so you can confirm it arrives at the remote syslog server. |
Array and hardware health 6
By default the array also raises warning alerts when used capacity reaches 80, 90 and 95 percent.
| Command | What it does |
|---|---|
purearray list | Show array infoPrints the array ID; its first 7 bytes follow the leading 00 in the NGUID of every NVMe namespace. |
purearray list --space | Show array capacityAdds capacity, provisioned size, data reduction, snapshot and system space to the array listing. |
purehw list | Check hardware healthStatus, slot, speed and temperature per component, from controllers down to single Ethernet ports. |
puredrive list | Drive statusNarrower than purehw list: reports the drives alone, which are virtual drives on Cloud Dedicated. |
puremessage list | List alert messagesLists alert events with time, severity, category, code and the component that raised them. |
purealert list --report 20001 | Show alert detailsPrints one alert by its ID with severity, state, summary and suggested action. |
Data objects
On FlashArray, purevol create NAME --size SIZE makes a block volume and purevol list lists them; on FlashBlade, purefs create --size 1T purefb creates a file system and purefs list shows each one's size, protocols and writable state. purevol snap --suffix golden-v1 golden-rhel9-boot takes a snapshot named after the volume plus the suffix, and purevol copy golden-rhel9-boot.golden-v1 ec2-instance-01-boot turns it into a new volume. Sizes carry a unit suffix such as 2TB, 100G or 32T, and a volume can grow but never shrink.
Hosts and protection groups
A volume reaches a server through a host object: purehost create --iqnlist IQN HOSTNAME registers the initiator, and purevol connect NAME --host HOSTNAME, or purevol connect VOLUME --hgroup GROUP for a cluster, maps the volume with a LUN. Volumes that must be snapshotted together go into one protection group, for example with purevol add orcl26-p1-data orcl26-p1-logs --pgroup pg-orcl26-prod1; a group snapshot keeps write order consistent across them, and each member is cloned under its group, snapshot and volume names.
Array, hardware and health
purearray list prints the array ID and purearray list --space its capacity, data reduction and snapshot space. purehw list reports the status of every component, down to single Ethernet ports, and puredrive list narrows that to the drives. puremessage list lists alert events with severity and component, and purealert list --report 20001 prints one alert with its suggested action. purevol list --csv gives comma-separated output for scripts.
Network and access
FlashBlade clients mount file systems through data VIPs, which the array spreads across its blades and fails over by itself. A subnet comes first with puresubnet create, then each VIP with purenetwork vip create --address 100.127.199.4 --servicelist data data-34-90, and purenetwork list --filter 'services="data"' shows the result. pureadmin create --api-token issues an API token for integrations such as the Splunk add-on, and pureadmin list --api-token --expose shows it again later. purelog create --uri URI NAME forwards the array's syslog messages to a remote server.
How do I delete a FlashArray volume permanently?
Everpure's migration guide first disconnects it with purevol disconnect VOLUME --hgroup GROUP. purevol destroy VOLUME then moves it to the destroyed state, and purevol eradicate VOLUME removes it for good.
Can a FlashArray volume be shrunk?
No. purevol setattr --size NEW-SIZE VOLUME-NAME can only add capacity; Everpure describes FlashArray volumes as increase-only, so check the new size before running it.
How do I make a writable volume from a snapshot?
Copy the snapshot to a new name: after purevol snap --suffix golden-v1 golden-rhel9-boot, the command purevol copy golden-rhel9-boot.golden-v1 ec2-instance-01-boot creates a new volume from it. A volume inside a protection group snapshot is named with three parts: group, snapshot and volume.
Which command shows the addresses FlashBlade clients mount from?
purenetwork list --filter 'services="data"' lists the data VIPs with their subnet, address, VLAN and MTU; these are the addresses clients use to reach FlashBlade storage.
Source: Everpure (Pure Storage) Knowledge Portal: Manual Pure vVOL VMware to Proxmox Migration Guide (Proxmox). Checked row by row on .
15 more source pages
- Everpure (Pure Storage) Knowledge Portal: Linux Host Setup and Management via iSCSI (Everpure Cloud Dedicated for Azure)
- Everpure (Pure Storage) Knowledge Portal: Everpure FlashArray for AWS Outposts - Quick Start Guide (Amazon Web Services - AWS)
- Everpure (Pure Storage) Knowledge Portal: Restoring Storage Snapshots of a 19c/26ai Oracle Multitenant Database on a Filesystem Using Everpure FlashArray (Oracle)
- Everpure (Pure Storage) Knowledge Portal: Application-Consistent Snapshot Workflow (Detailed) (Oracle)
- Everpure (Pure Storage) Knowledge Portal: Option B: Restore to New Volumes on the Same Cluster (Oracle)
- Everpure (Pure Storage) Knowledge Portal: FlashBlade Configuration (Oracle)
- Everpure (Pure Storage) Knowledge Portal: Configuring FlashBlade: Multiple DataVip Creation (NVIDIA)
- Everpure (Pure Storage) Knowledge Portal: Using the CLI to Check Health Status (Everpure Cloud Dedicated for AWS)
- Everpure (Pure Storage) Knowledge Portal: Check Array Usable Space (Everpure Cloud Dedicated for AWS)
- Everpure (Pure Storage) Knowledge Portal: Alert 10203 - Cloud Provider Maintenance Window (Everpure Cloud Dedicated for AWS)
- Everpure (Pure Storage) Knowledge Portal: FlashArray Configuration (User Guides for VMware Solutions)
- Everpure (Pure Storage) Knowledge Portal: PureStorage Unified Add-on Configuration (Splunk and Elastic)
- Everpure (Pure Storage) Knowledge Portal: Creating NVMe-vVols Hosts on the FlashArray (User Guides for VMware Solutions)
- Everpure (Pure Storage) Knowledge Portal: Expanding a FlashArray Volume and LVM Storage in Proxmox VE (Proxmox)
- Everpure (Pure Storage) Knowledge Portal: Creating Storage Snapshots of Oracle 19c/26ai Multitenant Databases on Everpure FlashArray (Oracle)
VAST Data 48
VAST Data clusters are administered with vcli, which runs on a CNode; the rows follow the VAST Cluster 5.5 CLI reference. The table covers starting the CLI, cluster and node status, VIP pools, manager accounts, roles and realms, views and view policies, snapshots and protection policies, tenants, quotas and QoS, and alarms, events and support bundles.
Starting the CLI 4
Every command is an object type followed by an action and named arguments, so view list and view create work on the same kind of object.
At the vcli prompt, a command followed by ? prints its full syntax, including the VAST arguments.
| Command | What it does |
|---|---|
vcli -u admin -p 123456 | First login as default adminRun it at the VAST OS prompt of a CNode reached over SSH; the default account password can be changed afterwards. |
vcli -c ldap list | Run a single commandGive the full command string after -c to get its output without opening the interactive prompt. |
vcli --batch-file FILE | Run a batch fileRuns a saved list of commands in one go; the file has to be placed under /vast/deploy/. |
view create --help | Show a command's helpWorks after any command; typing a space after an argument also hints at its value format or allowed values. |
Cluster and nodes 6
| Command | What it does |
|---|---|
cluster show | Show cluster settingsWithout options the output is a summary; detail flags such as --capacity or --raid-state add sections. |
cluster show --capacity | Show capacity metrics |
cluster show --performance | Show performance metrics |
cluster stat --path PATH | Show statistics for a pathAdd --tenant-id to read the statistics of that path within one tenant. |
cnode list | List CNodesIts Name field holds node names that can stand in for IPs when connecting over SSH between nodes of one cluster. |
dnode list | List DNodes |
Management and network access 5
| Command | What it does |
|---|---|
vms show | Show VMS detailsAdd --passwords-settings to see the password complexity requirements instead. |
vms modify --mgmt-data-vip MGMT_DATA_VIP | Set data-network VIPAdds an optional VMS address on the data subnet, placed on the interface named with --mgmt-data-interface on every CNode. |
vippool create --ip-ranges IP_RANGES --subnet-cidr CIDR | Create VIP poolWrite each range as start IP,end IP with spaces between ranges; --role REPLICATION reserves the pool for async replication. |
vippool list | List VIP poolsShows the IP ranges, subnet, VLAN, role and CNodes of each pool. |
vip list --cnode-name cnode-1 | List VIPs on one CNodeLeave out --cnode-name to list the virtual IPs held by all CNodes. |
Administrators and roles 5
| Command | What it does |
|---|---|
manager create --username NAME --role-id ID | Create manager userAdds a VMS administrator account under an existing role; set its password with --password or --prompt-password. |
manager list | List managers |
role create --name NAME --tenant-ids IDs | Create roleTakes one tenant ID or a comma-separated list; --ldap-groups links directory groups to the role. |
realm create --name NAME --object-types OBJECT_TYPES | Create permission realmBundles object types, given as a comma-separated list such as snapshot,protectionpolicy, into one security realm. |
apitoken create --name TOKEN_NAME --expiry-date EXPIRATION_TIME | Create API tokenThe token authenticates calls to the VMS REST API; --owner issues it for another user. |
Views and view policies 8
| Command | What it does |
|---|---|
view create --path PATH --protocols NFS | Create viewWithout --policy-id the default view policy applies; add --create-dir when the directory does not exist yet. |
view create --path PATH --protocols NFS,SMB --share SHARE --policy-id ID --create-dir | Create multiprotocol viewSMB access needs a share name unique within the tenant; S3 access needs --bucket and --bucket-owner instead. |
view modify --id VIEW_ID --protocols PROTOCOLS | Modify viewViews are selected by numeric ID, which the ID column of view list shows. |
view list --path PATH | List viewsOther filters cover alias, policy and tenant; --page-size shows up to 500 views per page. |
view show --id ID | Show view detailsFlags such as --s3, --share-level-acl or --worm add those settings to the output. |
view delete --id ID | Delete viewRemoves the view from VMS only; the directory and its files stay on the file system. |
viewpolicy create --name NAME --flavor NFS --auth-source PROVIDERS | Create view policyOne policy can serve many views; the flavor decides which protocol is treated as native. |
viewpolicy list | List view policiesPrints the policy IDs that view create and view modify take with --policy-id. |
Snapshots and data protection 7
| Command | What it does |
|---|---|
snapshot create --path PATH --name NAME | Create snapshotCaptures everything below the directory at that moment; --expiration-time sets when it expires. |
snapshot create --path PATH --name NAME --enable-lock | Create locked snapshotDeleting it or bringing its expiry forward then needs the cluster's indestructibility mechanism to be unlocked first. |
snapshot list | List snapshotsShows the snapshot IDs that snapshot clone and snapshot delete expect. |
snapshot delete --id ID | Delete snapshot |
snapshot clone --id ID --name NAME --target-path PATH --target-tenant-id ID | Clone snapshot to directoryThe new directory is writable at once; --background-sync copies the data in so it stops depending on the snapshot. |
protectionpolicy create --clone-type LOCAL --name POLICY_NAME --schedule SCHEDULE --snapshot-prefix PREFIX | Create protection policyLOCAL keeps the scheduled snapshots on this cluster; NATIVE_REPLICATION and CLOUD_REPLICATION also need --peer-id. |
protectedpath create --name NAME --source-dir SOURCE_DIR --local-tenant-id ID --protection-policy-id PROTECTION_POLICY_ID | Protect a directoryPuts the directory on the policy's snapshot schedule; the policy attached here cannot be swapped later. |
Tenants, quotas and QoS 6
| Command | What it does |
|---|---|
tenant create --name NAME --capacity-rules CAPACITY_RULES | Create tenantCapacity rules are comma-separated key=value pairs such as soft_limit and hard_limit, in GB. |
tenant list | List tenants |
quota create --name NAME --path PATH --hard-limit LIMIT | Create quotaBlocks further writes past the limit and raises a HARD_EXCEEDED alarm; write sizes as a number plus unit, like 2TB. |
quota list | List quotas |
qospolicy create --name NAME --policy-type VIEW --is-gold | Create gold QoS policyGold view policies win contention for CPU and memory; --is-gold is accepted for view policies only. |
qospolicy list | List QoS policies |
Alarms, monitoring and support 7
| Command | What it does |
|---|---|
alarm list --severity CRITICAL | List critical alarmsSeverity also takes MAJOR or MINOR; --start-time and --end-time limit the time window. |
alarm clear | Clear all alarmsClears every alarm at once, whereas alarm delete removes one specific alarm. |
event list | List eventsFilters such as --severity, --event-type and --start-time narrow the cluster event log. |
monitor list | List report definitions |
monitor query | Query an analytics report |
monitor ad-hoc-query | Run a one-off queryReturns results once without storing the query as a custom report. |
supportbundle create --prefix PREFIX --preset PRESET | Create support bundleWithout --preset only management logs are collected; agree the preset with the VAST support engineer. |
Views and how clients see data
A view exposes a directory to clients over the protocols named in view create --path PATH --protocols NFS; a list such as NFS,SMB opens the same data to several protocols, as in view create --path PATH --protocols NFS,SMB --share SHARE --policy-id ID --create-dir. Every view has a view policy, made with viewpolicy create --name NAME --flavor NFS --auth-source PROVIDERS, and one policy can serve any number of views. Later changes go through view modify --id VIEW_ID --protocols PROTOCOLS, which selects the view by ID rather than by path. Clients connect to virtual IPs from a pool created with vippool create --ip-ranges IP_RANGES --subnet-cidr CIDR, and vms modify --mgmt-data-vip MGMT_DATA_VIP adds an optional VMS management address on the data subnet.
Tenants, roles and limits
tenant create --name NAME --capacity-rules CAPACITY_RULES creates a tenant with soft and hard capacity limits. Administrative access is built from roles and realms: role create --name NAME --tenant-ids IDs scopes a role to one or more tenants, realm create --name NAME --object-types OBJECT_TYPES groups object types into a permission realm, and manager create --username NAME --role-id ID adds a VMS manager account under a role. quota create --name NAME --path PATH --hard-limit LIMIT caps a directory, and qospolicy create --name NAME --policy-type VIEW --is-gold gives the workloads of a view QoS policy priority for CPU and memory. Per-client NFS metrics are switched on and charted on the Analytics page of the VAST Web UI; the 5.5 CLI reference lists no command for them.
Snapshots and clones
snapshot create --path PATH --name NAME records everything under a directory at that moment, and snapshot create --path PATH --name NAME --enable-lock makes the snapshot indestructible until the cluster's indestructibility mechanism is unlocked. snapshot clone --id ID --name NAME --target-path PATH --target-tenant-id ID turns a local snapshot into a new directory that is writable at once, so data comes back without waiting for a copy. Scheduled snapshots come from a protection policy, protectionpolicy create --clone-type LOCAL --name POLICY_NAME --schedule SCHEDULE --snapshot-prefix PREFIX, applied to a directory with protectedpath create --name NAME --source-dir SOURCE_DIR --local-tenant-id ID --protection-policy-id PROTECTION_POLICY_ID; the replication clone types also send the snapshots to an async or S3 replication peer.
Where do I run vcli?
On a CNode. Connect to any CNode over SSH (the management VIP works for the first connection), log in with the node's Linux credentials and run vcli -u admin -p 123456 at the VAST OS prompt to use the factory default VMS account; the prompt then reads vcli: admin>.
How do I see the arguments a VAST CLI command takes?
Add -h or --help to it, as in view create --help. Typing a space after an argument shows a generic value format, the allowed values or an example, and VAST's online CLI reference documents the arguments of most commands.
Does deleting a view delete its data?
No. view delete --id ID removes the view from VMS, but the directory and its files remain; VAST points to the folder deletion endpoint of its REST API for removing the directory itself.
Can VAST CLI commands run from a script?
Yes. vcli -c ldap list runs one command without the interactive prompt, and vcli --batch-file FILE runs a file of commands, which must be stored under /vast/deploy/.
Source: VAST Data Knowledge Base: VAST Cluster 5.5 CLI Command Reference (reference pages of the commands listed here). Checked row by row on .
No row on this page matches that filter.
Questions
Which command gives a first health check on each system?
mdadm: cat /proc/mdstat lists every running array with its members and any recovery in progress, and mdadm --detail --test DEVICE turns one array's state into an exit status for scripts. Ceph: ceph status, followed by ceph health detail when it reports a warning. NetApp ONTAP: cluster show for node health and system health status show for the health monitor. Pure Storage: purehw list for component status and puremessage list for alert events. VAST Data: alarm list --severity CRITICAL.
Which commands show used and free capacity?
Ceph: ceph df for raw capacity and usage per pool, and ceph osd df for each OSD. NetApp ONTAP: storage aggregate show gives size, available space and used percent per aggregate, and volume show-space splits a volume's usage. Pure Storage: purearray list --space adds capacity, provisioned size and data reduction to the array listing. VAST Data: cluster show --capacity. The mdadm table has no space report; its commands deal with array state and member disks.
How is a snapshot turned into a writable copy?
Ceph RBD: rbd snap create rbd/foo@snapname, then rbd snap protect rbd/foo@snapname, which is required before rbd clone rbd/foo@snapname rbd/bar. Pure Storage: purevol snap --suffix golden-v1 golden-rhel9-boot, then purevol copy golden-rhel9-boot.golden-v1 ec2-instance-01-boot builds a new volume from it. VAST Data: snapshot create --path PATH --name NAME, then snapshot clone --id ID --name NAME --target-path PATH --target-tenant-id ID, whose new directory is writable at once. In the ONTAP table, volume snapshot restore -vserver VSERVER -volume VOLUME -snapshot SNAPSHOT rolls the volume itself back and discards later changes, and volume clone create -vserver VSERVER -flexclone CLONE -parent-volume VOLUME makes a FlexClone of a parent volume.
Sources and checks
Each tool on this page keeps its own source line under its table. The documented lists of these 5 tools are short enough to read together, so they share this page; each keeps its own section, and its old address redirects to that section.
Found a wrong or missing key? Tell us and it gets checked against the source. How we verify describes the process and its limits.