File Systems
title: "Filesystems"
description: CLI commands for managing filesystems
date: 2022-11-27T22:06:20+00:00
published: 2022-11-23T19:17:46+00:00
weight: 58
A logical volume provides storage that can be used in different ways. For example, you can use a logical volume to create block-level, object-level, or file-level storage.
Adding filesystems
Filesystems are required for NAS and Object storage. To add a filesystem for volumes, use the applications filesystems add command.
Usage
applications filesystems add --application=<name> --volumes=<name…> [--profile=<name>] [--addReplicationMetadata]
Note:
- Each volume can have at most one filesystem. You do not need to add a filesystem for a volume that will be used as block storage. Instead, the application formats the block device as needed. For example, when you create a VMWare datastore on a StorONE block volume, it will format it as VMFS.
- If you specify multiple volumes, the
applications filesystems addcommand creates a filesystem on each volume.
Options
| Options and arguments | Description |
|---|---|
--application=<name> |
The application instance containing the volumes that you want to create filesystems on. Replace <name> with the name of the application instance. |
--volumes=<name…> |
The volumes where you want to add the filesystems. Replace <name…> with the names of one or more existing volumes. |
--profile=<name> |
The profile mode for the filesystem. Replace <name> with either ordered or journal. |
--addReplicationMetadata |
Adds replication metadata to the filesystems. This option prevents disruptions when starting replication. |
Examples
-
To create three new filesystems on volumes
vol1,vol2, andvol3( all within thesalesapplication) with anorderedprofile, run:applications filesystem create --application sales --volumes vol1 vol2 vol3 --profile ordered -
To create three new filesystem on volumes
vol1,vol2, andvol3(in thesalesapplication) with ajournalprofile and with replication metadata, run:applications filesystem create --application sales --volumes vol1 vol2 vol3 --profile ordered --addReplicationMetadata
List filesystems
To list filesystem information for volumes, use the applications filesystems list command.
Usage
applications filesystems list [--application=<name> --volume=<name>]
Options
| Options and arguments | Description |
|---|---|
--application=<name> |
The application containing the volume. Replace name with the name of the application instance. |
--volume=<name> |
The volume name. The command output will be limited to the specified volume. Replace <name> with the name of the volume. |
Examples
- To list filesystem information for all volumes, run:
applications filesystems list - To list filesystem information for all volumes in the
salesapplication, run:applications filesystems list --application sales - To list filesystem information for the
pricingvolume in thesalesapplication, run:applications filesystems list --application sales --volume pricing
Edit a filesystem
To add replication metadata to volumes that contain filesystems, use the applications filesystems edit command.
Note: You can only add replication metadata to a volume that has a filesystem. Adding replication metadata to a volume is irreversible. After you add replication metadata to a volume, you cannot remove it.
Usage
applications filesystems edit --application=<name> --volume=<name> --addReplicationMetadata [--force]
Options
| Options and arguments | Description |
|---|---|
--application=<name> |
The application containing the volume. Replace <name> with the name of the application instance. |
--volumes=<name> |
The volume that you want to add replication metadata to. Replace <name> with the name of the volume. |
--addReplicationMetadata |
Add replication metadata to the filesystem. This option prevents disruptions when starting replication. |
--force |
Submits the command immediately without prompting for confirmation. |
Examples
-
To add replication metadata to a filesystem on volume
vol1, wherevol1is in application instancesales, run:applications filesystem edit --application sales --volumes vol1 --addReplicationMetadata
Run fstrim (reclaim discarded blocks)
To reclaim discarded blocks (that have been deleted and are no longer used by the filesystem), use the applications filesystems fstrim run command. This is similar to the Linux fstrim utility.
Usage
applications filesystems fstrim run --application=<name> --volume=<vol_name>
Options
| Options and arguments | Description |
|---|---|
--application=<name> |
The application containing the volume you want to run fstrim on. Replace <name> with the name of the application instance. |
--volume=<vol_name> |
The volume you want to trim. Replace <vol_name> with the name of the volume. |
Example
-
To trim volume
vol1mapped to application instancesales, runapplications filesystems fstrim run --application sales --volume vol1
Check fstrim status
To check the fstrim status, use the applications filesystems fstrim status command.
Usage
applications filesystems fstrim status [--application=<name> --volume=<vol_name>]
Options
| Options and arguments | Description |
|---|---|
--application=<name> |
The application containing the volume where fstrim is running. Replace <name> with the name of the application. |
--volume=<vol_name> |
The volume where fstrim is running. Replace <vol_name> with the name of the volume. |
Examples
-
To check the
fstrimstatus of all volumes, run:applications filesystems fstrim status -
To check the
fstrimstatus on volumevol1within thesalesapplication, run:applications filesystems fstrim status --application sales --volume vol1