Jump to content

Question about the default ext4 settings in lib/debootstrap.sh


kimidare

Recommended Posts

Hey guys.

 

 

1. This piece

    if [[ $(lsb_release -sc) =~ bionic|buster|cosmic|disco ]]; then
        mkopts[ext4]='-q -m 2 -O ^64bit,^metadata_csum'
    elif [[ $(lsb_release -sc) == xenial ]]; then
        mkopts[ext4]='-q -m 2'
    fi

Why disable metadata_csum?

Why disable 64bit overall, not just for pure 32 bit boards?

 

Edit on Mar 9 2020

Metadata checksums is a new feature of ext4 since e2fsprogs 1.44 (xenial has 1.42). It makes the fs more robust to data corruption but it requires some extra cpu power to calculate the checksums. It is not a problem for generic cpus with SSE4.2 (= hardware accelerated crc32):  intel since core gen1, amd since bulldozer.

Arm world is not that simple. So we just disable the checksums in distros which have them on by default in /etc/mke2fs.conf to reduce cpu usage.

The 64bit option is only required for the checksums (since armbian is not something for use with really huge storages) hence we disable it as well.

 

 

2. This piece 

[[ $ROOTFS_TYPE == ext4 ]] && tune2fs -o journal_data_writeback $rootdevice > /dev/null

Why enable journal_data_writeback feature? What are the pros and cons?

 

Edit on Mar 9 2020

"Data mode" section in https://www.kernel.org/doc/Documentation/filesystems/ext4.txt

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines