Commit Graph

111 Commits (0781e038bb6d2f16d975bd8ea298a0893e2a4be8)

Author SHA1 Message Date
Theodore Ts'o 3c6e91c549 mke2fs: allow metadata blocks to be at the beginning of the file system
Add the extended options packed_meta_blocks and journal_location_front
which causes mke2fs to place the metadata blocks at the beginning of
the file system.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2014-01-30 13:58:18 -05:00
Theodore Ts'o 65c6c3e06f Add support for new compat feature "sparse_super2"
In practice, it is **extremely** rare for users to try to use more
than the first backup superblock located at the beginning of block
group #1.  (i.e., at block number 32768 for file systems with a 4k
block size).  This new compat feature restricts the backup superblock
to block group #1 and the last block group in the file system.

Aside from reducing the overhead of the file system by a small number
of blocks, by eliminating the rest of the backup superblocks, it
allows us to have a much more flexible metadata layout.  For example,
we can force all of the allocation bitmaps and inode table blocks to
the beginning of the disk, which allows most of the disk to be
exclusively used for contiguous data blocks.

This simplifies taking advantage of certain HDD specific features,
such as Shingled Magnetic Recording (aka Shingled Drives), and the
TCG's OPAL Storage Specification where having a simple mapping between
LBA block ranges and the data blocks used by the file system can make
life much simpler.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2014-01-30 13:58:18 -05:00
Theodore Ts'o b818205feb tune2fs, mke2fs: add the ability to control the location of the journal
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2014-01-30 13:58:17 -05:00
Theodore Ts'o 5c4c38763c mke2fs: use [^]feature instead of just feature in the man page
Addresses-Debian-Bug: #719184

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2013-12-31 22:53:52 -05:00
Theodore Ts'o 88ee023be2 mke2fs: add support to create the file system at an offset
This can be useful when creating a disk image for virtual machines.

Addresses-Debian-Bug: #497984

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2013-12-30 23:03:09 -05:00
Theodore Ts'o 9518b29727 mke2fs: clarify documentation about bigalloc in the man page
Addresses-Debian-Bug: #669730

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2013-12-28 17:57:25 -05:00
Theodore Ts'o 886056bd39 mke2fs: clarify the description of the -I option in the man page
Addresses-Debian-Bug: #698076

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2013-12-28 17:09:10 -05:00
Theodore Ts'o 3c22bf7e70 Add ext4 man page and update and clean up the other man pages
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2013-12-24 22:50:23 -05:00
Andreas Dilger b769aaec1a mke2fs: further updates for mke2fs(8) man page
The mke2fs(8) man page was updated in 4727c67dc2, but needs some
more clear descriptions for extra_isize and metadta_csum features.
The uninit_bg feature is supported by all ext4-capable kernels,
and does have a slow e2fsck pass for newly-formatted filesystems,
so remove the caveat.

Signed-off-by: Andreas Dilger <adilger@dilger.ca>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2013-12-24 22:50:23 -05:00
Uri Corin 4727c67dc2 e2fsprogs: mke2fs manpage updates
I've added documentation for all available filesystem features
settable by mke2fs.
* Features now include the kernel constant attached to the function.
* Some pre-existing feature explanations have been expanded based on
ext4.wiki.kernel.org.

[ Edited by tytso for stylistic and correctness. ]

Addresses-Debian-Bug: #586218

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2013-12-16 01:26:53 -05:00
Phillip Susi e2883e2792 mke2fs: clarify inode ratio in man page
The man page still said it was not possible to change the number of
inodes on a filesystem after creating it.  You actually can by
resizing the fs, so clarify this language a bit.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2013-10-15 23:37:54 -04:00
Eric Sandeen f5589f4c18 mke2fs: remove quota docs if not configured in
If quota isn't turned on with --enable-quota, then comment
quota documentation out of the mke2fs manpage.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2013-10-14 08:57:17 -04:00
Andreas Dilger dc9cc7006a mke2fs: don't set root dir UID/GID automatically
Don't change the root directory's UID/GID automatically just because
mke2fs was run as a non-root user.  This can be confusing for users,
and is not flexible for non-root installation tools that need to
create a filesystem with different ownership from the current user.

Add the "-E root_owner[=uid:gid]" option to mke2fs so that the user
and group can be explicitly specified for the root directory.  If
the "=uid:gid" argument is not specified, the current UID and GID
are extracted from the running process, as was done in the past.

