File system recovery from a snapshot

File Services Administration Guide for Hitachi NAS Platform

Version
14.7.x
14.6.x
Audience
anonymous
Part Number
MK-92HNAS006-29

It is possible that, although corruption has occurred in the live file system, a good snapshot still exists. If so, it may be preferable to recover the file system from this snapshot, with some loss of data, rather than incur the downtime that might be required to fix the live file system. Recovering a file system from a snapshot restores the file system to the state that it was in when the snapshot was taken.

Recovering a file system from a snapshot makes it possible to roll back the file system to the state that it was in when a previous snapshot was taken.

File system recovery from a snapshot is a licensed feature, which requires a valid FSRS license on the server/cluster.

Note: You can recover a file system from a snapshot only when at least the configured number of preserved file system checkpoints have been taken since that snapshot was taken. For example, if a file system is configured to preserve 128 checkpoints (the default), then you can recover the file system from a snapshot only after a minimum of 128 checkpoints have been taken after the snapshot. If less than the configured number of checkpoints have been taken since the snapshot, you can either recover from an earlier snapshot or recover the file system from a checkpoint.
The following file system rollback considerations apply:
  • File system rollback can be performed even if the live file system is corrupted.
  • All snapshots are lost after the rollback.
  • Even though the file system recovery happens very quickly, no new snapshots can be taken until all previous snapshots have been discarded. The time required before a new snapshot can be taken depends on the size of the file system, not on the number of files in the file system.
Note: Once you have recovered a file system from a snapshot, and mounted it in read-write mode, you cannot undo the recovery or recover again to a different snapshot or checkpoint.

To roll back a file system from a snapshot, use the snapshot-recover-fs command. Refer to the Command Line Reference for more information about this command.

An additional tool is available to kill all current snapshots, that is the kill-snapshots command (refer to the Command Line Reference for more information about this command). snapshot-delete-all is the preferred tool for deleting all snapshots as it does not require the file system to be unmounted, no space is leaked, and it does not affect checkpoint selection.