Moves one or more files from the current
storage pool to a different, specified storage pool. You can also use this
command to defragment a file rather than move it by specifying the same storage
pool as its current storage pool.

>>-mvfile--+--------+--+-----+-- -pool--pool_name--------------->
+- -?----+ '- -f-'
+- -h----+
'- -help-'
.---------------.
V |
>-- -client--client_name----+-file path-+-+--------------------><
'- ---------'
Parameters
- –? | –h | –help
- Displays a detailed description of this command, including syntax, parameter
descriptions, and examples. If you specify a help option, all other command
options are ignored.
- –f
- Forces the metadata server to move the file even if the file is open (being accessed by a client).
- –pool pool_name
- Specifies the name of the storage pool to which to move the file. To defragment
a file, rather than move it, specify the file's current storage pool.
- –client client_name
- Specifies the name of a SAN File System client to perform the move or
defragment of the file.
To move a file, you must specify a client that meets
the following conditions:
- The client must have access to the volumes contained in the current and
target storage pools. To list all active clients that can access a volume,
use the reportclient –vol command. To list the volumes
in a storage pool, use the lsvol –pool command.
- The client must be active and appear in the registered (active) client
list.
- path
- Specifies the fully qualified names of one or more files to move or defragment.
A fully qualified name means the full directory path, for example, cluster-name/fileset-name/filename or cluster-name/file-name. This parameter does not support wildcard characters in directory
or file names.
- –
- Specifies that in single-shot command mode you want this
command to receive from the input stream (stdin) the names of one or
more files to move or defragment.
Prerequisites
You
must have Operator or Administrator privileges to use the command.
You
must be logged in to the operating system on the engine hosting the
master metadata server to run this command.
Description
This
command moves a file and its FlashCopy® images from one storage pool to another. It also redistributes the file across the volumes in the target
storage pool based on the space available in the volumes.
Forcing
an open file to move, using the –f parameter, has the following effect:
- If an application has opened or attempts to open a file in read mode,
the application can continue to access the file while the move proceeds.
- If an application has opened or attempts to open the file in write or
exclusive mode, any data I/O calls that the application makes against the
file are delayed until the move completes.
You cannot use the mvfile command while the mkimage, rmimage,
and reverttoimage commands are in progress on the fileset that contains
the file that you want to move.
Example
Move a file The following example moves the
/sanfs/file01 file to a different storage pool named fast:
sfscli> mvfile -pool fast -client client03 /sanfs/file01