Prepare a boiling water bath canner and 4 pint jars. Place lids in a small saucepan and bring to a gentle simmer.
Shred the fennel in a food processor or on a box grater.
Finely mince onion (a food processor is easiest, but you can also do it with a knife).
Combine grated fennel, minced onion, vinegar, brown sugar, mustard seeds, salt, fennel seeds, red chili flakes, and black pepper in a large pot and bring to a boil.
Cook the relish at a boil for 2 to 3 minutes, until the liquid has reduced some.
Add lemon zest, juice, and parsley and stir to combine.
Remove relish from the heat and funnel it into prepared jars, leaving approximately 1/4 inch headspace.
Bubble jars well. Wipe rims, apply lids and rings, and process jars in a boiling water bath canner for 10 minutes.
When time is up, remove jars from canner and place them on a folded kitchen towel to cool.
Notes
Recipe adapted from the Fennel Relish recipe in the Ball Complete Book of Home Preserving.