mmdelfileset command

Deletes a GPFS fileset.

Synopsis

mmdelfileset Device FilesetName [-f] [--pit-continues-on-error] [--qos QosClass]

Availability

Available on all IBM Storage Scale editions.

Description

The mmdelfileset command deletes a GPFS fileset. When deleting a fileset, consider these points:
  • The root fileset cannot be deleted.
  • A fileset that is not empty cannot be deleted unless the -f flag is specified.
    Remember: If you use the -f flag, make sure that you remove all NFS exports defined on or inside the junction path of the fileset before you delete it. If you do not remove those exports before you delete the fileset, you might experience unexpected errors or issues when you create new filesets and exports.
  • A fileset that is currently linked into the namespace cannot be deleted until it is unlinked with the mmunlinkfileset command.
  • A dependent fileset can be deleted at any time.
  • An independent fileset cannot be deleted if it has any dependent filesets or fileset snapshots.
  • Deleting a dependent fileset that is included in a fileset or global snapshot removes it from the active file system, but it remains part of the file system in a deleted state.
  • Deleting an independent fileset that is included in any global snapshots removes it from the active file system, but it remains part of the file system in a deleted state.
  • A fileset in the deleted state is displayed in the mmlsfileset output with the fileset name in parenthesis. If the -L flag is specified, the latest including snapshot is also displayed. The --deleted option of the mmlsfileset command can be used to display only deleted filesets.
  • The contents of a deleted fileset are still available in the snapshot, through some path name containing a .snapshots component, because it was saved when the snapshot was created.
  • When the last snapshot that includes the fileset has been deleted, the fileset is fully removed from the file system.

For information on GPFS filesets, see Information Lifecycle Management for GPFS.

Parameters

Device
The device name of the file system that contains the fileset.

File system names need not be fully-qualified. fs0 is as acceptable as /dev/fs0.

FilesetName
Specifies the name of the fileset to be deleted.
-f
Forces the deletion of the fileset. All fileset contents are deleted. Any child filesets are first unlinked.
--pit-continues-on-error
Allows the mmdelfileset command to continue removing the remaining files, if errors are encountered in the parallel inode traverse (PIT) phase that performs the user file deletion. An output file is generated if an error occurs during the user file deletion. The location of the file that logs the errors is displayed in the command output.
Note:
  • The mmdelfileset command continues to run only if the error is reported in the PIT phase of the command execution. If the error is reported in other phases of command execution, the command stops running.
  • The --pit-continues-on-error option works only if the minimum release level of the IBM Storage Scale cluster is 5.1.1 or later.

The --pit-continues-on-error option allows the command to skip fatal errors encountered during the PIT phase and continue with the file system scan. If fatal errors are encountered, the command fails at the end of the scan and generates an output file that lists all the problematic files that had the fatal errors. Based on such output file, users can take additional actions to handle these problematic files before rerunning the command.

If --pit-continues-on-error is not used, the command run fails if a fatal error is encountered. Any error that is not included in the next table is considered as a fatal error.

Table 1. Non-fatal errors that can be encountered during the PIT phase
Non-fatal error Code Description
E_COMPRESS_NOT_ALLOWED 840 File compression is not allowed.
E_COMPRESS_HYPERALLOC 799 Compression of a file in hyperalloc mode is not allowed.
E_NOREPLGRP 219 Not enough replicas could be created because the desired degree of replication is larger than the number of failure groups.
E_NOREPLSPC 220 Not enough replicas could be created because there was not enough space left in one of the failure groups.
E_NOBALSPC 221 There was not enough space left on one of the disks to properly balance the file according to the current stripe method.
E_NOBALAVAIL 222 The file could not be properly balanced because one or more disks are unavailable.
E_ADDR_BROKEN 226 All replicas were on disks that have since been deleted from the stripe group.
E_ALL_UNAVAIL 218 A replicated read or write failed because none of the replicas were available.
E_ENC_CTX_NOT_READY 786 Encryption context is not ready.
--qos QosClass
Specifies the Quality of Service for I/O operations (QoS) class to which the instance of the command is assigned. If you do not specify this parameter, the instance of the command is assigned by default to the maintenance QoS class. This parameter has no effect unless the QoS service is enabled. For more information, see the topic mmchqos command. Specify one of the following QoS classes:
maintenance
This QoS class is typically configured to have a smaller share of file system IOPS. Use this class for I/O-intensive, potentially long-running IBM Storage Scale commands, so that they contribute less to reducing overall file system performance.
other
This QoS class is typically configured to have a larger share of file system IOPS. Use this class for administration commands that are not I/O-intensive.
For more information, see Setting the Quality of Service for I/O operations.

