Cut the rind and excess fat off the ham hock and place in a large-lidded saucepan.
Cover with cold water and add the onion, carrots, celery, bay leaf and thyme.
Bring to the boil and simmer for 2 to 3 hours, skimming off any scum that rises to the surface.
When the ham hock is tender and falling off the bone, turn the heat off and allow to cool a little before removing the ham hock onto a chopping board.
Remove the meat from the bones and chop into bitesize chunks. Place in the bowl and set aside.
Preheat the oven to 180C/350F/gas 4.
Heat a little oil in the frying pan and sauté the onions on a moderate heat until translucent. Remove from the heat and set aside.
Melt the butter in the casserole.
Put half the onions in the bottom of the casserole and season with black pepper and a little mustard powder.
Layer half the ham hock meat on top, seasoning again, then top with half the potatoes.
Repeat this layering once more.
Pour in enough stock to reach just below the top layer of potatoes.
Bring to the boil, cover with the lid and place in the oven for an hour.
Remove the lid and bake for a further 30 minutes to brown the top layer of potatoes.
Sprinkle with chopped parsley and serve.