Deleted Added
full compact
geom_uzip.4 (294114) geom_uzip.4 (295943)
1.\"
2.\" Copyright (c) 2006 Ceri Davies
3.\" All rights reserved.
4.\"
5.\" Redistribution and use in source and binary forms, with or without
6.\" modification, are permitted provided that the following conditions
7.\" are met:
8.\" 1. Redistributions of source code must retain the above copyright

--- 9 unchanged lines hidden (view full) ---

18.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24.\" SUCH DAMAGE.
25.\"
1.\"
2.\" Copyright (c) 2006 Ceri Davies
3.\" All rights reserved.
4.\"
5.\" Redistribution and use in source and binary forms, with or without
6.\" modification, are permitted provided that the following conditions
7.\" are met:
8.\" 1. Redistributions of source code must retain the above copyright

--- 9 unchanged lines hidden (view full) ---

18.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24.\" SUCH DAMAGE.
25.\"
26.\" $FreeBSD: head/share/man/man4/geom_uzip.4 294114 2016-01-16 00:37:27Z imp $
26.\" $FreeBSD: head/share/man/man4/geom_uzip.4 295943 2016-02-23 23:59:08Z sobomax $
27.\"
28.Dd October 9, 2006
29.Dt GEOM_UZIP 4
30.Os
31.Sh NAME
32.Nm geom_uzip
27.\"
28.Dd October 9, 2006
29.Dt GEOM_UZIP 4
30.Os
31.Sh NAME
32.Nm geom_uzip
33.Nd "GEOM based compressed disk images"
33.Nd "GEOM based compressed disk images and partitions"
34.Sh SYNOPSIS
35To compile this driver into the kernel,
36place the following line in your
37kernel configuration file:
38.Bd -ragged -offset indent
39.Cd "options GEOM_UZIP"
40.Ed
41.Pp

--- 4 unchanged lines hidden (view full) ---

46geom_uzip_load="YES"
47.Ed
48.Sh DESCRIPTION
49The
50.Nm
51framework provides support for compressed read-only
52disk images.
53This allows significant storage savings at the expense of
34.Sh SYNOPSIS
35To compile this driver into the kernel,
36place the following line in your
37kernel configuration file:
38.Bd -ragged -offset indent
39.Cd "options GEOM_UZIP"
40.Ed
41.Pp

--- 4 unchanged lines hidden (view full) ---

