WEKA commands

WEKA, now documented as NeuralMesh by WEKA, is run from the weka command-line tool on every cluster server. The rows follow the WEKA 5.1 documentation and CLI reference: health, alerts, drives, filesystems, snapshots, mounts, quotas, NFS, users and diagnostics. Most top-level commands also list their collection, so weka fs lists filesystems; weka -h, or -h after any command, shows the options. Capitalised words are placeholders; S3 and SMB setup and Kubernetes are left out.

119 commands in 13 sections. Checked row by row against WEKA 5.1 documentation (NeuralMesh by WEKA) on . Edited by Jay.

Cluster status 6

CommandWhat it does
weka statusCluster statusReports whether the cluster is healthy, partially protected, rebuilding or unavailable, colour-coded in a terminal.
weka status --jsonStatus as JSONFormats the status report as JSON for scripts; -J is the short form of the flag.
weka status rebuildRebuild progressShows how far data has been phased in or out and the protection level for each fault level.
weka status reductionData reduction summary
weka cluster licenseLicense statusTells whether the license is valid and how much of the licensed resources the cluster uses.
weka cluster taskBackground tasksLists the running background jobs; --show-waiting adds those that are waiting.

Alerts and events 13

CommandWhat it does
weka alertsList alertsPrints each alert with its type, severity, mute state, start time, count and title.
weka alerts --severity SEVERITYFilter alerts by severityLists that level and higher; the levels are warning, minor, major and critical, with warning as default.
weka alerts --mutedInclude muted alertsAdds the muted alerts to the list, which otherwise shows only the active ones.
weka alerts typesList alert typesGives the type names that the mute and unmute commands expect.
weka alerts describeDescribe alert typesExplains every alert type together with the corrective action to take.
weka alerts mute ALERT-TYPE DURATIONMute an alert typeThe duration is mandatory; when it runs out the alert type is unmuted on its own.
weka alerts unmute ALERT-TYPEUnmute an alert type
weka eventsList eventsShows the latest 50 events unless --num-results gives another number; 0 returns them all.
weka events --start-time START-TIMEEvents since a given timeTakes relative values such as -1d or -1w, clock times or full dates.
weka events --severity SEVERITYFilter events by severityKeeps the given level and higher: info, warning, minor, major or critical.
weka events list-typesList event typesShows the event type definitions, the names that --type-list filters on.
weka events list-localEvents of this containerReads recent events from the container it runs on, useful when that container cannot reach the cluster.
weka events trigger-event TEXTAdd a custom eventMarks maintenance work or another change as an entry on the event timeline.

Servers, containers and drives 18

CommandWhat it does
weka clusterCluster commandsParent of the subcommands for servers, containers, processes, drives, failure domains and tasks.
weka cluster servers listList servers--role narrows the list to backend, client, nfs, smb or s3 machines.
weka cluster servers show UIDServer overview
weka cluster containerList containersShows each container with its state, the administrative lifecycle, and its status, the live health.
weka cluster container CONTAINER-IDShow one containerACTIVE with UP means the container takes full part and all its processes are healthy.
weka cluster container info-hwContainer hardware detailsQueries every container unless hostnames or IP addresses are given.
weka cluster processList processesShows the health of each process; a container status is derived from these.
weka cluster driveList drivesAdd --show-removed to include drives that were taken out of the cluster.
weka cluster drive -F node=invalid -o id,uuid,host,hostname,node,statusFind a failed drivePrints the UUID and host ID a replacement needs; filter on status=inactive if nothing shows.
weka cluster drive deactivate DRIVE-UUIDDeactivate a driveSecond step of a drive replacement, run on the UUID found in the drive list.
weka cluster drive remove DRIVE-UUIDRemove a driveTakes the deactivated drive out of the cluster before the hardware is swapped.
weka cluster drive add HOST-ID DEVICE-PATHAdd a driveUses the host ID of the old drive and a device such as /dev/nvme1n1; it turns ACTIVE after the rebuild.
weka cluster drive scanScan for drivesContainer IDs can be given to limit the scan to those containers.
weka cluster drive activateActivate drivesWithout a UUID it activates every drive; with one or more, only those.
weka cluster failure-domainList failure domains
weka cluster hot-spareHot-spare countWithout a number it shows how many failure domains are hot spares; with a number it sets that count.
weka cluster stop-ioStop IO servicesWith --keep-external-containers the S3, SMB and NFS containers stay up.
weka cluster start-ioStart IO services

