Comment 0 for bug 1597522

Revision history for this message
Wesley Wiedenmeier (wesley-wiedenmeier) wrote :

During format handling, curtin detects the underlying block size of the disk and sets the filesystem block size accordingly.

In order to properly handle a bug in mkfs.vfat, curtin adds the flag '-s 1'. However, curtin adds this flag to all disk format commands, not just to commands using 'mkfs.vfat'. This can lead to unexpected behavior with some formatting tools, and can cause installation to halt with others.

For example, the mkfs.btrfs utility understands '-s' to mean sectorsize, so when curtin installs to an advanced format disk and storage config includes a btrfs formatted filesystem, curtin will create a filesystem that uses 1 byte sectors. This will greatly harm filesystem performance.

For xfs volumes, this means that installation will fail completely, as the sectorsize attribute for xfs volumes must be specified in the format '-s size=512', so '-s 1' will cause mkfs.xfs to fail.

Fortunately, this does not affect mkfs.ext* because these tools seem to silently ignore the '-s' flag, so most users likely have not been affected.