Page 1 of 1

fsarchiver does not handle ext4 -E options correctly

Posted: Sun Jul 27, 2014 11:18 pm
by huanzhang
According to line 273-276 in fs_ext2.c (version 0.6.19), fsarchiver handles extended ext4 options with multiple "-E" switches. However, on Ubuntu 14.04 LTS, only the last -E switch is honored by the mkfs.ext4 utility. For example, if both stride and stripe-width are restored as extended options in fsarchiver, only stripe-width is actually used by mkfs.ext4. One can show this problem by using the following tests:

Code: Select all

$ sudo mkfs.ext4 -q -E stride=16,stripe-width=2048 /dev/mmcblk0p1 
$ sudo dumpe2fs -h /dev/mmcblk0p1 | grep RAID
dumpe2fs 1.42.9 (4-Feb-2014)
RAID stride:              16
RAID stripe width:        2048
$ sudo mkfs.ext4 -q -E stride=16 -E stripe-width=2048 /dev/mmcblk0p1 
$ sudo dumpe2fs -h /dev/mmcblk0p1 | grep RAID
dumpe2fs 1.42.9 (4-Feb-2014)
RAID stripe width:        2048
It seems when two "-E" are given, mkfs.ext4 ignores the first one. Fsarchiver should use a comma separated list for multiple extended options.