46geom_uzip_load="YES"
47.Ed
48.Sh DESCRIPTION
49The
50.Nm
51framework provides support for compressed read-only
52disk images.
53This allows significant storage savings at the expense of
54a little CPU time on each read.
54a some CPU time on each read.
55Data written in the GEOM label area allows
56.Nm
57to detect compressed images which have been created with
58.Xr mkuzip 8
59and presented to the kernel as a logical disk device via
60.Xr md 4 .
61.Nm
62creates a unique
63.Pa md#.uzip
64device for each image.
65.Pp
55Data written in the GEOM label area allows
56.Nm
57to detect compressed images which have been created with
58.Xr mkuzip 8
59and presented to the kernel as a logical disk device via
60.Xr md 4 .
61.Nm
62creates a unique
63.Pa md#.uzip
64device for each image.
65.Pp
66.Nm
67is not limited to supporting only
68.Xr md 4
69images.
70The image can also reside on a block device.
71.Pq For example, a disk, USB flash drive, DVD-ROM, etc.
72The appropriate device node will appear with the
73.Pa .uzip
74suffix.
75.Bd -literal -offset indent
76# gpart show da0
77=> 0 7833600 da0 BSD (3.7G)
78 0 2097152 1 freebsd-ufs (1.0G)
79 2097152 5736448 - free - (2.7G)
80# gpart add -t freebsd-ufs -s 1G da0
81da0b added
82# dd if=/tmp/20160217_dcomp_zcomp.uzip bs=256k of=/dev/da0b
833190+1 records in
843190+1 records out
85836331008 bytes transferred in 111.021489 secs (7533055 bytes/sec)
86# fsck -t ffs /dev/da0b.uzip
87** /dev/da0b.uzip (NO WRITE)
88** Last Mounted on /mnt
89** Phase 1 - Check Blocks and Sizes
90** Phase 2 - Check Pathnames
91** Phase 3 - Check Connectivity
92** Phase 4 - Check Reference Counts
93** Phase 5 - Check Cyl groups
9497455 files, 604242 used, 184741 free (2349 frags, 22799 blocks,
95 0.3% fragmentation)
96# mount -o ro /dev/da0b.uzip /mnt
97# df /dev/da0b.uzip
98Filesystem 1K-blocks Used Avail Capacity Mounted on
99/dev/da0b.uzip 3155932 2416968 738964 77% /mnt
100.Ed
101.Pp
66The
67.Nm
102The
103.Nm
68device is subsequently used by the
104device is subsequently used by
69.Fx
105.Fx
70kernel to access the disk images.
106kernel to access the uncompressed data.
71The
72.Nm
73driver does not allow write operations to the underlying disk image.
74To check which
107The
108.Nm
109driver does not allow write operations to the underlying disk image.
110To check which
75.Xr md 4
76devices match a given
111.Dq providers
112match a given
77.Nm
78device:
79.Bd -literal -offset indent
80# geom uzip list
81Geom name: md1.uzip
82Providers:
831. Name: md1.uzip
84 Mediasize: 22003712 (21M)
85 Sectorsize: 512
113.Nm
114device:
115.Bd -literal -offset indent
116# geom uzip list
117Geom name: md1.uzip
118Providers:
1191. Name: md1.uzip
120 Mediasize: 22003712 (21M)
121 Sectorsize: 512
86 Mode: r1w0e1
87Consumers:
881. Name: md1
89 Mediasize: 9563648 (9.1M)
90 Sectorsize: 512
122Consumers:
1231. Name: md1
124 Mediasize: 9563648 (9.1M)
125 Sectorsize: 512
91 Mode: r1w0e1
126
127Geom name: da0b.uzip
128Providers:
1291. Name: da0b.uzip
130 Mediasize: 3355443200 (3.1G)
131 Sectorsize: 512
132Consumers:
1331. Name: da0b
134 Mediasize: 1073741824 (1.0G)
135 Sectorsize: 512
92.Ed
136.Ed
137.Pp
138.Nm
139allows mounting the root file system from a compressed disk partition by
140setting the
141.Dv vfs.root.mountfrom
142tunable.
143See
144.Xr loader.conf 5
145for details.
146.Sh DIAGNOSTICS
147Several flags are provided for tracing
148.Nm
149I/O operations and TOC parsing via the following sysctls.
150.Bl -tag -width indent
151.It Va kern.geom.uzip.debug
152Log level.
153Zero disables logging.
154Higher values enable more verbose debug logging for
155.Nm .
156Supported levels are from 0 (no logging) to 4 (maximum amount of logging).
157.It Va kern.geom.uzip.debug_block
158Log operations involving compressed cluster number.
159.El
93.Sh SEE ALSO
94.Xr GEOM 4 ,
95.Xr md 4 ,
96.Xr geom 8 ,
97.Xr mkuzip 8
98.Sh AUTHORS
99.An -nosplit
100The
101.Nm
102driver was written by
103.An Max Khon Aq Mt fjoe@FreeBSD.org .
160.Sh SEE ALSO
161.Xr GEOM 4 ,
162.Xr md 4 ,
163.Xr geom 8 ,
164.Xr mkuzip 8
165.Sh AUTHORS
166.An -nosplit
167The
168.Nm
169driver was written by
170.An Max Khon Aq Mt fjoe@FreeBSD.org .
171The block de-duplication code as well as some
172.Nm
173driver optimizations have been contributed by
174.An Maxim Sobolev Aq Mt sobomax@FreeBSD.org .
175The LZMA decompression support and CLOOP 3.0 support have been added by
176.An Aleksandr Rybalko Aq Mt ray@FreeBSD.org .
177.Pp
104This manual page was written by
105.An Ceri Davies Aq Mt ceri@FreeBSD.org .
178This manual page was written by
179.An Ceri Davies Aq Mt ceri@FreeBSD.org .