git: sbin/newfs_hammer: Fix "less than 10GB" error message on newfs

Tomohiro Kusumi tkusumi at
Fri Jun 12 08:40:02 PDT 2015

commit 950336059d8b6856bee3742cc68600db672094b0
Author: Tomohiro Kusumi <kusumi.tomohiro at>
Date:   Fri Jun 12 01:20:37 2015 +0900

    sbin/newfs_hammer: Fix "less than 10GB" error message on newfs
    - Add "(for the size of Volume 0)". Trying to make >10GB hammer
      with multiple less-than-10GB-disks results the same error.
    - This message appears whenever the root volume (the volume #0
      where layer1/2 are stored by newfs) has less than 10GB space
      in zone2/volume0 address space. It doesn't matter if the total
      size of physical disks are large enough or not.
      # /sbin/newfs_hammer -L TEST /dev/da8 /dev/da9 /dev/da10 /dev/da11
      Volume 0 DEVICE /dev/da8        size   7.22GB
      Volume 1 DEVICE /dev/da9        size  28.88GB
      Volume 2 DEVICE /dev/da10       size   7.20GB
      Volume 3 DEVICE /dev/da11       size   1.86GB
      initialize freemap volume 0
      newfs_hammer: Cannot create a HAMMER filesystem less than 10GB unless you use -f
      (for the size of Volume 0).  HAMMER filesystems less than 50GB are not recommended.
    - It's probably better if newfs_hammer could fail with this
      error message without writing (write(2)) to ondisk layer1/2
      structure. The layer1/2 have already been written to the root
      volume by the time the process is aborted. Also note that this
      is the only newfs_hammer sanity check failure that affect ondisk.
      All the other checks abort before ondisk formatting starts.

Summary of changes:
 sbin/newfs_hammer/newfs_hammer.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

DragonFly BSD source repository

More information about the Commits mailing list