diff options
author | yar <yar@FreeBSD.org> | 2007-11-28 07:29:10 +0000 |
---|---|---|
committer | yar <yar@FreeBSD.org> | 2007-11-28 07:29:10 +0000 |
commit | 13b1c70facfd50df5e26ab1d2cb15ec557a2c480 (patch) | |
tree | 87013b76681a13ea5066cc3256a664fd1b2e4efe /sbin/newfs/newfs.8 | |
parent | 2562874cb6c7148dd0a0e252035eeb28cc19eb23 (diff) | |
download | FreeBSD-src-13b1c70facfd50df5e26ab1d2cb15ec557a2c480.zip FreeBSD-src-13b1c70facfd50df5e26ab1d2cb15ec557a2c480.tar.gz |
MFp4:
Add a new option to newfs(8), -r, to specify reserved space at the
end of the device. It can be useful, e.g., when the device is to
become a member of a gmirror array later w/o losing the file system
on it.
Document the new option in the manpage.
While I'm here, improve error handling for -s option, which is
syntactically similar to -r; and document the fact that -s0 selects
the default fs size explicitly, which can be useful, e.g., in a
menu-based wrapper around newfs(8) requiring some value be entered
for the fs size.
Also fix a small typo in the help line for -s (missing space).
Idea and initial implementation by: marck
Discussed on: -fs
Critical review by: bde
Tested with: cmp(1)
Diffstat (limited to 'sbin/newfs/newfs.8')
-rw-r--r-- | sbin/newfs/newfs.8 | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/sbin/newfs/newfs.8 b/sbin/newfs/newfs.8 index 8be6d35..875f915 100644 --- a/sbin/newfs/newfs.8 +++ b/sbin/newfs/newfs.8 @@ -52,6 +52,7 @@ .Op Fl i Ar bytes .Op Fl m Ar free-space .Op Fl o Ar optimization +.Op Fl r Ar reserved .Op Fl s Ar size .Ar special .Sh DESCRIPTION @@ -196,14 +197,30 @@ the default is to optimize for See .Xr tunefs 8 for more details on how to set this option. +.It Fl r Ar reserved +The size, in sectors, of reserved space +at the end of the partition specified in +.Ar special . +This space will not be occupied by the file system; +it can be used by other consumers such as +.Xr geom 4 . +Defaults to 0. .It Fl s Ar size The size of the file system in sectors. This value defaults to the size of the raw partition specified in .Ar special -(in other words, -.Nm -will use the entire partition for the file system). +less the +.Ar reserved +space at its end (see +.Fl r ) . +A +.Ar size +of 0 can also be used to choose the default value. +A valid +.Ar size +value cannot be larger than the default one, +which means that the file system cannot extend into the reserved space. .El .Pp The following options override the standard sizes for the disk geometry. @@ -237,6 +254,7 @@ This large fragment size may lead to much wasted space on file systems that contain many small files. .Sh SEE ALSO .Xr fdformat 1 , +.Xr geom 4 , .Xr disktab 5 , .Xr fs 5 , .Xr bsdlabel 8 , |