'\" te
.\" Copyright (c) 2008, Sun Microsystems, Inc. All Rights Reserved
.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
.TH LOFI 7D "Nov 25, 2008"
.SH NAME
lofi \- Loopback file driver
.SH DESCRIPTION
.sp
.LP
The \fBlofi\fR file driver exports a file as a block device, enabling system
utilities such as \fBfstyp\fR(1M), \fBfsck\fR(1M) and \fBmount\fR(1M) to
operate on underlying file system images (including CD-ROM and FAT floppy
images) contained on the block device. Reads and writes to the block device are
translated to reads and writes on the exported file. See \fBlofiadm\fR(1M) for
examples.
.sp
.LP
File block device entries are contained in \fB/dev/lofi\fR. The
\fB/dev/rlofi\fR file contains the character (or raw) device entries. Entries
are in the  form of decimal  numbers and are assigned  through
\fBlofiadm\fR(1M).  When  created, these device entries are owned by root, in
group sys and have permissions of 0600. Ownership, group, and permission
settings can be altered, however there may be ramifications. See
\fBlofiadm\fR(1M) for more information.
.sp
.LP
\fBlofi\fR devices can be compressed. See \fBlofiadm\fR(1M) for more
information.
.sp
.LP
Files exported through \fBlofi\fR can also be encrypted. See \fBlofiadm\fR(1M)
for details on how to specify encryption keys.
.SH FILES
.sp
.ne 2
.na
\fB\fB/dev/lofictl\fR\fR
.ad
.sp .6
.RS 4n
Master control device
.RE

.sp
.ne 2
.na
\fB\fB/dev/lofi/\fIn\fR\fR\fR
.ad
.sp .6
.RS 4n
Block device for file \fIn\fR
.RE

.sp
.ne 2
.na
\fB\fB/dev/rlofi/\fIn\fR\fR\fR
.ad
.sp .6
.RS 4n
Character device for file \fIn\fR
.RE

.sp
.ne 2
.na
\fB\fB/kernel/drv/lofi\fR\fR
.ad
.sp .6
.RS 4n
32-bit driver
.RE

.sp
.ne 2
.na
\fB\fB/kernel/drv/sparcv9/lofi\fR\fR
.ad
.sp .6
.RS 4n
64-bit driver (SPARC)
.RE

.sp
.ne 2
.na
\fB\fB/kernel/drv/amd64/lofi\fR\fR
.ad
.sp .6
.RS 4n
64-bit driver (x86)
.RE

.sp
.ne 2
.na
\fB\fB/kernel/drv/lofi.conf\fR\fR
.ad
.sp .6
.RS 4n
Driver configuration file. (Do not alter).
.RE

.SH ATTRIBUTES
.sp
.LP
See \fBattributes\fR(5) for a description of the following attributes:
.sp

.sp
.TS
box;
c | c
l | l .
ATTRIBUTE TYPE	ATTRIBUTE VALUE
_
Architecture	SPARC, x86
_
Interface Stability	Committed
.TE

.SH SEE ALSO
.sp
.LP
\fBfstyp\fR(1M), \fBfsck\fR(1M), \fBmount\fR(1M), \fBlofiadm\fR(1M),
\fBnewfs\fR(1M), \fBattributes\fR(5), \fBlofs\fR(7FS)
.SH NOTES
.sp
.LP
Just as you would not directly access a disk device that has mounted file
systems, you should not access a file associated with a block device except
through the \fBlofi\fR file driver.
.sp
.LP
For compatibility purposes, a raw device is also exported with the block
device. (For example, \fBnewfs\fR(1M)).
.sp
.LP
The \fBlofi\fR driver isn't available in a zone and will not work inside a
zone.