Jeffrey
Jeffrey

Reputation: 59

Can ZFS snapshotting (or other filesystem snapshotting) restore file system memory components?

I know that ZFS snapshotting can make a copy of file system content like file content, metadata, and directory structure. But does the snapshotting include the in-kernel and in-memory components of a file system (e.g., inode cache and dentry cache)? Will the corresponding filesystem data structures like superblock, inode, dentry, file be restored exactly as before when took the snapshot? Thank you.

Upvotes: 1

Views: 95

Answers (1)

Dan
Dan

Reputation: 7737

All on-disk state at the time of the snapshot is preserved exactly the way it was when you took the snapshot. The terms "inode" and "superblock" don't have exact equivalents in ZFS, but for all intents and purposes you can assume that all internal filesystem metadata state is exactly the same as well.

The in-RAM state of the caches isn't preserved, but if you run the same read workload against the snapshot that you were doing at the time you took the snapshot, then ZFS will populate its caches in the same way since the underlying data on disk is the same.

Upvotes: 1

Related Questions