Signed-off-by: Andreas Dilger <adilger@dilger.ca>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2013-06-15 21:51:33 -04:00
Theodore Ts'o 626a2e7468 mke2fs: clarify mke2fs and mke2fs.conf man pages
Addresses-Debian-Bug: #712429
Addresses-Debian-Bug: #712430

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2013-06-15 21:19:39 -04:00
Zheng Liu 0f680ee8f2 mke2fs: document bigalloc and cluster-size
Bigalloc feature has been used for a long time, but the documentation
in mke2fs is still missing.  So add it.

Addresses-Debian-Bug: #669730

Signed-off-by: Zheng Liu <wenqing.lz@taobao.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2013-01-15 14:13:10 -05:00
Theodore Ts'o 802f46783c mke2fs.8: use extents vs extent in the man page
We print "extents" for the feature, so we should document "extents" in
the mke2fs's man page, even though we accept both "extent" and
"extents".

Addresses-Sourceforge-Bug: #3559210

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2012-09-21 12:50:04 -04:00
Theodore Ts'o 37c8db7b20 mke2fs: add option to use direct I/O (mke2fs -D)
This can be useful when using mke2fs on loaded servers, since
otherwise mke2fs can dirty a huge amount of memory very quickly,
leading to other applications not being happy at all.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2012-03-22 16:00:49 -04:00
Aditya Kali d678fef0d7 mke2fs: Add extended option to select quota type
mke2fs was creating both user and group quota inodes on enabling
the quota feature. This patch adds the extended option 'quotatype'
that can be used to exclusively specify the quota type that the
user wants to initialize.

 # Ex: Default behavior without extended option creates both
 # user and group quota inodes:
 $ mke2fs -t ext4 -O quota /dev/ram1

 # To enable only user quotas:
 $ mke2fs -t ext4 -O quota -E quotatype=usr /dev/ram1
 # To enable only group quotas:
 $ mke2fs -t ext4 -O quota -E quotatype=grp /dev/ram1

Signed-off-by: Aditya Kali <adityakali@google.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2011-11-14 10:55:54 -05:00
Andreas Dilger 0f5eba7501 ext2fs: add multi-mount protection (INCOMPAT_MMP)
Multi-mount protection is feature that allows mke2fs, e2fsck, and
others to detect if the filesystem is mounted on a remote node (on
SAN disks) and avoid corrupting the filesystem.  For e2fsprogs this
means that it checks the MMP block to see if the filesystem is in use,
and marks the filesystem busy while e2fsck is running on the system.

This is useful on SAN disks that are shared between high-availability
servers, or accessible by multiple nodes that aren't in HA pairs.  MMP
isn't intended to serve as a primary HA exclusion mechanism, but as a
failsafe to protect against user, software, or hardware errors.

There is no requirement that e2fsck updates the MMP block at regular
intervals, but e2fsck does this occasionally to provide useful
information to the sysadmin in case of a detected conflict.

For the kernel (since Linux 3.0) MMP adds a "heartbeat" mechanism to
periodically write to disk (every few seconds by default) to notify
other nodes that the filesystem is still in use and unsafe to modify.

Originally-by: Kalpak Shah <kalpak@clusterfs.com>

Signed-off-by: Johann Lombardi <johann@whamcloud.com>
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2011-09-25 01:55:23 -04:00
Theodore Ts'o 75405ffde6 Merge branch 'maint' into next 2011-09-16 00:00:04 -04:00
Surbhi Palande 57cb271642 mke2fs.8: Fix the documentation of maximum journal size
Fix the max journal size in mke2fs man page.

