I assume the $30,000 is his arrears on the mortgage or are you also talking about future mortgage payments after you re-finance. Is he seeking to discharge his liability to you in the bankruptcy? Unless you file a motion to avoid a discharge of the $30,000, the court so orders it non-dischargeable, you will have no further recourse on trying to collect it. It seriously sounds like you need to beg or borrow a retainer for a bankruptcy attorney to represent your interests as a creditor in your ex's bankruptcy AND as a co-owner of the property securing the mortgage.
Contact your local bar association for list of local bankruptcy attorneys that do pro bono (free) work. Sometimes the bankruptcy court will award attorneys fees.

