When dealing with XFS filesystems, block size plays a crucial role in performance optimization, especially for large file operations. The standard 4k block size works well for most cases, but enterprise environments often require larger block sizes (64k or more) for better throughput with large sequential I/O patterns.
The "Function not implemented" error typically occurs when:
1. The kernel XFS module lacks support for the specified block size
2. The mkfs.xfs and mount utilities version mismatch
3. Kernel configuration doesn't include large block size support
Before attempting to mount, check your kernel's XFS capabilities:
# Check XFS module parameters
modinfo xfs | grep block
# View supported block sizes
cat /proc/fs/xfs/stat | grep -i block
For Ubuntu 10.10 (kernel 2.6.35), you might need to recompile the kernel with proper XFS configuration:
# Navigate to kernel config
cd /usr/src/linux
make menuconfig
# Enable these options:
File systems -> XFS filesystem support -> Enable large block support (CONFIG_XFS_LARGE_BLOCKS)
File systems -> XFS filesystem support -> Large block/inode numbers (CONFIG_LBD)
If recompiling isn't feasible, try these workarounds:
# Attempt forced mount with explicit block size specification
mount -t xfs -o blocksize=65536 /dev/sdb1 /mnt/media
# Check for kernel messages
dmesg | tail -20
# Try older XFS utilities (compatibility mode)
xfs_admin -c "version=2" /dev/sdb1
mount /dev/sdb1 /mnt/media
When creating XFS filesystems with non-standard block sizes:
# Recommended mkfs.xfs command for large block devices
mkfs.xfs -f -b size=64k -l size=128m -d agcount=32 -n size=64k /dev/sdb1
# Post-creation verification
xfs_info /dev/sdb1
xfs_db -c "sb 0" -c "print blocklog" /dev/sdb1
If problems continue, consider:
# Checking filesystem consistency
xfs_repair /dev/sdb1
# Upgrading XFS utilities
apt-get install xfsprogs
# Testing with newer kernel (backport if necessary)
apt-get install linux-image-generic-lts-backport-natty
Working with XFS filesystems often requires careful consideration of block sizes. While the default 4k block size works for most scenarios, some storage configurations benefit from larger block sizes. The error message "mount: Function not implemented" typically indicates a kernel-level limitation or misconfiguration.
Before attempting to mount, check your kernel's XFS capabilities:
cat /boot/config-$(uname -r) | grep XFS
Look specifically for:
CONFIG_XFS_FS=y
CONFIG_XFS_QUOTA=y
CONFIG_XFS_POSIX_ACL=y
CONFIG_XFS_RT=y
When dealing with non-standard block sizes, explicit declaration is crucial:
sudo mount -t xfs -o inode64,largeio,nouuid /dev/sdb1 /mnt/media
The largeio
option is particularly important for >4k block sizes.
When creating XFS filesystems with custom block sizes, consider these parameters:
sudo mkfs.xfs -f -b size=64k \
-d agcount=32 \
-l size=128m,version=2 \
/dev/sdb1
If you still encounter issues, try these diagnostic steps:
dmesg | grep XFS
xfs_info /dev/sdb1
xfs_check /dev/sdb1
Larger block sizes (64k) typically benefit:
- Large sequential I/O operations
- High-capacity storage arrays
- Media streaming applications
But may not be optimal for small file operations.
Ensure the XFS module is properly loaded:
lsmod | grep xfs
modinfo xfs
If necessary, force reload the module:
sudo modprobe -r xfs
sudo modprobe xfs