Snapshot (computer storage)

Snapshot (computer storage)

In computer systems, a snapshot is the state of a system at a particular point in time. The term was coined as an analogy to that in photography. It can refer to an actual copy of the state of a system or to a capability provided by certain systems.

Contents

Rationale

A full backup of a large data set may take a long time to complete. On multi-tasking or multi-user systems, there may be writes to that data while it is being backed up. This prevents the backup from being atomic and introduces a version skew that may result in data corruption. For example, if a user moves a file into a directory that has already been backed up, then that file would be completely missing on the backup media, since the backup operation had already taken place before the addition of the file. Version skew may also cause corruption with files which change their size or contents underfoot while being read.

One approach to safely backing up live data is to temporarily disable write access to data during the backup, either by stopping the accessing applications or by using the locking API provided by the operating system to enforce exclusive read access. This is tolerable for low-availability systems (on desktop computers and small workgroup servers, on which regular downtime is acceptable). High-availability 24/7 systems, however, cannot bear service stoppages.

To avoid downtime, high-availability systems may instead perform the backup on a snapshot—a read-only copy of the data set frozen at a point in time—and allow applications to continue writing to their data. Most snapshot implementations are efficient and can create snapshots in O(1). In other words, the time and I/O needed to create the snapshot does not increase with the size of the data set, whereas the same for a direct backup is proportional to the size of the data set. In some systems once the initial snapshot is taken of a data set, subsequent snapshots copy the changed data only, and use a system of pointers to reference the initial snapshot. This method of pointer-based snapshots consumes less disk capacity than if the data set was repeatedly cloned.

Read-write snapshots are sometimes called branching snapshots, because they implicitly create diverging versions of their data. Aside from backups and data recovery, read-write snapshots are frequently used in virtualization, sandboxing and virtual hosting setups because of their usefulness in managing changes to large sets of files.

Implementations

Volume managers

Some Unix systems have snapshot-capable logical volume managers. These implement copy-on-write on entire block devices by copying changed blocks—just before they are to be overwritten—to other storage, thus preserving a self-consistent past image of the block device. Filesystems on this image can later be mounted as if it were on read-only media. Block-level snapshotting is almost always less space-efficient than direct file system support for snapshots.

File systems

Some file systems, such as WAFL[note 1], fossil for Plan 9 from Bell Labs or ODS-5, internally track old versions of files and make snapshots available through a special namespace. Others, like UFS2, provide an operating system API for accessing file histories. In NTFS, access to snapshots is provided by the Volume Shadow-copying Service (VSS) in Windows XP and Windows Server 2003 and Shadow Copy in Windows Vista. Snapshots have also been available in the NSS (Novell Storage Services) file system on NetWare since version 4.11, and more recently on Linux platforms in the Open Enterprise Server product.

On Linux, the Btrfs and OCFS2 file systems support creating snapshots (cloning) of individual files. Additionally, Btrfs also supports the creation of snapshots of subvolumes.

Sun Microsystems ZFS has a hybrid implementation which tracks read-write snapshots at the block level, but makes branched file sets nameable to user applications as "clones".

Time Machine, included in Apple's Mac OS X v10.5 operating system, is not a snapshotting scheme but a system-level incremental backup service: it merely watches mounted volumes for changes and copies changed files periodically to a specially-designated volume using hard links.

In databases

The SQL specification mandates four levels of transaction isolation. In the highest, SERIALIZABLE, a snapshot is implicitly created at the start of every transaction. The backup utilities for many popular SQL databases use this feature to generate self-consistent dumps of table data.

In virtualization

System emulators host a guest operating system in a virtual machine; some (including VMware, VirtualBox, Parallels Desktop, Qemu and Virtual PC) can perform whole-system snapshots by dumping the entire machine state to a backing file and redirecting future guest writes to a second file, which then acts as a copy-on-write table.

Other applications

Software transactional memory is a scheme which applies the same concepts to data structures held only in memory.

See also

Notes

  1. ^ WAFL is not a file system. WAFL is a file layout that provides mechanisms that enable a variety of file systems and technologies that want to access disk blocks.

External links


Wikimedia Foundation. 2010.

Игры ⚽ Поможем решить контрольную работу

Look at other dictionaries:

  • Snapshot (computer storage) — Снимок файловой системы или снапшот  моментальный снимок, копия файлов и директорий файловой системы на определённый момент времени. Содержание 1 Описание 2 Реализация 2.1 Управление томами …   Википедия

  • Snapshot — may refer to:* Snap shot, a shot from a firearm that is aimed and fired quickly * Snapshot (photography), a photograph that is taken in a short moment of opportunity * Snap shot (ice hockey), a shot type in Ice hockey * Snapshot algorithm, a… …   Wikipedia

  • computer — computerlike, adj. /keuhm pyooh teuhr/, n. 1. Also called processor. an electronic device designed to accept data, perform prescribed mathematical and logical operations at high speed, and display the results of these operations. Cf. analog… …   Universalium

  • Nintendo DS storage devices — Main article: Nintendo DS accessories The internals of an Acekard 2.1 DS flashcart shown below to a quarter and Micro SD card. Nintendo DS storage devices are some of the devices used to store a licensed developer s work in progress images,… …   Wikipedia

  • Object storage device — An Object based Storage Device (OSD) is a computer storage device, similar to disk storage but working at a higher level. Instead of providing a block oriented interface that reads and writes fixed sized blocks of data, an OSD organizes data into …   Wikipedia

  • List of computer technology code names — Following is a list of code names that have been used to identify computer hardware and software products while in development. In some cases, the code name became the completed product s name, but most of these code names are no longer used once …   Wikipedia

  • NetApp filer — In computer storage, NetApp filer, known also as NetApp Fabric Attached Storage (FAS), or NetApp s network attached storage (NAS) device are NetApp s offering in the area of Storage Systems. A FAS functions in an enterprise class Storage area… …   Wikipedia

  • List of file systems — The following lists identify, characterize and link to more thorough information on computer file systems.Many older operating systems support only their one native file system, which does not bear any name apart from the name of the operating… …   Wikipedia

  • NetApp — NetApp, Inc. Type Public Traded as NASDAQ: NTAP …   Wikipedia

  • Openfiler — Screenshot of Openfiler installer Developer(s) Openfiler Stable release …   Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”