fsarchiver cannot handle mkfsopt with commas

Post here if you found a bug or something really not expected in the program
Post Reply
huanzhang
Posts: 2
Joined: Sun Jul 27, 2014 10:55 pm

fsarchiver cannot handle mkfsopt with commas

Post by huanzhang » Sun Jul 27, 2014 11:24 pm

I tried to give a few ext4 extended options as mkfsopt, but since these options need to be comma separated, fsarchiver recognizes them as keys rather than mkfs options:

Code: Select all

sudo fsarchiver restfs myimage.fsa id=0,dest=/dev/mmcblk0p1,mkfs=ext4,mkfsopt='-E stride=16,stripe-width=2048'
strdico.c#185,strdico_set_value(): unexpected key "stripe-width". valid keys are "id,dest,mkfs,mkfsopt"
I also tried to use multiple "-E" options (like "-E stride=16 -E stripe-width=2048") but unfortunately it doesn't work, at least on Ubuntu 14.04 LTS. (see http://www.fsarchiver.org/forums/viewto ... =17&t=1717)

This essentially makes mkfsopt not very useful, at least for mkfs.ext4, where a lot of options need to be comma separated. Fsarchiver should parse mkfsopt more carefully, or provide an alternative delimiter to use in this case.

admin
Site Admin
Posts: 550
Joined: Sat Feb 21, 2004 12:12 pm

Re: fsarchiver cannot handle mkfsopt with commas

Post by admin » Thu Jan 07, 2016 9:27 pm

I confirm this is a limitation of the mkfsopt: it does not support values which contains separators such as commas and semi-colons. There is no workaround or solution at the moment (escaping or quoting does not work)

Post Reply