Modify, create or view properties of enhanced journaled file system (JFS2) snapshots.
To Create an External Snapshot
snapshot -o snapfrom=snappedFS snapshotLV
snapshot -o snapfrom=snappedFS -o size=Size
To Create an Internal Snapshot
snapshot -o snapfrom=snappedFS -n snapshotName
To Delete an External Snapshot
snapshot -d snapshotLV
To Delete an Internal Snapshot
snapshot -d -n snapshotName snappedFS
To Query a JFS2 File System
snapshot -q [ -cfieldSeparator ] snappedFS
To Query an External Snapshot
snapshot -q [ -cfieldSeparator ] snapshotLV
To Query an Internal Snapshot
snapshot -q -n snapshotName [ -cfieldSeparator ] snappedFS
To Modify an External Snapshot
snapshot -o size=Size snapshotLV
This command provides an interface to JFS2 snapshots.
The maximum number of external snapshots per file system is 15, while the maximum number of internal snapshots per file system is 64.
You cannot have both internal snapshot and external snapshot of a file system at the same time.
Item | Description |
---|---|
-c fieldSeparator | Specifies the output from the snapshot query to be displayed in colon format. The fieldSeparator is the character to use to separate the fields of the display. |
-d | Deletes the snapshot and any previous snapshots. If the snapshot is an external snapshot, the logical volume containing the snapshot is also deleted unless you specify the -s flag. For an external snapshot, the snapshotLV parameter specifies the snapshot to delete. For an internal snapshot, the snappedFS parameter specifies the file system containing the snapshot to delete. The -n flag specifies the name of the snapshot to delete. |
-n snapshotName | Specifies the access point for the internal snapshot under the snappedFS/.snapshot/snapshotName. If you specify the -n flag when creating a snapshot, the file system specified by the snappedFS parameter must be enabled for internal snapshots. Otherwise, an error message is displayed and no snapshot is created. To enable a file system to use internal snapshots, specify the isnapshot option when you create the file system with the mkfs command (-o isnapshot={yes}) or the crfs command (-a isnapshot = {yes} ). |
-o snapfrom=snappedFS | Creates a snapshot of the file system specified by the snappedFS parameter. If the -n flag is specified, an internal snapshot is created. If the snapshotLV parameter is specified, the logic volume must already exist and must be in the same volume group as the file system specified by the snappedFS parameter. If the specified logic volume is already in use as a snapshot or a file system known to the /etc/filesystems file, the command issues an error message and fails. If the -n flag and the snapshotLV parameter are not specified, a new logical volume is created for the external snapshot. |
-o size=Size | Specifies the size of a new logical volume for an external snapshot when you specify this flag with the -o snapfrom=snappedFS flag. Otherwise, this flag increases the size of the external snapshot specified by the snapshotLV field to the value of Size. This flag is ignored if any flag other given. If the Size field is followed by an M, the value is treated as megabytes. If the Size field is followed by a G, the value is treated as gigabytes. If neither M nor G are used, the value is treated as 512-byte blocks. |
-q | Displays information about the specified
snapshot or snapshots. Specifies the following flags and options to
determine the query as needed:
|
-s | Retains the specified logical volume for the specified snapshot when the external snapshot is deleted. |
Item | Description |
---|---|
fieldSeparator | The character to use to separate the fields of the display. |
snappedFS | The JFS2 file system to act on for snapshot creation, deletion, or query. |
snapshotLV | The logical volume of the external snapshot. |
snapshot -o snapfrom=/home/janet/sb /dev/snapsb
This
command creates a snapshot for the /home/janet/sb file system
on the /dev/snapsb logical volume, which already exists. snapshot -o snapfrom=/home/janet/sb -o size=16M
This
command creates a 16-megabyte logical volume and creates a snapshot
for the /home/janet/sb file system on the newly created logical
volume.snapshot -q /home/janet/sb
This
command displays each snapshot for the /home/janet/sb file
system along with the time when the snapshot was taken, the size of
the snapshot storage object, and the remaining free space.snapshot -o size=64M /dev/snapsb
This
command increases the /dev/snapsb device to 64 megabytes along
with the snapshot contained on the device.snapshot -d /dev/snapsb
This
command deletes the snapshot contained on the /dev/snapsb device
and removes the /dev/snapsb logical volume .