vxfilesnap - makes a copy-on-write copy of a file in a VxFS file system
vxfilesnap [ -f ] [ -i ] [ -p ] source_file destination_file
vxfilesnap [ -f ] [ -i ] [ -p ] [ source_file | source_directory ] ... destination_directory
The vxfilesnap command quickly produces a copy of a file or files with copy-on-write behavior. This means that the same disk space is shared by the source and target files, but any updates to either file cause any affected disk space to become private to the affected file.
The vxfilesnap commnd always follows symbolic links and works on the files pointed to by symbolic links.
In the first case, the source must be a regular file or a symbolic link to a regular file, while the destination must be non-existent or must be a regular file or a symbolic link to a regular file. The vxfilesnap command makes an existing file into a copy of the source, replacing any existing blocks and data.
In the second case, the sources can be either regular files or directories, or symbolic links to regular files or directories. If the destination directory already contains a file with the same name as a source file, vxfilesnap overwrites the file as in the first case. The vxfilesnap command lists a source directory, and copies each file found into the destination directory.
You can invoke vxfilesnap from any node in a cluster.
The vxfilesnap command clears any existing reservation or other extent-related settings on an existing file used as a destination.
The vxfilesnap command does not copy any extra metadata, such as named streams, access control lists, or allocation policies. These data types are left intact on existing files or created as normal for new files for any files created by this command.
The destination file initially shares all blocks with the corresponding source file, including any indirect blocks. Any modification to either file causes the affected data or metadata blocks to be copied to newly allocated blocks, which will be used to store the new content. This can lead to extra fragmentation as compared to a normal copy into newly allocated blocks.
You can use the fsadm command to display statistics related to the amount of extent sharing on an individual mount point.
Some aspects of the copy-on-write for shared blocks can be controlled with tunable settings.
A Storage Foundation Enterprise, Storage Foundation Cluster File System, or Storage Foundation for Oracle RAC license is required to enable this command.
The vxfilesnap command is not supported on file system Storage Checkpoints.
The vxfilesnap command operates only on file systems using disk layout Version 8 and later.
-f Removes the file and tries again if the vxfilesnap command cannot open an existing destination file. -i Prompts you before overwriting an existing destination file. -p Preserves the mode, ownership, and timestamp of the source file by setting these attributes of the destination file to the same values.
setext(1), fsadm_vxfs(1M), mkfs_vxfs(1M), vxtunefs(1M), vxupgrade(1M)