.\" Copyright (c) 2007 The DragonFly Project. All rights reserved.
-.\"
+.\"
.\" This code is derived from software contributed to The DragonFly Project
.\" by Matthew Dillon <dillon@backplane.com>
-.\"
+.\"
.\" 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
.\" 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
.\" 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.
-.\"
+.\"
.\" $DragonFly: src/sbin/newfs_hammer/newfs_hammer.8,v 1.10 2008/07/27 16:47:19 thomas Exp $
-.Dd September 28, 2009
+.Dd April 10, 2011
.Dt NEWFS_HAMMER 8
.Os
.Sh NAME
labels
.Pc ,
or in
-.Xr disklabel 5
+.Xr disklabel32 5
partitions which do not overlap the label area (have a starting sector
greater than 16).
.Pp
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.
+must reserve 500MB to 1GB of its storage for reblocking and UNDO/REDO.
In addition,
.Nm HAMMER
file systems operating normally, with full history
is specified in bytes.
By default a boot area of approximately 4MB will be created.
.It Fl f
-Force the creation of a
+Force operation.
+This is needed for the creation of a
.Nm HAMMER
-file system with less than 100MB UNDO FIFO.
+file system less than 10GB size or
+with less than 500MB UNDO/REDO FIFO.
This should not be used under normal circumstances.
.It Fl m Ar savesize
Specify a fixed area which
.Ar savesize
is specified in bytes.
.It Fl u Ar undosize
-Specify the size of the fixed UNDO FIFO.
+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 FIFO is used to sequence meta-data out to the media for instant
-crash recovery.
+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
.Ar savesize
and
.Ar undosize
-can be given with a suffix of
+must be given with a suffix of
.Cm K , M , G
or
.Cm T
.Sh DIAGNOSTICS
Exit status is 0 on success and 1 on error.
.Sh SEE ALSO
-.Xr disklabel 5 ,
+.Xr disklabel32 5 ,
.Xr disklabel64 5 ,
.Xr HAMMER 5 ,
.Xr fdisk 8 ,
/*
* Copyright (c) 2007 The DragonFly Project. All rights reserved.
- *
+ *
* This code is derived from software contributed to The DragonFly Project
* by Matthew Dillon <dillon@backplane.com>
- *
+ *
* 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
* 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
* 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.
- *
+ *
* $DragonFly: src/sbin/newfs_hammer/newfs_hammer.c,v 1.44 2008/08/21 23:32:27 thomas Exp $
*/
HAMMER_LARGEBLOCK_SIZE,
HAMMER_LARGEBLOCK_SIZE *
HAMMER_UNDO_LAYER2, 2);
- if (UndoBufferSize < 100*1024*1024 && ForceOpt == 0)
- errx(1, "The minimum UNDO fifo size is 100MB\n");
- if (UndoBufferSize < 100*1024*1024) {
- fprintf(stderr,
- "WARNING: you have specified an UNDO "
- "FIFO size less than 100MB, which may\n"
- "lead to VFS panics.\n");
+ if (UndoBufferSize < 500*1024*1024 && ForceOpt == 0)
+ errx(1, "The minimum UNDO/REDO FIFO size is "
+ "500MB\n");
+ if (UndoBufferSize < 500*1024*1024) {
+ fprintf(stderr,
+ "WARNING: you have specified an "
+ "UNDO/REDO FIFO size less than 500MB,\n"
+ "which may lead to VFS panics.\n");
}
break;
case 'V':
printf("NOTE: Please remember that you may have to manually set up a\n"
"cron(8) job to prune and reblock the filesystem regularly.\n"
"By default, the system automatically runs 'hammer cleanup'\n"
- "on a nightly basis. The periodic.conf(5) variable\n"
+ "on a nightly basis. The periodic.conf(5) variable\n"
"'daily_clean_hammer_enable' can be unset to disable this.\n"
"Also see 'man hammer' and 'man HAMMER' for more information.\n");
if (total < 10*GIG) {
- printf("\nWARNING: The minimum UNDO/REDO FIFO is 500MB, you"
+ printf("\nWARNING: The minimum UNDO/REDO FIFO is 500MB, you "
"really should not\n"
- " try to format a HAMMER filesystem this small\n");
+ "try to format a HAMMER filesystem this small.\n");
}
if (total < 50*GIG) {
printf("\nWARNING: HAMMER filesystems less than 50GB are "
/* not reached */
}
if ((powerof2 & 2) && (val & HAMMER_BUFMASK)) {
- errx(1, "Value not an integral multiple of %dK: %s",
+ errx(1, "Value not an integral multiple of %dK: %s",
HAMMER_BUFSIZE / 1024, str);
/* not reached */
}
ondisk->vol_signature = HAMMER_FSBUF_VOLUME;
vol->vol_free_off = HAMMER_ENCODE_RAW_BUFFER(vol->vol_no, 0);
- vol->vol_free_end = HAMMER_ENCODE_RAW_BUFFER(vol->vol_no, (ondisk->vol_buf_end - ondisk->vol_buf_beg) & ~HAMMER_LARGEBLOCK_MASK64);
+ vol->vol_free_end = HAMMER_ENCODE_RAW_BUFFER(vol->vol_no,
+ (ondisk->vol_buf_end - ondisk->vol_buf_beg) &
+ ~HAMMER_LARGEBLOCK_MASK64);
/*
* Format the root volume.
ondisk->vol0_stat_freebigblocks = freeblks;
freebytes = freeblks * HAMMER_LARGEBLOCK_SIZE64;
- if (freebytes < 1*GIG && ForceOpt == 0) {
+ if (freebytes < 10*GIG && ForceOpt == 0) {
errx(1, "Cannot create a HAMMER filesystem less than "
- "1GB unless you use -f. HAMMER filesystems\n"
+ "10GB unless you use -f. HAMMER filesystems\n"
"less than 50GB are not recommended\n");
}
return(btree_off);
}
-
/*
* Copyright (c) 2007 The DragonFly Project. All rights reserved.
- *
+ *
* This code is derived from software contributed to The DragonFly Project
* by Matthew Dillon <dillon@backplane.com>
- *
+ *
* 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
* 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
* 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.
- *
+ *
* $DragonFly: src/sbin/newfs_hammer/newfs_hammer.h,v 1.4 2008/01/03 06:48:48 dillon Exp $
*/
#include <assert.h>
#include <err.h>
#include "hammer_util.h"
-