0

I'm about to add a new (virtual) disk to one of my build machines, that runs on a VM host I have no control over. This will be used for compiling large amounts of source code (a Yocto distribution) from sources that are obtained elsewhere (Web servers or Git repositories).

Read and write speed for the many small files and a few very large files is my most important consideration. Long-term data integrity is of low importance, as everything can easily be re-created: I'm comfortable with losing files when there's an unplanned power interruption, for example.

I think I'm going to use an ext4 filesystem, though I'm open to considering other types if there will be an appreciable benefit.

What mkfs flags should I use, and what mount options?

There's a similar, but old, question on Server Fault; I'd like advice that's relevant in 2021.

1 Answer 1

0

What I've gone with (for now, at least) is

mkfs.ext4                                       \
    -e remount-ro                               \
    -E num_backup_sb=0                          \
    -m 0                                        \
    -O sparse_super2,uninit_bg                  \
    "$PARTITION"

I tried -O ^has_journal, but my kernel won't allow Ext4 without a journal.

I've mounted it with these options in /etc/fstab:

noatime,data=writeback,barrier=0,nombcache

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .