You can make a point-in-time image of a JFS2 file system that you can then use for backup purposes.
- Access the files or directories as they existed when the snapshot was taken.
- Backup to removable media.
There are two types of JFS2 snapshots: internal and external. A JFS2 external snapshot is created in a separate logical volume from the file system. The external snapshot can be mounted separately from the file system at its own unique mount point.
A JFS2 internal snapshot is created in the same logical volume as the file system and allocates blocks from the file system. An internal snapshot is accessible from the invisible .snapshot directory in the root of the JFS2 file system with the snapshot. A JFS2 file system must be enabled to support internal snapshots at the time the file system is created.
JFS2 snapshots do not support checking of file system quotas. You cannot use the repquota command on the snapshot to determine the state of the quota. The point-in-time quota information is preserved if you roll back the file system image to the snapshot image. Note the following considerations specific to JFS2 external snapshots and JFS2 internal snapshots:
- An external snapshot that is created or accessed on an AIX® 5.2 with 5200-01 system cannot be accessed on an AIX 5.2 system. These snapshots must be deleted before the file system can be mounted.
- A JFS2 file system that has a snapshot on AIX 5.3 cannot be accessed on any releases prior to AIX 5.2 with 5200-01. If the system is to be moved back, the snapshots must be deleted first to allow file system access.
- Running the defragfs command against a JFS2 file system with external snapshots is not recommended because every block that is moved during defragmentation must also be copied to the snapshot, which is both time consuming and a waste of space in the snapshot logical volume.
- If an external snapshot runs out of space, or if an external snapshot fails, all external snapshots for that snappedFS are marked invalid. Further access to the snapshot will fail. These failures write an entry to the error log.
- Internal snapshots are preserved when the logredo command runs on a JFS2 file system with an internal snapshot.
- Internal snapshots are removed if the fsck command has to modify a JFS2 file system to repair it.
- If an internal snapshot runs out of space, or if a write to an internal snapshot fails, all internal snapshots for that snappedFS are marked invalid. Further access to the internal snapshots will fail. These failures write an entry to the error log.
- Internal snapshots are not separately mountable. You can access internal snapshots in the .snapshot directory of the root of the file system immediately after they are created. Consequently, you can access internal snapshots through an NFS server without having to export a separate mount point for the snapshot.
- Internal snapshots are not compatible with AIX releases prior to AIX 6.1. A JFS2 file system created to support internal snapshots cannot be modified on an earlier release of AIX.
- A JFS2 file system created to support internal snapshots is also enabled to support Extended Attributes Version 2.
- A JFS2 file system with internal snapshots cannot be used with a Data Management Application Programming Interface (DMAPI).
- You cannot use the defragfs command against a JFS2 file system with internal snapshots.
- The .snapshot directory is not returned from the readdir() system call. This prevents unintended visiting of the snapshots. Any system calls or commands that depend on the readdir() system call fail with the .snapshot directory (for example, the /bin/pwd command and the getcwd() system call of the .snapshot directory cannot find the parent directory).