Comment 6 for bug 1544574

Revision history for this message
Dimitri John Ledkov (xnox) wrote :

Parted is not used to create xfs filesystem. The call chain is d-i -> partman -> partman-xfs -> mkfs.xfs, thus xfsprogs is used.

It defaults to XFS_DFL_BLOCKSIZE_LOG 12, that is 2**12 = 4096, i.e. 4k block size.

Looking at the syslog, however, it shows that BLKBSZSET ioctl is called with 512 value...

Digging further, there are two code paths in mkfs.xfs, one with blkid probes and another one without, which simply uses hard-coded 512 value. Checking xfsprogs build-log it appears that d-i version of mkfs.xfs is built without blkid support

"""
    [CC] xfs_mkfs.o
gcc -g -O2 -Os -DNDEBUG -DVERSION=\"4.3.0\" -DLOCALEDIR=\"/usr/share/locale\" -DPACKAGE=\"xfsprogs\" -I../include -I../libxfs -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -funsigned-char -fno-strict-aliasing -Wall -DHAVE_MNTENT -c xfs_mkfs.c
xfs_mkfs.c:465:4: warning: #warning BLKID is disabled, so signature detection and block device access are not working! [-Wcpp]
 # warning BLKID is disabled, so signature detection and block device\
    ^
    [LD] mkfs.xfs
"""

I think two things should happen. In non-blkid case xfs is really ought to default to 4096, as per manpages.
And secondly, d-i built should come with blkid support enabled on Ubuntu, as really, anything else is not acceptable.