.\" Copyright (c) 2007 The DragonFly Project. All rights reserved. .\" .\" This code is derived from software contributed to The DragonFly Project .\" by Matthew Dillon .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: .\" .\" 1. Redistributions of source code must retain the above copyright .\" notice, this list of conditions and the following disclaimer. .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in .\" the documentation and/or other materials provided with the .\" distribution. .\" 3. Neither the name of The DragonFly Project nor the names of its .\" contributors may be used to endorse or promote products derived .\" from this software without specific, prior written permission. .\" .\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS .\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT .\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS .\" FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE .\" COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, .\" INCIDENTAL, SPECIAL, EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING, .\" BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; .\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED .\" AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, .\" OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT .\" OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" .Dd October 7, 2011 .Dt NEWFS_HAMMER 8 .Os .Sh NAME .Nm newfs_hammer .Nd construct a new HAMMER file system .Sh SYNOPSIS .Nm .Fl L Ar label .Op Fl \&Ef .Op Fl b Ar bootsize .Op Fl m Ar savesize .Op Fl u Ar undosize .Op Fl V Ar version .Ar special ... .Sh DESCRIPTION The .Nm utility creates a .Nm HAMMER file system on device(s) .Ar special . If multiple devices are specified a single .Nm HAMMER file system is created which spans all of them. Each .Ar special will constitute a volume which the .Nm HAMMER file system is built on. .Nm HAMMER file systems are sector-size agnostic, however the .Dx implementation requires the sector size to be no larger than 16K. .Nm HAMMER file systems start at a relative offset of 0 and may only be created under out-of-band disk labels .Po .Xr disklabel64 5 or .Xr gpt 8 labels .Pc , or in .Xr disklabel32 5 partitions which do not overlap the label area (have a starting sector greater than 16). .Pp .Nm HAMMER file systems are designed for large storage systems, up to 1 Exabyte, and will not operate efficiently on small storage systems. The minimum recommended file system size is 50GB. .Nm HAMMER must reserve 500MB to 1GB of its storage for reblocking and UNDO/REDO. In addition, .Nm HAMMER file systems operating normally, with full history retention and daily snapshots, do not immediately reclaim space when files are deleted. A regular system maintenance job runs once a day by .Xr periodic 8 to handle reclamation. .Pp .Nm HAMMER works best when the machine's normal workload would not otherwise fill the file system up in the course of 60 days of operation. .Pp The options are as follows: .Bl -tag -width indent .It Fl L Ar label All .Nm HAMMER file systems must be named and names should be unique on a per-machine basis. .It Fl b Ar bootsize Specify a fixed area in which a boot related kernel and data can be stored. The .Ar bootsize is specified in bytes. By default a boot area of approximately 4MB will be created. .It Fl f Force operation. This is needed for the creation of a .Nm HAMMER file system less than 10GB size or with less than 500MB UNDO/REDO FIFO. This should not be used under normal circumstances. .It Fl E Use TRIM to erase the device's data before creating the file system. The underlying device must have the TRIM sysctl enabled. Only devices that support TRIM will have such a sysctl option .Va ( kern.cam.da.X.trim_enabled ) . .It Fl m Ar savesize Specify a fixed area which .Nm HAMMER may use as a memory log. This area is currently unused. The .Ar savesize is specified in bytes. .It Fl u Ar undosize Specify the size of the fixed UNDO/REDO FIFO. The .Ar undosize is specified in bytes. By default 0.1% of the root volume's size is used, with a reasonable minimum and a reasonable cap. The UNDO/REDO FIFO is used to sequence meta-data out to the media for instant crash recovery. .It Fl V Ar version Specify the .Nm HAMMER file system version to format. By default .Nm formats the file system using the highest production version number supported by the .Nm HAMMER VFS by checking the .Va vfs.hammer.supported_version sysctl. If you need to maintain compatibility with an older version of .Nm HAMMER you may specify the version with this option. .El .Pp The .Ar bootsize , .Ar savesize and .Ar undosize must be given with a suffix of .Cm K , M , G or .Cm T meaning kilobyte, megabyte, gigabyte and terabyte. Lower case can also be used for suffix. .Sh EXAMPLES .Bd -literal -offset indent newfs_hammer -L Home /dev/ad0s1d .Ed .Pp Create a file system named .Sq Home on .Pa /dev/ad0s1d . .Sh DIAGNOSTICS Exit status is 0 on success and 1 on error. .Sh SEE ALSO .Xr disklabel32 5 , .Xr disklabel64 5 , .Xr HAMMER 5 , .Xr fdisk 8 , .Xr gpt 8 , .Xr newfs 8 .Sh HISTORY The .Nm utility first appeared in .Dx 1.11 . .Sh AUTHORS .An Matthew Dillon Aq dillon@backplane.com