Local server 7

CommandWhat it does
weka local psContainers on this server
weka local statusLocal container statusSummarises the WEKA version, cgroups mode, running containers and nodes, and the number of mounts.
weka local startStart local containersWaits up to 15 minutes by default; names or --type choose which containers start.
weka local stopStop local containers--reason is shown in weka status; --force skips the active-mount check for an ungraceful stop.
weka local restartRestart local containersRestarts all of them unless one is named, for example client; unmount WEKA beforehand.
weka local resourcesContainer resourcesWith --stable it lists the resources from the last successful boot of the container.
weka local eventsEvents stored on this serverNeeds no login and still works while WEKA is stopped on the server.

Filesystems and groups 10

add is the documented action name; create and new still work as aliases, and remove also accepts destroy and delete.

CommandWhat it does
weka fsList filesystemsShows each filesystem with its group, SSD budget, total budget and whether it is ready.
weka fs --capacitiesShow every capacity columnAdd --force-fresh to refresh the capacity figures before they are printed.
weka fs add NAME GROUP-NAME TOTAL-CAPACITYCreate filesystemTotal capacity is at least 1GiB; a tiered filesystem also needs --obs-name naming its object store.
weka fs update NAME --total-capacity TOTAL-CAPACITYResize a filesystemThe same command changes SSD capacity, thin provisioning and the --max-throughput and --max-iops limits.
weka fs update NAME --new-name NEW-NAMEChange the filesystem name
weka fs remove NAMEDelete a filesystemWith --purge-from-obs the data, backups and snapshots of a tiered filesystem are erased from the object store too.
weka fs reserve set SSD-CAPACITYReserve SSD spaceSets SSD capacity aside for a new thin-provisioned filesystem while existing ones free space.
weka fs groupList filesystem groups
weka fs group add NAMECreate a filesystem groupBy default data goes to the object store 10s after its last update and stays on SSD for 1d after that.
weka fs group remove NAMEDelete a filesystem group

Snapshots 10

CommandWhat it does
weka fs snapshotList snapshotsIncludes each snapshot UID, object locator, reclaimable space estimate and metadata size.
weka fs snapshot add FILE-SYSTEM NAMECreate snapshotThe snapshot appears in the hidden .snapshots directory, named by date unless --access-point sets a name.
weka fs snapshot remove FILE-SYSTEM NAMEDelete a snapshotCannot run while a snapshot of the same filesystem uploads, so delete unwanted ones before uploading.
weka fs restore FILE-SYSTEM SOURCE-NAMERestore from a snapshotRewrites the data and metadata of the filesystem; stop IO first unless a preserved-overwritten snapshot name is given.
weka fs snapshot copy FILE-SYSTEM SOURCE-NAME DESTINATION-NAMECopy over a snapshotReplaces the destination snapshot with the contents of the source snapshot.
weka fs snapshot update FILE-SYSTEM NAME --new-name NEW-NAMERename a snapshotThe --access-point option of the same command renames the directory it is reached under.
weka fs snapshot upload FILE-SYSTEM SNAPSHOTUpload a snapshotSnap-To-Object step; --site chooses local or remote when both kinds of bucket are attached.
weka fs snapshot download FILE-SYSTEM LOCATORDownload a snapshotFor synchronous snapshots uploaded from version 4.3 or later; download them in chronological order.
weka fs download NAME GROUP-NAME TOTAL-CAPACITY SSD-CAPACITY OBS-BUCKET LOCATORFilesystem from an uploaded snapshotRecreates a filesystem from a snapshot in a local bucket, including a remote bucket mapped as local for recovery.
cd .snapshotsOpen the snapshots directoryHidden from ls -la; inside a subdirectory it lists only snapshots taken after that directory was made.

Mounting 9

Between the backend list and the filesystem name, either / or :/ may be used.

