Skip to content

Volume Analysis and Search

analyze.flexfs and find.flexfs query the metadata server directly, providing fast volume-wide analysis without traversing the FUSE layer. Both tools work with Enterprise and Community editions.

Both tools query the metadata server, which requires a volume token carrying the admin flag. Store one per volume, once per user:

Terminal window
analyze.flexfs init creds --adminAddr admin.example.com:443
find.flexfs init creds --adminAddr admin.example.com:443

Each command prompts for the token and confirms with the admin server that it allows reporting queries. See Volume Tokens for how to obtain one.

If credentials have not been stored for a tool, it falls back to the ones mount.flexfs uses for the same volume and the same user. Credentials files must be readable only by their owner (chmod 600).

Identify the most expensive files in a volume:

Terminal window
analyze.flexfs files --orderBy cost --limit 5 /mnt/flexfs

Default output is tab-separated, suitable for scripting:

path size size_bin cost
/data/genome/sample1.bam 52428800000 62 15.23
/data/genome/sample2.bam 48318382080 61 14.02

Use --friendly for human-readable output with aligned columns, readable sizes, dollar costs, and how recently each file was used:

Terminal window
analyze.flexfs files --friendly --orderBy cost --limit 5 /mnt/flexfs
path size cost last_active
/mnt/flexfs/data/genome/sample1.bam 48.83 GiB $15.23 [1860, 1890) days ago (bin 62)
/mnt/flexfs/data/genome/sample2.bam 45.00 GiB $14.02 [1830, 1860) days ago (bin 61)
/mnt/flexfs/data/genome/reference.fa 3.00 GiB $1.50 [120, 150) days ago (bin 4)
/mnt/flexfs/data/logs/pipeline.log 100.00 MiB $0.05 < 30 days ago (bin 0)
/mnt/flexfs/data/tmp/scratch.dat 10.00 GiB $1.12 [1350, 1380) days ago (bin 45)

See which directories consume the most storage:

Terminal window
analyze.flexfs folders --maxDepth 2 /mnt/flexfs

With --friendly, folders are rendered as an ASCII directory tree:

Terminal window
analyze.flexfs folders --friendly --maxDepth 2 /mnt/flexfs
path size cost
/mnt/flexfs 62.83 GiB $17.69
├── data 52.83 GiB $16.52
│ ├── genome 51.83 GiB $16.02
│ └── logs 100.00 MiB $0.05
└── scratch 10.00 GiB $1.17

Identify which users are consuming the most space:

Terminal window
analyze.flexfs users --orderBy size /mnt/flexfs

Output includes UID, resolved username, size, and cost. With --friendly:

Terminal window
analyze.flexfs users --friendly --orderBy size /mnt/flexfs
uid user size cost
1001 alice 48.83 GiB $15.23
1002 bob 10.00 GiB $1.12
0 root 100.00 MiB $0.05

All analyze.flexfs subcommands can report on a volume that is not mounted locally:

Terminal window
analyze.flexfs files --volume <volume-name> --orderBy size --limit 50 /data

--volume takes the volume’s name and selects the credentials to use. The admin server address is read from those credentials, and is used to find the metadata server holding the volume — so once init creds has run, the volume name is all that is needed.

If the admin server moves, re-run init creds --adminAddr <admin-host:port> --force to record the new address.

Write results to a file:

Terminal window
analyze.flexfs files --outputFile /tmp/top-files.tsv /mnt/flexfs
Terminal window
find.flexfs --name '*.bam' --type f /mnt/flexfs
Terminal window
find.flexfs --minSize 1073741824 --type f --fields path,size,cost --header /mnt/flexfs
Terminal window
find.flexfs --uid 1001 --type f --fields path,size,uid /mnt/flexfs

Find files not accessed since a specific timestamp (seconds since epoch):

Terminal window
# Files not accessed since 2025-01-01 (1735689600 = 2025-01-01T00:00:00Z)
find.flexfs --maxAtime 1735689600 --type f /mnt/flexfs
Terminal window
find.flexfs --type d --empty /mnt/flexfs

The --perm and --permMask flags filter by permission bits using the logic (mode & permMask) == perm. Values are always interpreted as octal, with or without a leading 0 (755 and 0755 are equivalent); the maximum is 07777. Without --permMask, the default mask is 0777 (owner/group/other), so --perm performs an exact match on all rwxrwxrwx bits.

Find files with exact permissions rwxrwxrwx:

Terminal window
find.flexfs --perm 0777 --type f --fields path,perm /mnt/flexfs

Use --permMask to test only specific bits. The mask selects which bits to compare, and --perm specifies the expected value of those bits:

Terminal window
# Files that are world-writable (other-write bit set)
find.flexfs --perm 02 --permMask 02 --type f /mnt/flexfs
# Files that are group-executable (group-execute bit set)
find.flexfs --perm 010 --permMask 010 --type f /mnt/flexfs
# Files with setuid bit set (requires testing beyond the default 0777 mask)
find.flexfs --perm 04000 --permMask 04000 --type f /mnt/flexfs
# Files that are not readable by others (other-read bit unset)
find.flexfs --perm 0 --permMask 04 --type f /mnt/flexfs

Export all files with all metadata fields:

Terminal window
find.flexfs --fields all --header --type f \
--outputFile /tmp/full-inventory.tsv /mnt/flexfs

Like analyze.flexfs, find.flexfs can search a volume that is not mounted locally:

Terminal window
find.flexfs --volume <volume-name> --name '*.log' --type f /

The find.flexfs tool supports this field set for --fields:

FieldDescription
pathFile path (default)
inoInode number
modeRaw mode bits
typeInode type (f, d, l, p, s, b, c)
permPermission bits (octal)
blocksBlock count
sizeSize in bytes
size_binActivity-based bin (0 = read or written within the last 30 days, 1 = 30-60 days ago, up to 127). Driven by data I/O, so listing or touching a file does not affect it. It is a billing tier rather than a precise last-I/O timestamp. See Size Bin.
costEstimated monthly storage cost in US dollars ($/month). Computed as (effective_size / 1 GiB) * rate, where effective_size is capped at the allocated block size for sparse files, and rate is an activity-based tiered $/GiB/month rate determined by the file’s size_bin. See cost field details.
nlinkHard link count
uidOwner user ID
gidOwner group ID
ctimeChange time (seconds since epoch)
mtimeModification time (seconds since epoch)
atimeAccess time (seconds since epoch)
btimeBirth (creation) time (seconds since epoch)
xattrsExtended attributes
  • Cost optimization: Use analyze.flexfs files --orderBy cost to find the most expensive files and schedule archival or deletion. Cost reflects activity-based tiered pricing, so cold data may already carry a lower rate — focus on large hot files for the biggest savings.
  • Compliance auditing: Use find.flexfs --fields all --header to generate a complete filesystem inventory.
  • Stale data identification: Use find.flexfs --maxAtime <cutoff> to find files not accessed within a retention window.
  • Permissions audit: Use find.flexfs --perm --permMask to find files with overly permissive access.
  • Capacity planning: Use analyze.flexfs folders --maxDepth 3 to understand storage distribution across the directory tree.