chfs
Use the chfs command to change the properties of a file system, and to add or remove disks to or from a file system.
If you use this command to both add and remove disks, disks are added first and then disks are removed. Other settings are applied after disks are added or removed. You must have Administrator authority to use this command.
Syntax
Parameters and arguments
- -user user_name
- Specifies an IBM Spectrum Control user ID.
- -pwd password
- Specifies the password for the IBM Spectrum Control user ID.
- -url url
- Specifies the Device server. The format of the URL is system:port_number, where system represents either the host name or IP address, and port_number represents the IBM Spectrum Control Device server port.
- -filesystem file_system_id
- Specifies the ID of file system to be changed.
- -adddisks disk_name
- Specifies the disks to add to the file system. The disk_name variable
contains a comma-separated list of disk names. Tip: You can verify the availability of a disk by running the lsnsd command.
- -pool pool_name
- Adds to the file system a set of free disks that have the file system pool name that is set as a
storage pool. On IBM
Storwize V7000 Unified, all disks in
the file system pool must be tagged for this file system to be used. Tip: You can list all of the disks in a storage pool by running the lsnsd command.
- -createdisks size | mdisk_grp | N=num_disks | pool=pool_name | usagetype=usage_type
- Creates disks implicitly, and then adds them to the file system. This option is applicable only
for Storwize V7000 Unified.
- size
- Specifies the size of the new disks. Size is specified as an integer with capacity up to a petabyte without a space between the size and the unit; for example 17G. Disk sizes must be specified either without suffix (byte) or with K (kilobyte), M (megabyte), G (gigabyte), T (terabyte), or P (petabyte). Values less than 512 MB are not supported. This parameter is mandatory.
- mdisk_grp
- Specifies the storage system managed disk (MDisk) group in which the underlying NAS volumes are
created. This parameter is mandatory. Tip: You can see a list of available MDisk groups by using the svcinfo lsmdiskgrp command.
- num_disks
- Specifies the number of storage system NAS volumes that is created in each MDisk group. This parameter is optional. The default number of disks is 1.
- pool
- Specifies a pool for the disks. This parameter is optional. The default value is system.
- usage_type
- Specifies the usage type for the disks. This parameter is optional. Specify one of the valid
usage types.
- dataAndMetadata
- dataOnly
- metadataOnly
- -noverify
- Specifies that disks must not be verified as belonging to an existing file system. If this option is used, either the -adddisks parameter or the -pool parameter must also be specified.
- -numInodes max_num_inodes[:num_inodes_preallocate]
- Specifies the maximum number of files for this file system. The num_inodes_preallocate variable specifies the number of inodes that the system immediately preallocates. You can specify values in thousands (k) or in millions (M). To specify values of 100 million for the max_num_inodes variable and 1 million for the num_inodes_preallocate variable, enter -numInodes 100M:1M.
- -removedisks disk_name
- Specifies the disks to remove from the file system. On IBM
Storwize V7000 Unified, this option completely removes the
specified disks and the data on them by deleting the volumes on the storage system. Tip: You can verify the availability of a disk by running the lsnsd command.
- -fs character
- Specifies the 7-bit character that separates the information in the output. If you omit this parameter, the information is separated by blank spaces.
- -header
- Suppresses the column headings in the output. If you omit this parameter, the column headings are included.
- -help | -h | -?
- Lists help information for the command.
- -qs character
- Specifies the 7-bit character that surrounds character strings and date stamps in the output. If you omit this parameter, character strings and date stamps are enclosed by double quotation marks (").
- -silent
- Suppresses all output for the command. If you omit this parameter, output is included.
Example: Change a file system
The following command changes a file system by removing a
disk.
tpctool> chfs -filesystem eefs+kq458mv.ibm+00000200A2A0153C+0
-user admin -pwd password -url localhost:9550 -removedisks IFS1319490696615
The following output is returned:
FilesystemId Status
===========================================
eefs+kq458mv.ibm+00000200A2A0153C+0 SUCCESS