Virtual file system

From Wikipedia, the free encyclopedia

Jump to: navigation, search

A virtual file system (VFS) or virtual filesystem switch is an abstraction layer on top of a more concrete file system. The purpose of a VFS is to allow client applications to access different types of concrete file systems in a uniform way. A VFS can, for example, be used to access local and network storage devices transparently without the client application noticing the difference. It can be used to bridge the differences in Windows, Mac OS and Unix filesystems, so that applications can access files on local file systems of those types without having to know what type of file system they're accessing.

A VFS specifies an interface (or a "contract") between the kernel and a concrete file system. Therefore, it is easy to add support for new file system types to the kernel simply by fulfilling the contract. The terms of the contract might change incompatibly from release to release, which would require that concrete file system support be recompiled, and possibly modified before recompilation, to allow it to work with a new release of the operating system; or the supplier of the operating system might make only backward-compatible changes to the contract, so that concrete file system support built for a given release of the operating system would work with future versions of the operating system.

Contents

[edit] Implementations

One of the first virtual file system mechanisms in Unix-like systems was introduced by Sun Microsystems in SunOS 2.0 in 1985. It allowed UNIX system calls to access local UFS file systems and remote NFS file systems transparently. For this reason, UNIX vendors who licensed the NFS code from Sun often copied the design of Sun's VFS. Other file systems could be plugged into it as well: there was an implementation of the MS-DOS FAT file system developed at Sun that plugged into the SunOS VFS, although it wasn't shipped as a product until SunOS 4.1. The SunOS implementation was the basis of the VFS mechanism in System V Release 4.

John Heidemann developed a stacking VFS under SunOS 4.0 for the experimental Ficus file system. This design provided for code reuse among file system types with differing but similar semantics (e.g., an encrypting file system could reuse all of the naming and storage-management code of a non-encrypting file system). Heidemann adapted this work for use in 4.4BSD as a part of his thesis research; descendants of this code underpin the file system implementations in modern BSD derivatives including Mac OS X.

Other Unix virtual file systems include the File System Switch in System V Release 3, the Generic File System in Ultrix, and the VFS in Linux. In OS/2 and Microsoft Windows, the virtual file system mechanism is called the Installable File System.

The Filesystem in Userspace (FUSE) mechanism allows userland code to plug into the virtual file system mechanism in Linux, FreeBSD, OpenSolaris, and Mac OS X.

In Microsoft Windows, virtual filesystems can also be implemented through userland Shell namespace extensions; however, they do not support the lowest-level file system access application programming interfaces in Windows, so not all applications will be able to access file systems that implemented as namespace extensions.. KIO and the GNOME VFS provide similar mechanisms in the KDE and GNOME desktop environments, with similar limitations, although they can be made to use FUSE techniques and therefore integrate smoothly into the system.

[edit] Single-file virtual file systems

Some virtual file systems are implemented in such a way that the illusion of a file system can be created by using access to a single file on the underlying file system. The primary benefit to this type of implementation is that it is centralized and easy to remove. A single-file virtual file system may include all the basic features expected of any file system (virtual or otherwise), but access to the internal structure of these file systems is often limited to programs specifically written to make use of the single-file virtual file system (instead of implementation through a driver allowing universal access). Another major drawback is that performance is relatively low when compared to other virtual file systems. Low performance is mostly due to the cost of shuffling virtual files when data is written or deleted from the virtual file system.

[edit] Implementation of single-file virtual filesystems

Direct examples of the implementation of method of single-file virtual file systems could be spotted into various emulators, both ancient like PCTask, actual ones like WinUAE, and modern ones like VMWare which encapsulated not only simply the filesystems into a single-file, but stores into single files even entire emulated machines and their hardware configurations complete of emulated hard disks, partitions, filesystems and stored data.

[edit] PCTask

One of the first ones to support virtual file systems was used by Amiga emulator PCTask which emulated an Intel PC 8088 based machine clocked at 4.77MHz, and it evolved to emulate an entire 80486SX clocked at 25MHz (or more) on accelerated Amigas. Users of PCTask could create a file of big dimensions into the Amiga filesystem, and internally this file will be virtually accessed from the emulator as it was a real PC Hard Disk. This file can also receive virtual formatting with PC filesystem FAT16 to store normal MS-DOS or Windows system files[1][2].

[edit] WinUAE

Another implementation of this method are the Amiga virtual hard disks created by emulator UAE, and widely used in its main used version WinUAE for Windows OS. Users can create a large file in the Windows filesystem, just as like the method inherited from PCTask and internally this file will be virtually accessed as it will be a real Amiga Hard Disk. In WinUAE this file is called a hardfile.[3]

In alternative UAE can create a normal directory in the main filesystem used on the host machine (Windows, Linux, MacOS, AmigaOS) with its command Add Directory and store quite normally any single Amiga files as this directory will be seen by the emulated machine as a normal Amiga Hard Disk.[4]

[edit] VMWare

VMWare emulates virtual PC Intel X86 machines. Each virtual machine can access hard disk partitions of its own, any partition with its filesystem. The Virtual Machine Arbitration System internal to VMWare assigns any partition to any emulated virtual machine.

Even if it seems that any emulated machine has a hard disk partition of its own, so it is impossible in this situation to deal with single-file virtual filesystems, it is important to remember the Encapsulation feature of VMWare. When enabling encapsulation, then a virtual machine becomes essentially a software container that bundles or "encapsulates" a complete set of virtual hardware resources, as well as an operating system and all its applications, inside a single software package. this feature makes virtual machines incredibly portable and easy to manage.

For example, the users can move and copy a virtual machine from one location to another just like any other software file, or even save a virtual machine on any standard data storage medium, from a pocket-sized USB flash memory card to any enterprise storage area networks (SANs).[5][6]

[edit] See also

  • 9P - Distributed file system protocol that maps directly to the Plan 9 from Bell Labs VFS layer making all file system access network transparent.
  • Toronto Virtual File System, a VFS for OS/2 developed by IBM Toronto that allows mounting diverse filesystems under a common structure.

[edit] Notes

  1. ^ Emulation on Amiga Comparison between PCX and PCTask, Amiga PC emulators.
  2. ^ See also This article explaining how it works PCTask.
  3. ^ Help About WinUAE (See Hardfile section).
  4. ^ Help About WinUAE (See Add Directory section)
  5. ^ VMWare FAQs
  6. ^ VMWare: Overview into Virtual Machines

[edit] References

[edit] External links

de:Virtuelles Dateisystem es:Sistema de archivos virtual fr:Système de fichiers virtuel ko:가상 파일 시스템 it:Virtual file system ja:Virtual File System pl:Wirtualny system plików pt:Sistema de arquivos virtual

Views
Personal tools

Toolbox