man.bsd.lv manual page server

Manual Page Search Parameters

NEWFS_HAMMER(8) System Manager's Manual NEWFS_HAMMER(8)

newfs_hammerconstruct a new HAMMER file system

newfs_hammer -L label [-Efh] [-b bootsize] [-m savesize] [-u undosize] [-C cachesize[:readahead]] [-V version] special ...

The newfs_hammer utility creates a HAMMER file system on device(s) special. If multiple devices are specified a single HAMMER file system is created which spans all of them. Each special will constitute a volume which the HAMMER file system is built on. The first special specified becomes the root-volume with volume# 0. HAMMER file systems are sector-size agnostic, however the DragonFly implementation requires the sector size to be no larger than 16KB. HAMMER file systems start at a relative offset of 0 and may only be created under out-of-band disk labels (disklabel64(5) or gpt(8) labels), or in disklabel32(5) partitions which do not overlap the label area (have a starting sector greater than 16).

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. HAMMER must reserve 512MB to 1GB of its storage for reblocking and UNDO/REDO FIFO. In addition, 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 periodic(8) to handle reclamation.

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.

The options are as follows:

label
All HAMMER file systems must be named and names should be unique on a per-machine basis, although newfs_hammer does not prevent from making file systems with the same label.
Force operation. This is needed for the creation of a HAMMER file system less than 10GB size or with less than 512MB UNDO/REDO FIFO. This should not be used under normal circumstances.
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 (kern.cam.da.X.trim_enabled).
Show usage.
bootsize
Specify a fixed area in which a boot related kernel and data can be stored. This area is currently unused. The bootsize is specified in bytes with a suffix of K, M, G or T.
savesize
Specify a fixed area which HAMMER may use as a memory log. This area is currently unused. The savesize is specified in bytes with a suffix of K, M, G or T.
undosize
Specify the size of the fixed UNDO/REDO FIFO. The undosize is specified in bytes with a suffix of K, M, G or T. 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.
cachesize[:readahead]
Refer to the same option in hammer(8).
version
Specify the HAMMER file system version to format. By default newfs_hammer formats the file system using the highest production version number supported by the HAMMER VFS by checking the vfs.hammer.supported_version sysctl. If you need to maintain compatibility with an older version of HAMMER you may specify the version with this option.

The bootsize, savesize and undosize must be given with a suffix of K, M, G or T meaning kilobyte, megabyte, gigabyte and terabyte. Lower case can also be used for suffix.

The newfs_hammer utility exits 0 on success, and >0 if an error occurs.

Create a file system named ‘HOME’ on /dev/ad0s1d:

newfs_hammer -L HOME /dev/ad0s1d

Create a file system named ‘TEMP’ on /dev/ad0s1d and /dev/ad1s1d:

newfs_hammer -L TEMP /dev/ad0s1d /dev/ad1s1d

disklabel32(5), disklabel64(5), HAMMER(5), fdisk(8), gpt(8), hammer(8), mount_hammer(8), newfs(8)

The newfs_hammer utility first appeared in DragonFly 1.11.

Matthew Dillon <dillon@backplane.com>

December 16, 2016 DragonFly-5.6.1