CommandWhat it does
mount -t wekafs FS-NAME MOUNT-POINTMount on a persistent clientFor a client that has already joined the cluster; run as root and pass options with -o.
mount -t wekafs -o net=eth0 backend-1/my_fs /mnt/wekaMount filesystemOn a stateless client the first mount installs the WEKA software and joins the cluster through the named backend.
mount -t wekafs -o num_cores=2 backend1,backend2,backend3/my_fs /mnt/wekaMount through several backendsThe client can rejoin through any of the three backends and gets two frontend cores.
mount -t wekafs -o net=udp backend-server-0/my_fs /mnt/wekaMount in UDP modeUses kernel UDP networking for hosts where DPDK is not available.
mount -o remountRemount with new optionsChanging num_cores, memory_mb or the QoS options this way restarts the client container and pauses IO briefly.
mount /mnt/weka/my_fsTest the fstab entryMounts through the wekafs line in /etc/fstab, the same entry that remounts the filesystem after a reboot.
mount | grep new_fsCheck that it is mountedShows the mount point, the wekafs type and the mount options in effect.
umount /mnt/wekaUnmount filesystemOn a stateless client the last unmount also disconnects it from the cluster and the agent removes the client software.
weka cluster mount-defaults showDefault mount optionsShows the QoS defaults that new mounts receive; existing mounts keep the values they started with.

Quotas 4

CommandWhat it does
weka fs quota set PATH --soft SOFT --hard HARDSet a directory quotaThe filesystem has to be mounted, and a Data Services container runs the quota background task.
weka fs quota set --type user --id 1001 --soft 90GB --hard 100GB --filesystem defaultSet a user quotaLimits UID 1001 on the default filesystem; group quotas use --type group with a GID.
weka fs quota listList quotasShows only exceeded quotas unless --all is added.
weka fs quota enable-users FILESYSTEMEnable user quota accountingA one-time step, run by a Data Services container, for filesystems made before release 5.1.20.

NFS, SMB and S3 14

CommandWhat it does
weka nfs interface-groupList NFS interface groups
weka nfs interface-group add NAME TYPE --subnet SUBNET --gateway GATEWAYCreate an interface groupThe type is NFS; the subnet is given as a mask such as 255.255.0.0.
weka nfs interface-group port add NAME CONTAINER-ID PORTAdd a port to a groupThe port is a network device of the given container, such as enp2s0.
weka nfs interface-group ip-range add NAME IPSAdd floating IPsTakes a range written like 10.0.1.101-118.
weka nfs client-group add NAMECreate a client group
weka nfs rules add ip NAME IPAdd an IP ruleMatches clients by subnet, e.g. 192.168.114.0/8; a dns rule matches a hostname instead.
weka nfs permission add FILESYSTEM GROUPGrant a client group accessOptions set the path, permission type, root squashing and the anonymous UID and GID.
weka nfs permissionList NFS permissionsAdd --filesystem to show the permissions of one filesystem only.
weka nfs clients showConnected NFS clientsPrints JSON per client, filtered by interface group, container or floating IP if wanted.
weka nfs global-config showNFS global settings
weka smb cluster statusSMB container readiness
weka smb shareList SMB shares
weka s3 cluster statusS3 container readiness
weka s3 bucket listList S3 buckets

Statistics 6

CommandWhat it does
weka statsList statisticsValues are one-minute averages over the chosen period; only the real-time view is finer.
weka stats --category CATEGORYStatistics of one categoryCategories are CPU, Object Store, Operations, Operations (NFS), Operations (Driver) and SSD.
weka stats --per-processStatistics per processReports every process separately instead of adding them up.
weka stats realtimeReal-time statisticsRefreshes the performance figures of the processes every second.
weka stats list-typesList statistic typesAccepts a name or category such as api; --show-internal adds the internal ones.
weka stats retention set --days DAYSSet statistics retentionWith --dry-run it only checks the disk capacity the retention period would need.

Users and login 10

CommandWhat it does
weka userList usersShows each user with the source, such as Internal, and the role.
weka user login USERNAME PASSWORDLog inSaves the credentials in the home directory, or in the token file named by --path or WEKA_TOKEN.
weka user logoutLog outDeletes the saved credentials from the WEKA_TOKEN file if one is set, otherwise from the home directory.
weka user whoamiShow the current userWEKA_USERNAME and WEKA_PASSWORD set in front of it check another account without logging in.
weka user add USERNAME ROLECreate a local userRole is clusteradmin, tenantadmin, regular, readonly, s3 or csi; without a password argument the command asks for one.
weka user change-role USERNAME ROLEChange a user's role
weka user passwd --username USERNAMESet a passwordAn admin can set the password of any other user in the same tenant.
weka user revoke-tokens USERNAMERevoke login tokens
weka user remove USERNAMEDelete a user
weka user ldapShow LDAP settings

Diagnostics and versions 6

