-в ≠ -вь Being a native speaker, I am not 100% sure what the rules are, but in all examples that immediately come to mind nouns ending "-в" are masculine whereas nouns ending "-вь" are feminine.
In general, a word ending with a consonant (but not "-ь") is pretty much guaranteed to be masculine (if there are exceptions, I can't think of any right now). Nouns ending with "-ь", on the other hand, can be either masculine or feminine - there are no rules (but there are patterns). E.g., a word ending with "-ель" is quite likely masculine (but not always!) simply because this is an ending equivalent to "-er" in English: учитель=teacher, писатель=writer etc. But even then there are words that have this ending accidentally and do not fit this pattern: ель = spruce, метель = snow storm/blizzard. Both words are feminine.