Bug 201975

Summary: Instructions for newfs on md0 aren't optimal
Product: Documentation Reporter: Hugh O'Brien <freebsdbugs>
Component: DocumentationAssignee: freebsd-doc mailing list <doc>
Status: Closed FIXED    
Severity: Affects Some People CC: crees, thatguyrenic
Priority: ---    
Version: Latest   
Hardware: Any   
OS: Any   

Description Hugh O'Brien 2015-07-29 18:36:11 UTC
On the virtual disks page: https://www.freebsd.org/doc/handbook/disks-virtual.html

Multiple ways of calling newfs are used, one using the -U (softupdates) flag and one not. Additionally, neither use the -n (no snapshots) flag.

There is also a typo where the copy says "This example creates an empty 5K file named newimage" but then goes on to describe commands to create a 5MB file.
Comment 1 commit-hook freebsd_committer 2018-12-23 15:32:13 UTC
A commit references this bug:

Author: crees
Date: Sun Dec 23 15:31:49 UTC 2018
New revision: 52711
URL: https://svnweb.freebsd.org/changeset/doc/52711

Log:
  Make the format of memory-backed disks consistent (soft-updates)

  Correct size of file-backed disk

  PR:		doc/201975
  Submitted by:	Hugh O'Brien

Changes:
  head/en_US.ISO8859-1/books/handbook/disks/chapter.xml
Comment 2 Chris Rees freebsd_committer 2018-12-23 15:35:35 UTC
I agree on consistency, but I don't think disabling snapshots is a good thing to recommend on this, because the most common use cases are going to be for much larger memdisks.  I've committed two of your suggestions.  Thanks!
Comment 3 Hugh O'Brien 2018-12-23 22:08:10 UTC
Thank you, for reference I suggested disabling snaps due to the following man page entry.

  -n	     Do	not create a .snap directory on	the new	file system.  The
	     resulting file system will	not support snapshot generation, so
	     dump(8) in	live mode and background fsck(8) will not function
	     properly.	The traditional	fsck(8)	and offline dump(8) will work
	     on	the file system.  This option is intended primarily for	memory
	     or	vnode-backed file systems that do not require dump(8) or
	     fsck(8) support.

https://www.freebsd.org/cgi/man.cgi?query=newfs&apropos=0&sektion=0&manpath=FreeBSD+12.0-RELEASE+and+Ports&arch=default&format=html
Comment 4 Sergey Kandaurov freebsd_committer 2019-02-09 20:06:35 UTC
*** Bug 223248 has been marked as a duplicate of this bug. ***