CommandWhat it does
weka diags collectCollect diagnosticsKeeps the data on the cluster instead of uploading it, for sites without a WEKA Home connection.
weka diags uploadUpload diagnosticsReturns a Diags collection ID to pass to the Customer Success Team.
weka diags listList diagnostics filesShows the collected dumps with their IDs, the first step of a disk cleanup.
weka local diagsDiagnostics of this serverAdd --collect-cluster-info for cluster data too, on one container at a time to spare the cluster.
weka versionInstalled versionsWithout arguments it lists the versions on this machine; subcommands download and switch them.
weka version currentCurrent versionExits with a failure status when no version has been set.

CLI help and options 6

CommandWhat it does
weka -hList top-level commandsMost of them double as the list command of their collection, as weka fs does.
weka fs -hHelp for one commandAny command accepts -h or --help and prints its options and subcommands.
weka --versionCLI version
weka status --HOST HOSTRun on a specific serverSends the command to the named server; setting WEKA_HOST has the same effect.
weka agent autocomplete installInstall bash completionRe-enter the shell afterwards; normally the script is already installed.
weka agent autocomplete uninstallDisable bash completion

Notes

Reading cluster state

weka status is the first command on any server and reports whether the cluster is healthy, partially protected, rebuilding or unavailable; weka status rebuild shows how far a rebuild has come and the protection per fault level. weka alerts lists the current alerts, by default those of warning severity and above, and weka alerts describe explains every alert type with its corrective action. weka events is the event log, filterable by time, severity and type. weka cluster holds the commands for servers, containers, processes and drives, while weka local ps and weka local status report the containers on the server you are logged in to, which separates a problem on one host from one in the cluster.

Filesystems and mounts

weka fs lists filesystems with their group, SSD budget and total budget, and weka fs add NAME GROUP-NAME TOTAL-CAPACITY creates one inside a filesystem group; thin provisioning, tiering to an object store and QoS limits are options of the same command (the older action name create is still accepted). A client that has joined the cluster mounts with mount -t wekafs FS-NAME MOUNT-POINT; a stateless client names a backend, as in mount -t wekafs -o net=eth0 backend-1/my_fs /mnt/weka, and its first mount installs the client software and joins the cluster. umount /mnt/weka unmounts, and on a stateless client the last unmount also disconnects and removes the client. weka fs snapshot add FILE-SYSTEM NAME takes a snapshot, which weka fs snapshot upload FILE-SYSTEM SNAPSHOT copies to an object store bucket (Snap-To-Object). weka nfs interface-group lists the interface groups through which NFS clients reach the cluster when they do not run the WEKA client.

Statistics, users and support

weka stats reads performance statistics averaged over one-minute intervals for a chosen period and category, such as CPU, SSD or Operations; weka stats realtime shows the current values once per second. weka user lists users with their source and role, and weka user login USERNAME PASSWORD saves a login token that later commands use. For a support case, weka diags upload collects diagnostics from the cluster, uploads them to WEKA Home and prints a collection ID for the Customer Success Team; weka diags collect saves the same data on the cluster when WEKA Home cannot be reached.

Questions

Is it weka fs add or weka fs create?

Both run. The CLI documents weka fs add NAME GROUP-NAME TOTAL-CAPACITY, and create and new remain aliases of add so that older scripts keep working; remove likewise still answers to delete and destroy.

How is a failed drive replaced from the CLI?

Find it with weka cluster drive -F node=invalid -o id,uuid,host,hostname,node,status, run weka cluster drive deactivate DRIVE-UUID and weka cluster drive remove DRIVE-UUID, swap the device, add it with weka cluster drive add HOST-ID DEVICE-PATH using the old host ID, and follow the rebuild in weka status until the new drive is ACTIVE.

Where does weka user login keep the credentials?

In the home directory of the user who ran it, unless --path names a token file; pointing the WEKA_TOKEN environment variable at that file makes later commands use it. weka user logout removes the saved credentials again.

What does WEKA support need with a new case?

The output of weka diags upload: it collects diagnostics from the servers, uploads them to WEKA Home and prints a Diags collection ID to send to the Customer Success Team. Without a WEKA Home connection, weka diags collect saves the data locally so it can be shared another way.

Sources and checks

12 more source pages

Every row on this page was matched to a line in the documentation above on . A binding that could not be found there is not listed.

Found a wrong or missing key? Tell us and it gets checked against the source. How we verify describes the process and its limits.