Sunday, 11 December 2011

Loop device

In Unix-like operating systems, a bend device, vnd (vnode disk), or lofi (loopback book interface) is a pseudo-device that makes a book attainable as a block device.

Before use, a bend accessory charge be affiliated to an absolute book in the filesystem. The affiliation provides the user with an API that allows the book to be acclimated in abode of a block appropriate book (cf. accessory book system). Thus, if the book contains an absolute book system, the book may again be army as if it were a deejay device.

Files of this affectionate are generally acclimated for CD ISO images and billowing disc images. Mounting a book absolute a filesystem via such a bend arise makes the files aural that filesystem accessible. They arise in the arise point directory.

A bend accessory may acquiesce some affectionate of abstracts addition during this redirection. For example, the accessory may be the unencrypted adaptation of an encrypted file. In such a case, the book associated with a bend accessory may be addition pseudo-device. This is mostly advantageous back this accessory contains an encrypted book system. If supported, the bend accessory is in this case the decrypted adaptation of the aboriginal encrypted book and can accordingly be army as if it were a accustomed filesystem

Uses of loop mounting

After ascent a book that holds a filesystem, the files aural the filesystem can be accessed through the accepted filesystem interface of the operating

system, after any charge for appropriate functionality, such as account and autograph to ISO images, in applications.

Uses accommodate managing and alteration filesystem images meant for after accustomed use (especially CD or DVD images or accession systems), installing an operating arrangement after repartitioning a drive, and abiding allegory of abstracts (for example, assuming disposable media on a faster and added acceptable adamantine deejay or encapsulating encrypted filesystems).

Availability

Some abashing exists about the allotment of the bend accessory beneath assorted operating systems. Assorted Unix-like operating systems accommodate the bend accessory functionality beneath altered names.

In Linux, accessory names are encoded in the attribute table entries of their agnate accessory drivers. The accessory is alleged "loop" accessory and accessory nodes are usually alleged /dev/loop0, /dev/loop1, etc. They can be created by the makedev calligraphy for the changeless accessory directory, dynamically by the accessories of the accessory filesystem (udev), or anon by the mknod command. The administration user interface for the bend accessory is losetup and is allotment of the util-linux package.

Sometimes, the bend accessory is afield referred to as 'loopback' device, but this appellation is aloof for a networking accessory in the Linux atom (cf. loopback). The absorption of the 'loop' accessory is audible from that of 'loopback', although agnate in name.

In BSD-derived systems, such as NetBSD and OpenBSD, the bend accessory is alleged "virtual bulge device" or "vnd", and about amid at /dev/vnd0, /dev/rvnd0 or /dev/svnd0, etc., in the book system. The vnconfig affairs is acclimated for configuration.

FreeBSD followed the aforementioned conventions as added BSD systems until absolution adaptation 5, in which the bend accessory was congenital into the anamnesis deejay disciplinarian ("md"). Agreement is now performed application the mdconfig1 program.

In Solaris/OpenSolaris, the bend accessory is alleged "loopback book interface" or lofi,2 and amid at /dev/lofi/1, etc. SunOS has the lofiadm agreement program. The "lofi" disciplinarian supports read-only compression and read-write encryption. There is additionally a 3rd affair "fbk"3 (File emulates Blockdevice) disciplinarian accessible for SunOS/Solaris back summertime 1988.

Mac OS X accouterments a built-in angel ascent apparatus as allotment of its accidental admission deejay accessory abstraction. The accessories arise in /dev as approved deejay devices; reads from and writes to those accessories are beatific to a user-mode abettor process, which reads the abstracts from the book or writes it to the file. In the user interface it is automatically activated by aperture the deejay image. OS X can handle deejay (.dmg or .iso), CD-ROM or DVD images in assorted formats.

Loop ascent is not natively accessible on Microsoft Windows operating systems (until adaptation Windows 7, area this functionality is natively implemented, and accessible through the diskpart utility).4 However, the ability is generally added application third-party applications such as Daemon Accoutrement and Alcohol 120%. Freely-available accoutrement from VMware and LTR Abstracts can additionally be acclimated to accomplish agnate functionality