Signed-off-by: Surbhi Palande <csurbhi@gmail.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2011-09-15 23:35:18 -04:00
Theodore Ts'o b715080757 mke2fs: use "extent" consistently as a feature name in the man page
Addresses-Debian-Bug: #639411

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2011-09-15 14:25:51 -04:00
Aditya Kali 1f5d7a890e mke2fs: support creation of filesystem with quota feature
mke2fs also creates quota inodes (userquota: inode# 3 and
groupquota: inode #4) inodes while creating a filesystem when 'quota'
feature is set.
 # To set quota feature and initialize quota inodes during mke2fs:
 $mke2fs -t ext4 -O quota /dev/ram1

Signed-off-by: Aditya Kali <adityakali@google.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2011-08-31 16:31:49 -04:00
Andreas Dilger d4c0d8e5b8 mke2fs: document stripe_width, not stripe-width
For consistency with other multi-word options, document the extended
option stripe_width instead of stripe-width.  This also avoids the
complexity of parsing options that have an embedded '-'.

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2011-07-17 23:13:47 -04:00
Andreas Dilger 6c54689fad mke2fs: skip zeroing journal blocks
Add the ability to skip zeroing journal blocks on disk.  This can
significantly speed up mke2fs with large journals.  At worst the
uninitialized journal is only a very short-term risk (if at all),
because the journal will be overwritten on any new filesystem as
soon as any significant amount of data is written to disk, and
the new journal TID would need to match the offset/TID of an old
commit block still left on disk.

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2011-06-11 12:19:12 -04:00
Theodore Ts'o 214580a339 Merge branch 'maint' into next
Conflicts:
	misc/mke2fs.conf.5.in
2011-02-20 21:54:43 -05:00
Lukas Czerner 855a77a197 mke2fs: Simple man page nodiscard option correction
It is not true that 'nodiscard' is set as default, so remove this
sentence. The default is 'discard' and it is properly documented in man
page.

Signed-off-by: Lukas Czerner <lczerner@redhat.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2011-02-20 21:50:24 -05:00
Namhyung Kim 5182ad4c21 mke2fs.8.in: add ENVIRONMENT section
Add ENVIRONMENT section and describe behavior of MKE2FS_SYNC,
MKE2FS_CONFIG, MKE2FS_FIRST_META_BG, MKE2FS_DEVICE_SECTSIZE
and MKE2FS_SKIP_CHECK_MSG.

Signed-off-by: Namhyung Kim <namhyung@gmail.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2010-12-22 10:43:01 -05:00
Namhyung Kim 9a2767ffed mke2fs.8.in: add missing "big" and "huge" usage-type description
The commit 493024ea1d ("mke2fs: Fix up the
fs type and feature selection for 64-bit blocks") added 'big' and 'huge'
usage-type but was missing description in man page. Add it.

Signed-off-by: Namhyung Kim <namhyung@gmail.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2010-12-21 18:43:59 -05:00
Lukas Czerner 0bc85dfb38 mke2fs: Deprecate -K option, introduce discard/nodiscard
It would be nice to have consistent "discard" options in every system
tool (mount, fsck, mkfs) taking advantage of discards. Also "discard"
and "nodiscard" is more descriptive instead of just "-K" and can be
easily defaulted and it is something we can not do with "-K".

With this commit you need to specify extended option like this:

./mke2fs -T <fstype> -E nodiscard <device>

in order make a filesystem without discarding the device first. And

./mke2fs -T <fstype> -E discard <device>

respectively.

-K option is with this commit deprecated and should not be used anymore.

Signed-off-by: Lukas Czerner <lczerner@redhat.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2010-11-22 13:00:11 -05:00
Eric Sandeen eddf36bac0 mke2fs.8.in: clarify the sign of a block-size constraint.
This bit of the mke2fs manpage is slightly confusing:

-b block-size
    Specify the size of blocks in bytes. <snip>
    If block-size is negative, then mke2fs will use heuristics
    to determine the appropriate block size, with the constraint
    that the block size will be at least block-size bytes.

because it sounds like the block size will be at least a negative
number.  Clarify just what the negative sign means.

Reported-by: Chris Frost <chris@frostnet.net>
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2010-07-30 20:40:23 -04:00
Eric Sandeen c7cd908be5 mke2fs support for BLKDISCARD
Try calling the BLKDISCARD ioctl at mkfs time to pre-discard all blocks
on an ssd, or a thinly-provisioned storage device.

No real error checking; if it fails, it fails, and that's ok - it's
just an optimization.  Also, it cannot work in conjunction with
the undo io manager, for obvious reasons.

Optionally disabled with a "-K" (mnemonic: Keep) option.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2009-11-16 21:53:39 -05:00
Theodore Ts'o 7a9f055f0e mke2fs.8.in: Clarify flex_bg feature description
Add a more explicit description of how specifying the flex_bg file
system feature changes the layout of the per-block group metadata.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2009-09-07 16:21:32 -04:00
Theodore Ts'o 4f858546e1 Update man pages to include ext4 in the synposis, instead of just "ext2/ext3"
The e2fsprogs programs have historically just said that they operate
on ext2 and ext3 file system in their man pages.  Update them to say
that they also operate on ext4 file systems.

Addresses-Launchpad-bug: #381854

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2009-05-30 12:34:28 -04:00
Theodore Ts'o 93aa024699 mke2fs.8: Fix man page to use hyphens instead of minus signs for options
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2009-05-30 00:15:22 -04:00
Theodore Ts'o de7a86e23c mke2fs.8: Clarify in the man page that fs defaults come from mke2fs.conf
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2009-04-22 22:46:48 -04:00
Theodore Ts'o b0afdda1bc mke2fs: Add -U option to specify the UUID for the new filesystem
Patch integrated from Mandriva

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2009-01-20 13:20:31 -05:00
Theodore Ts'o 08c8b1ab34 mke2fs.8: Add an explanation of how the -t and -O options interact
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-10-02 08:47:48 -04:00
Theodore Ts'o 711d3846a0 Fix various spelling mistakes in various man pages
Thanks to A. Costa for pointing these out.

Addresses-Debian-Bug: #498100
Addresses-Debian-Bug: #498101
Addresses-Debian-Bug: #498102
Addresses-Debian-Bug: #498103

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-09-07 14:08:40 -04:00
Theodore Ts'o 3b4a66cfb6 Fix bold font specifer in mke2fs.8 man page
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-09-02 21:23:35 -04:00
Theodore Ts'o a26ba650a8 Fix mke2fs man page to escape all minus signs
Option specifiers must be escaped so the are printed as minus signs
(U+002D) instead of hyphens (U+2010).  Hence "mke2fs -t ext4" must be
expressed as "mke2fs \-t ext4" instead.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-08-24 17:29:33 -04:00
Benno Schulenberg 98794d0e0a mke2fs: Fix several typos in the man page.
Also add the missing argument of the -M option, replace the mistaken
[libdefaults] section header with [defaults], and slightly rephrase
two or three sentences.

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2008-08-14 13:25:23 -04:00
Theodore Ts'o 2ac7f06611 Fix incorrect definition of stripe-width in mke2fs man page
Also clarified the definition of the stride-size extended option as
well.

Addresses-Debian-Bug: #487849

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-07-10 09:40:48 -04:00
Theodore Ts'o faa08e4c92 Merge branch 'next' into tt/flex-bg 2008-04-27 22:24:36 -04:00
Theodore Ts'o 43781b9459 mke2fs: Make argument to the extended option lazy_itable_init optional
Also remove some debugging printf's left over from a previous patch.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-04-27 19:38:02 -04:00
Theodore Ts'o 9ba400027f mke2fs: New bitmap and inode table allocation for FLEX_BG
Change the way we allocate bitmaps and inode tables if the FLEX_BG
feature is used at mke2fs time.  It places calculates a new offset for
bitmaps and inode table base on the number of groups that the user
wishes to pack together using the new "-G" option.  Creating a
filesystem with 64 block groups in a flex group can be done by:

mke2fs -j -I 256 -O flex_bg -G 32 /dev/sdX

Signed-off-by: Jose R. Santos <jrs@us.ibm.com>
Signed-off-by: Valerie Clement <valerie.clement@bull.net>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2008-04-22 23:32:16 -04:00
Theodore Ts'o a4396e9d5d mke2fs: Disentangle lazy_bg from uninit_bg's lazy inode table initialization
Instead of using -O lazy_bg,uninit_bg as the way of requesting that
the inode table be lazy unitialized, use the parameter
lazy_itable_init, which can either be set via mke2fs's -E option, or
via /etc/mke2fs.conf.

Also fix some random problems in mke2fs's man page, including
documenting the extent feature, which had been missing.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-04-18 10:19:27 -04:00
Theodore Ts'o 2930dad2b2 Rename the feature uninit_groups to uninit_bg
Allow the old name of uninit_groups when converting feature names for
backwards compatibility for scripts running mke2fs and tune2fs.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-04-17 23:31:44 -04:00
Theodore Ts'o 3d43836fda New mke2fs filesystem and usage types support
Provide mke2fs with a much more sophisticated system for controlling
configuration parameters of a newly created filesystem based on a
split filesystem and usage type system.  The -t option to mke2fs was a
deprecated alias to -c; it now specifies a filesystem type (ext2,
ext3, ext4, etc.), while the -T option can now be a comma separated
usage list.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-04-06 17:15:38 -04:00
Andreas Dilger 4237c73bf5 Improve ext4 feature descriptions in mke2fs and tune2fs man pages
Signed-off-by: Andreas Dilger <adilger@dilger.ca>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-03-30 14:13:03 -04:00