From: Theodore Ts'o <tytso@mit.edu>
To: Contact <neitsab@ovh.fr>
Cc: "Lukáš Czerner" <lczerner@redhat.com>,
"linux-ext4@vger.kernel.org" <linux-ext4@vger.kernel.org>
Subject: Re: Make huge files strictly contiguous (fallocate, bigalloc, e4defrag...)
Date: Sun, 20 Apr 2014 15:01:46 -0400 [thread overview]
Message-ID: <20140420190146.GB29727@thunk.org> (raw)
In-Reply-To: <5353DBC2.5080708@ovh.fr>
On Sun, Apr 20, 2014 at 04:37:54PM +0200, Contact wrote:
> While we're at it, how can I do this? I searched the
> mkfs.ext4/mke2fs.conf/ext4/tune2fs man pages for the option to turn off
> writing backup superblock you mentioned, however the closest I found is
> tune2fs -O ^sparse_super which is part of the defaults mke2fs.conf
> options... Could you point me at it so that I can try to get this
> source of non-contiguity away?
This requires recompiling e2fsprogs using the tip of the maint branch,
as I had suggested earlier (and which you had ruled out because you
didn't want to build your own e2fsprogs from source).
Once you do this, and you put the following in
hugefiles = {
features = extent,huge_file,flex_bg,uninit_bg,dir_nlink,extra_isize,^resize_inode,sparse_super2
hash_alg = half_md4
num_backup_sb = 0
packed_meta_blocks = 1
flex_bg_size = 262144
inode_ratio = 4194304
make_hugefiles = 1
hugefiles_dir = /boot
hugefiles_name = contig-files
hugefiles_digits = 1
hugefiles_size = 256M
num_hugefiles = 3
}
Using the sparse_super2 feature and setting num_backup_sb=0 disables
the backup superblocks. Then setting flex_bg_size to a very large
value (262144 in this case), will force all of the allocation bitmaps
and inodetables to the very beginning of the file system.
The inode_ratio setting simply radically reduces the number of inodes
in the file system. That was there because originally I was using
this this command set with the hugefiles_size set to 1 or 2 gigabytes,
and filling the disk with completely with large files (num_hugefiles =
0 means "create as many huge files as necessary to fill the disk).
The rest of the "hugefiles" related settings are just simply allowing
mke2fs to create the contiguous files for you.
Note that because this uses a new compat feature, "sparse_super2", if
you use the new mke2fs to create such a file system, you will also
need to make sure the file system is checked using a version of e2fsck
that supports this new feature as well. No kernel changes are
required to support this, though.
Cheers,
- Ted
next prev parent reply other threads:[~2014-04-20 19:01 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-17 2:18 Make huge files strictly contiguous (fallocate, bigalloc, e4defrag...) Contact
2014-04-17 12:04 ` Lukáš Czerner
2014-04-17 15:24 ` Theodore Ts'o
2014-04-17 18:41 ` Contact
2014-04-17 20:11 ` Contact
2014-04-18 8:45 ` Lukáš Czerner
2014-04-20 14:37 ` Contact
2014-04-20 19:01 ` Theodore Ts'o [this message]
2014-04-20 19:38 ` Contact
2014-04-20 20:00 ` Theodore Ts'o
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140420190146.GB29727@thunk.org \
--to=tytso@mit.edu \
--cc=lczerner@redhat.com \
--cc=linux-ext4@vger.kernel.org \
--cc=neitsab@ovh.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).