Exit status

0
Successful completion.
nonzero
A failure has occurred.

Security

You must have root authority to run the mmdelfileset command.

The node on which the command is issued must be able to execute remote shell commands on any other node in the cluster without the use of a password and without producing any extraneous messages. For more information, see Requirements for administering a GPFS file system.

Examples

  1. This sequence of commands illustrates what happens when attempting to delete a fileset that is linked.
    1. Command:
      mmlsfileset gpfs1
      The system displays output similar to:
      Filesets in file system 'gpfs1':
      Name                     Status      Path 
      root                     Linked      /gpfs1
      fset1                    Linked      /gpfs1/fset1 
      fset2                    Unlinked --            
    2. Command:
      mmdelfileset gpfs1 fset1
      The system displays output similar to:
      Fileset fset1 must be unlinked to be deleted.
    3. Command:
      mmdelfileset gpfs1 fset2
      The system displays output similar to:
      Checking fileset ...
      Checking fileset complete.
      Deleting fileset ...
      Fileset 'fset2' deleted.
    4. To confirm the change, issue this command:
      mmlsfileset gpfs1
      The system displays output similar to:
      Filesets in file system 'gpfs1':
      Name                     Status    Path  
      root                     Linked    /gpfs1
      fset1                    Linked    /gpfs1/fset1 
  2. This sequence of commands illustrates what happens when attempting to delete a fileset that contains user files.
    1. Command:
      mmlsfileset gpfs1
      The system displays output similar to:
      Filesets in file system 'gpfs1':
      Name                     Status    Path  
      root                     Linked    /gpfs1
      fset1                    Linked    /gpfs1/fset1  
      fset2                    Unlinked  --           
    2. Command:
      mmdelfileset gpfs1 fset2
      The system displays output similar to:
      Fileset 'fset2' contains user files,
      but can be deleted with the "-f" option.           
    3. Command:
      mmdelfileset gpfs1 fset2 -f
      The system displays output similar to:
      Checking fileset ...
      Checking fileset complete.
      Deleting user files ...
      100.00 % complete on Wed Feb 15 11:38:05 2012
      Deleting fileset ...
      Fileset 'fset2' deleted.
    4. To confirm the change, issue this command:
      mmlsfileset gpfs1
      The system displays output similar to:
      Filesets in file system 'gpfs1':
      Name                     Status    Path   
      root                     Linked    /gpfs1
      fset1                    Linked    /gpfs1/fset1           
  3. This command illustrates what happens when attempting to delete a fileset that contains user files fails, and the --pit-continues-on-error parameter is enabled.
    mmdelfileset foofs fs1 --pit-continues-on-error -f
    The system displays output similar to:
    Checking fileset ...
       Checking fileset complete.
       Deleting user files ...
        100.00 % complete on Mon Feb 22 02:58:46 2021  (    100352 inodes with total        784 MB data processed)
       Check file '/var/mmfs/tmp/foofs.pit.interestingInodes.8589934595' on yuanzhcIO02 for inodes with broken disk addresses or failures.
       mmdelfileset: Command failed. Examine previous error messages to determine cause.

See also

Location

/usr/lpp/mmfs/bin